|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgr.uoa.di.madgik.grs.store.record.CacheRecordStore
public class CacheRecordStore
| Constructor Summary | |
|---|---|
CacheRecordStore()
|
|
CacheRecordStore(int keepInMemory)
|
|
CacheRecordStore(int keepInMemory,
MemoryStoreEvictionPolicy evictionPolicy)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the IRecordStore instance as well as any permanent storage resources occupied |
void |
enableOrder(boolean enableOrder)
Whether the IRecordStore.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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheRecordStore(int keepInMemory,
MemoryStoreEvictionPolicy evictionPolicy)
public CacheRecordStore(int keepInMemory)
public CacheRecordStore()
| Method Detail |
|---|
public void enableOrder(boolean enableOrder)
IRecordStoreIRecordStore.retrieveByIndex(long, boolean) operation should be enabled or not
enableOrder in interface IRecordStoreenableOrder - whether the IRecordStore.retrieveByIndex(long, boolean) operation should be enabled or notpublic long getRecordCount()
IRecordStoreRecords stored using this IRecordStore
getRecordCount in interface IRecordStoreRecords stored
public void persist(Record record)
throws GRS2RecordStoreException
IRecordStoreRecord
persist in interface IRecordStorerecord - the Record to persist
GRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completed
public Record retrieve(long recordID,
boolean reset)
throws GRS2RecordStoreException
IRecordStoreRecord based on its id
retrieve in interface IRecordStorerecordID - 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
public Record retrieveByIndex(long recordIndex,
boolean reset)
throws GRS2RecordStoreException
IRecordStoreRecord based on the index by which it was stored. This method is only
available if before the first time a IRecordStore.persist(Record) was invoked the method
IRecordStore.enableOrder(boolean) has been set to true
retrieveByIndex in interface IRecordStorerecordIndex - 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
public void dispose()
throws GRS2RecordStoreException
IRecordStoreIRecordStore instance as well as any permanent storage resources occupied
dispose in interface IRecordStoreGRS2RecordStoreException - 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 | ||||||||