java.lang.Object | |
↳ | sun.rmi.log.LogHandler |
A LogHandler represents snapshots and update records as serializable objects. This implementation does not know how to create an initial snaphot or apply an update to a snapshot. The client must specifiy these methods via a subclass.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a LogHandler for a ReliableLog.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Reads a stably logged update (a serializable object) from a stream.
| |||||||||||
Creates and returns the initial state of data structure that needs
to be stably stored.
| |||||||||||
Reads a stably logged update (a serializable object) from a
stream.
| |||||||||||
Read the snapshot object from a stream and returns the snapshot.
| |||||||||||
Writes the snapshot object to a stream.
| |||||||||||
Writes the representation (a serializable object) of an update
to a stream.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a LogHandler for a ReliableLog.
Reads a stably logged update (a serializable object) from a stream.
This callback is invoked during recovery, once for every record in the
log. After reading the update, this method is invoked in order to
obtain the new snapshot value. The method should apply the update
object to the current state state
and return the new
state (the new snapshot value).
update | the update object |
---|---|
state | the current state |
Exception | can raise any exception |
---|
Creates and returns the initial state of data structure that needs to be stably stored. This method is called when a ReliableLog is created.
Exception | can raise any exception |
---|
Reads a stably logged update (a serializable object) from a stream. This callback is invoked during recovery, once for every record in the log. After reading the update, this method invokes the applyUpdate (abstract) method in order to obtain the new snapshot value. It then returns the new snapshot.
in | the input stream |
---|---|
state | the current state |
Exception | can raise any exception |
---|
Read the snapshot object from a stream and returns the snapshot. This callback is invoked when the client calls the recover method of ReliableLog.
in | the input stream |
---|
Exception | can raise any exception |
---|
Writes the snapshot object to a stream. This callback is invoked when the client calls the snaphot method of ReliableLog.
out | the output stream |
---|---|
value | the snapshot |
Exception | can raise any exception |
---|
Writes the representation (a serializable object) of an update to a stream. This callback is invoked when the client calls the update method of ReliableLog.
out | the output stream |
---|---|
value | the snapshot |
Exception | can raise any exception |
---|