net.jinx.db.transaction
Interface SnapshotManager

All Known Implementing Classes:
HierarchySnapshotManager

public interface SnapshotManager


Method Summary
 void commit()
          Commits the current changes to the data Object, indicating that the most recent Transaction was successful.
 java.lang.Object getData()
          Provides the Object containing all the data for this SnapshotManager.
 java.lang.Object getQueryData()
          If at all possible, this provides a read-only view of the Object returned by getData().
 void readSnapshot(java.io.InputStream in)
          Reads a snapshot of the data Object from in, replacing the current data Object, or overriding all it's internal data.
 void rollback()
          Indicates that the changes to the data Object since the most recent call to commit() should be discarded.
 void writeSnapshot(java.io.OutputStream out)
          Writes a snapshot of the data Object to out.
 

Method Detail

getData

java.lang.Object getData()
Provides the Object containing all the data for this SnapshotManager.

Returns:
the Object.

getQueryData

java.lang.Object getQueryData()
If at all possible, this provides a read-only view of the Object returned by getData().

Returns:
a read-only view of the Object returned by getData().

writeSnapshot

void writeSnapshot(java.io.OutputStream out)
                   throws java.io.IOException
Writes a snapshot of the data Object to out. This can be in any format desired.

Parameters:
out - the OutputStream to write the snapshot to.
Throws:
java.lang.Exception - if an error occurs. An Exception thrown here indicates this SnapshotManager is in an unusable state.
java.io.IOException

readSnapshot

void readSnapshot(java.io.InputStream in)
                  throws java.io.IOException
Reads a snapshot of the data Object from in, replacing the current data Object, or overriding all it's internal data. This can be in any format desired.

Parameters:
in - the InputStream to read the snapshot from.
Throws:
java.lang.Exception - if an error occurs. An Exception thrown here indicates this SnapshotManager is in an unusable state.
java.io.IOException

commit

void commit()
Commits the current changes to the data Object, indicating that the most recent Transaction was successful.


rollback

void rollback()
Indicates that the changes to the data Object since the most recent call to commit() should be discarded.