|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IRecordStore
This interface defines a way a persistency manager can be interfaced to enabling persistency of Records
and retrieval based on either their ids, or the order by which they were stored. The Record persistency
must be handled by the respective Record.deflate(java.io.DataOutput) operation while the retrieval
by the respective Record.inflate(java.io.DataInput, boolean) method. The storage medium over which the
Records are persisted is left to the implementation specifics
| Method Summary | |
|---|---|
void |
dispose()
Disposes the IRecordStore instance as well as any permanent storage resources occupied |
void |
enableOrder(boolean enableOrder)
Whether the retrieveByIndex(long, boolean) operation should be enabled or not |
long |
getRecordCount()
Retrieves the number of Records stored using this IRecordStore |
void |
persist(Record record)
Persists the provided Record |
Record |
retrieve(long recordID,
boolean reset)
Retrieves a previously stored Record based on its id |
Record |
retrieveByIndex(long recordIndex,
boolean reset)
Retrieve a previously stored Record based on the index by which it was stored. |
| Method Detail |
|---|
void enableOrder(boolean enableOrder)
retrieveByIndex(long, boolean) operation should be enabled or not
enableOrder - whether the retrieveByIndex(long, boolean) operation should be enabled or notlong getRecordCount()
Records stored using this IRecordStore
Records stored
void persist(Record record)
throws GRS2RecordStoreException
Record
record - the Record to persist
GRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completed
Record retrieve(long recordID,
boolean reset)
throws GRS2RecordStoreException
Record based on its id
recordID - the ID of the Record to be retrievedreset - whether during the Record.inflate(java.io.DataInput, boolean) invocation
the reset parameter should be set to true or false
Record retrieved
GRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completed
Record retrieveByIndex(long recordIndex,
boolean reset)
throws GRS2RecordStoreException
Record based on the index by which it was stored. This method is only
available if before the first time a persist(Record) was invoked the method
enableOrder(boolean) has been set to true
recordIndex - The index by which the Record to be retrieved was storedreset - whether during the Record.inflate(java.io.DataInput, boolean) invocation
the reset parameter should be set to true or false
Record retrieved
GRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completed
void dispose()
throws GRS2RecordStoreException
IRecordStore instance as well as any permanent storage resources occupied
GRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completed
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||