|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RecordManager
An interface to manages records, which are uninterpreted blobs of data.
The set of record operations is simple: fetch, insert, update and delete. Each record is identified using a "rowid" and contains a byte[] data block. Rowids are returned on inserts and you can store them someplace safe to be able to get back to them. Data blocks can be as long as you wish, and may have lengths different from the original when updating.
Field Summary | |
---|---|
static int |
NAME_DIRECTORY_ROOT
Reserved slot for name directory. |
Method Summary | |
---|---|
void |
close()
Closes the record manager. |
void |
commit()
Commit (make persistent) all changes since beginning of transaction. |
void |
delete(long recid)
Deletes a record. |
java.lang.Object |
fetch(long recid)
Fetches a record using standard java object serialization. |
java.lang.Object |
fetch(long recid,
Serializer serializer)
Fetches a record using a custom serializer. |
long |
getNamedObject(java.lang.String name)
Obtain the record id of a named object. |
long |
getRoot(int id)
Returns the indicated root rowid. |
int |
getRootCount()
Returns the number of slots available for "root" rowids. |
long |
insert(java.lang.Object obj)
Inserts a new record using standard java object serialization. |
long |
insert(java.lang.Object obj,
Serializer serializer)
Inserts a new record using a custom serializer. |
void |
rollback()
Rollback (cancel) all changes since beginning of transaction. |
void |
setNamedObject(java.lang.String name,
long recid)
Set the record id of a named object. |
void |
setRoot(int id,
long rowid)
Sets the indicated root rowid. |
void |
update(long recid,
java.lang.Object obj)
Updates a record using standard java object serialization. |
void |
update(long recid,
java.lang.Object obj,
Serializer serializer)
Updates a record using a custom serializer. |
Field Detail |
---|
static final int NAME_DIRECTORY_ROOT
Method Detail |
---|
long insert(java.lang.Object obj) throws java.io.IOException
obj
- the object for the new record.
java.io.IOException
- when one of the underlying I/O operations fails.long insert(java.lang.Object obj, Serializer serializer) throws java.io.IOException
obj
- the object for the new record.serializer
- a custom serializer
java.io.IOException
- when one of the underlying I/O operations fails.void delete(long recid) throws java.io.IOException
recid
- the rowid for the record that should be deleted.
java.io.IOException
- when one of the underlying I/O operations fails.void update(long recid, java.lang.Object obj) throws java.io.IOException
recid
- the recid for the record that is to be updated.obj
- the new object for the record.
java.io.IOException
- when one of the underlying I/O operations fails.void update(long recid, java.lang.Object obj, Serializer serializer) throws java.io.IOException
recid
- the recid for the record that is to be updated.obj
- the new object for the record.serializer
- a custom serializer
java.io.IOException
- when one of the underlying I/O operations fails.java.lang.Object fetch(long recid) throws java.io.IOException
recid
- the recid for the record that must be fetched.
java.io.IOException
- when one of the underlying I/O operations fails.java.lang.Object fetch(long recid, Serializer serializer) throws java.io.IOException
recid
- the recid for the record that must be fetched.serializer
- a custom serializer
java.io.IOException
- when one of the underlying I/O operations fails.void close() throws java.io.IOException
java.io.IOException
- when one of the underlying I/O operations fails.int getRootCount()
long getRoot(int id) throws java.io.IOException
java.io.IOException
getRootCount()
void setRoot(int id, long rowid) throws java.io.IOException
java.io.IOException
getRootCount()
void commit() throws java.io.IOException
java.io.IOException
void rollback() throws java.io.IOException
java.io.IOException
long getNamedObject(java.lang.String name) throws java.io.IOException
java.io.IOException
void setNamedObject(java.lang.String name, long recid) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |