|
Oracle | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionLoggable
Interface for object capable of being stored in transaction log.
This interface describes the properties of an object suitable for transactional logging and crash recovery via the TranactionLogger class.
TransactionLoggable Object's Life Cycle
It is possible for TransactionLoggable.onRecovery() to be never called, or to be called more than once, depending on the number of system crashes.
A TransacctionLoggable class is also expected to efficiently implement equals(), hashCode(), and to have a constructor with no arguments.
TransactionLogger
Method Summary | |
---|---|
void |
onDisk(TransactionLogger tlog)
Callback method for when object safely written to disk. |
void |
onError(TransactionLogger tlog)
Callback method for problem writing object to disk. |
void |
onRecovery(TransactionLogger tlog)
Callback method to perform recovery. |
void |
readExternal(DataInput decoder)
Restore object's state based on external representation. |
void |
writeExternal(DataOutput encoder)
Save object's state in external format. |
Method Detail |
---|
void readExternal(DataInput decoder) throws IOException
If more than one version of the object's class's implementation exists, this method should be prepared to handle older versions. This permits a transaction log file stored on disk to be processed after a software upgrade.
decoder
- decoder for log externalization data types
IOException
void writeExternal(DataOutput encoder) throws IOException
The external format should be as compact as possible, so it may be efficiently written into the transaction log.
A version number should be included, in case an older log file is read by a newer version of the object's class's implementation. This permits a transaction log file stored on disk to be processed after a software upgrade.
encoder
- encoder for log externalization data types
IOException
void onDisk(TransactionLogger tlog)
tlog
- TransactionLogger object handling this objectvoid onError(TransactionLogger tlog)
tlog
- TransactionLogger object handling this objectvoid onRecovery(TransactionLogger tlog)
When this method is invoked, the object should perform its crash recovery logic. State will already have been restored by the readExternal method.
tlog
- TransactionLogger object handling this object
|
Documentation is available at http://download.oracle.com/docs/cd/E12839_01/web.1111 Copyright 1996,2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Part Number E13941-01 Oracle WebLogic Server 10.3.1 API Reference |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |