public interface IRecordStore
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| Modifier and Type | Method and Description |
|---|---|
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. |
void enableOrder(boolean enableOrder)
retrieveByIndex(long, boolean) operation should be enabled or notenableOrder - whether the retrieveByIndex(long, boolean) operation should be enabled or notlong getRecordCount()
Records stored using this IRecordStoreRecords storedvoid persist(Record record) throws GRS2RecordStoreException
Recordrecord - the Record to persistGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedRecord retrieve(long recordID, boolean reset) throws GRS2RecordStoreException
Record based on its idrecordID - 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 falseRecord retrievedGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedRecord 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 truerecordIndex - 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 falseRecord retrievedGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedvoid dispose()
throws GRS2RecordStoreException
IRecordStore instance as well as any permanent storage resources occupiedGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedCopyright © 2014. All Rights Reserved.