|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atomikos.persistence.imp.StreamObjectLog
public class StreamObjectLog
implementation. It keeps on growing, and only does a checkpoint on restart.
Field Summary | |
---|---|
protected Console |
console_
|
protected LogStream |
logstream_
|
protected Hashtable |
logTable_
|
protected boolean |
panic_
|
protected long |
size_
|
Constructor Summary | |
---|---|
StreamObjectLog(LogStream logstream,
long checkpointInterval,
Console console)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes the log after use. |
void |
delete(Object id)
Delete the given object from the log. |
void |
flush(Recoverable rec)
Flush to permanent memory. |
protected void |
flush(com.atomikos.persistence.imp.SystemLogImage img,
boolean shouldSync)
|
void |
init()
Initialize the object log. |
Vector |
recover()
Recover all non-deleted object images flushed so far. |
Recoverable |
recover(Object 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_
protected Console console_
Constructor Detail |
---|
public StreamObjectLog(LogStream logstream, long checkpointInterval, Console console)
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
recover
in interface ObjectLog
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 |