|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.persistence.imp.StreamObjectLog
public class StreamObjectLog
implementation. It keeps on growing, and only does a checkpoint on restart.
Field Summary | |
---|---|
protected LogStream |
logstream_
|
protected Hashtable |
logTable_
|
protected boolean |
panic_
|
protected long |
size_
|
Constructor Summary | |
---|---|
StreamObjectLog(LogStream logstream,
long checkpointInterval)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes the log after use. |
void |
delete(Object id)
Deletes the given object from the log. |
void |
flush(Recoverable rec)
Flushes to permanent memory. |
protected void |
flush(com.atomikos.persistence.imp.SystemLogImage img,
boolean shouldSync)
|
void |
init()
Initializes the object log. |
Vector |
recover()
Recovers all non-deleted object images flushed so far. |
Recoverable |
recover(Object id)
Recovers the instance with given ID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LogStream logstream_
protected Hashtable logTable_
protected long size_
protected boolean panic_
Constructor Detail |
---|
public StreamObjectLog(LogStream logstream, long checkpointInterval)
logstream
- The underlying logstream. This stream should be reserved for
this instance! Upon close, the underlying stream will also be
closed.checkpointInterval
- How many flush() calls between two checkpoints?console
- For output of feedback.Method Detail |
---|
public void init() throws LogException
ObjectLog
init
in interface ObjectLog
LogException
- If error occurs.ObjectLog
public Vector recover() throws LogException
ObjectLog
recover
in interface ObjectLog
LogException
ObjectLog
public void flush(Recoverable rec) throws LogException
ObjectLog
flush
in interface ObjectLog
rec
- Recoverable instance. NOTE: if the instance has the same
ObjectId as a previous one, then the latter will be overridden
by this one! More precisely, history() will only return the
last image for a given ObjectId.
LogException
- if it did not work.ObjectLog
protected void flush(com.atomikos.persistence.imp.SystemLogImage img, boolean shouldSync) throws LogException
LogException
public Recoverable recover(Object id) throws LogException
ObjectLog
recover
in interface ObjectLog
id
- The id to recover. @return Recoverable The recovered logimage,
null if not found. @exception LogException On failure.
LogException
ObjectLog
public void delete(Object id) throws LogException
ObjectLog
delete
in interface ObjectLog
id
- The object UID.
LogException
- on failure.ObjectLog
public void close() throws LogException
ObjectLog
close
in interface ObjectLog
LogException
- on failure.ObjectLog
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |