|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjdbm.recman.SnapshotRecordManager
public class SnapshotRecordManager
TODO SnapshotRecordManager.
| Field Summary | |
|---|---|
protected RecordManager |
recordManager
Wrapped RecordManager |
| Fields inherited from interface jdbm.RecordManager |
|---|
NAME_DIRECTORY_ROOT |
| Constructor Summary | |
|---|---|
SnapshotRecordManager(RecordManager recordManager,
int size)
Construct a SanshotRecordManager wrapping another RecordManager |
|
| Method Summary | |
|---|---|
void |
abortAction(ActionContext actionContext)
Aborts the given action. |
ActionContext |
beginAction(boolean readOnly,
String whoStarted)
Initializes the context for the action. |
void |
close()
Closes the record manager. |
void |
commit()
Commit (make persistent) all changes since beginning of transaction. |
void |
delete(long recid)
Deletes a record. |
void |
endAction(ActionContext actionContext)
Ends the action associated with the context. |
Object |
fetch(long recid)
Fetches a record using standard Java serialization. |
Object |
fetch(long recid,
Serializer serializer)
Fetches a record using a custom serializer. |
long |
getNamedObject(String name)
Obtain the record id of a named object. |
RecordManager |
getRecordManager()
Get the underlying Record Manager. |
long |
getRoot(int id)
Returns the indicated root rowid. |
int |
getRootCount()
Returns the number of slots available for "root" rowids. |
long |
insert(Object obj)
Inserts a new record using a custom serializer. |
long |
insert(Object obj,
Serializer serializer)
Inserts a new record using a custom serializer. |
void |
rollback()
Rollback (cancel) all changes since beginning of transaction. |
void |
setCurrentActionContext(ActionContext context)
Set the context as the current action context for the given thread |
void |
setNamedObject(String name,
long recid)
Set the record id of a named object. |
void |
setRoot(int id,
long rowid)
Sets the indicated root rowid. |
String |
toString()
|
void |
unsetCurrentActionContext(ActionContext context)
Unsets the context as the current action context. |
void |
update(long recid,
Object obj)
Updates a record using standard Java serialization. |
void |
update(long recid,
Object obj,
Serializer serializer)
Updates a record using a custom serializer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected RecordManager recordManager
| Constructor Detail |
|---|
public SnapshotRecordManager(RecordManager recordManager,
int size)
recordManager - Wrapped RecordManager| Method Detail |
|---|
public ActionContext beginAction(boolean readOnly,
String whoStarted)
beginAction in interface ActionRecordManagerreadOnly - true if action does not do any modificationwhoStarted - caller can use this for debugging
public void setCurrentActionContext(ActionContext context)
setCurrentActionContext in interface ActionRecordManagercontext - identifies the contextpublic void unsetCurrentActionContext(ActionContext context)
unsetCurrentActionContext in interface ActionRecordManagercontext - identifies the context.public void endAction(ActionContext actionContext)
endAction in interface ActionRecordManageractionContext - identifies the action to endpublic void abortAction(ActionContext actionContext)
abortAction in interface ActionRecordManageractionContext - identifies the action to abortpublic RecordManager getRecordManager()
public long insert(Object obj)
throws IOException
insert in interface RecordManagerobj - the object for the new record.
IOException - when one of the underlying I/O operations fails.
public long insert(Object obj,
Serializer serializer)
throws IOException
insert in interface RecordManagerobj - the object for the new record.serializer - a custom serializer
IOException - when one of the underlying I/O operations fails.
public void delete(long recid)
throws IOException
delete in interface RecordManagerrecid - the rowid for the record that should be deleted.
IOException - when one of the underlying I/O operations fails.
public void update(long recid,
Object obj)
throws IOException
update in interface RecordManagerrecid - the recid for the record that is to be updated.obj - the new object for the record.
IOException - when one of the underlying I/O operations fails.
public void update(long recid,
Object obj,
Serializer serializer)
throws IOException
update in interface RecordManagerrecid - the recid for the record that is to be updated.obj - the new object for the record.serializer - a custom serializer
IOException - when one of the underlying I/O operations fails.
public Object fetch(long recid)
throws IOException
fetch in interface RecordManagerrecid - the recid for the record that must be fetched.
IOException - when one of the underlying I/O operations fails.
public Object fetch(long recid,
Serializer serializer)
throws IOException
fetch in interface RecordManagerrecid - the recid for the record that must be fetched.serializer - a custom serializer
IOException - when one of the underlying I/O operations fails.
public void close()
throws IOException
close in interface RecordManagerIOException - when one of the underlying I/O operations fails.public int getRootCount()
getRootCount in interface RecordManager
public long getRoot(int id)
throws IOException
getRoot in interface RecordManagerIOExceptiongetRootCount()
public void setRoot(int id,
long rowid)
throws IOException
setRoot in interface RecordManagerIOExceptiongetRootCount()
public void commit()
throws IOException
commit in interface RecordManagerIOException
public void rollback()
throws IOException
rollback in interface RecordManagerIOException
public long getNamedObject(String name)
throws IOException
getNamedObject in interface RecordManagerIOException
public void setNamedObject(String name,
long recid)
throws IOException
setNamedObject in interface RecordManagerIOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||