public class CacheRecordStore extends Object implements IRecordStore
| Constructor and Description |
|---|
CacheRecordStore() |
CacheRecordStore(int keepInMemory) |
CacheRecordStore(int keepInMemory,
net.sf.ehcache.store.MemoryStoreEvictionPolicy evictionPolicy) |
| 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
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. |
public CacheRecordStore(int keepInMemory,
net.sf.ehcache.store.MemoryStoreEvictionPolicy evictionPolicy)
public CacheRecordStore(int keepInMemory)
public CacheRecordStore()
public void enableOrder(boolean enableOrder)
IRecordStoreIRecordStore.retrieveByIndex(long, boolean) operation should be enabled or notenableOrder in interface IRecordStoreenableOrder - whether the IRecordStore.retrieveByIndex(long, boolean) operation should be enabled or notpublic long getRecordCount()
IRecordStoreRecords stored using this IRecordStoregetRecordCount in interface IRecordStoreRecords storedpublic void persist(Record record) throws GRS2RecordStoreException
IRecordStoreRecordpersist in interface IRecordStorerecord - the Record to persistGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedpublic Record retrieve(long recordID, boolean reset) throws GRS2RecordStoreException
IRecordStoreRecord based on its idretrieve 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 falseRecord retrievedGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedpublic 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 trueretrieveByIndex 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 falseRecord retrievedGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedpublic void dispose()
throws GRS2RecordStoreException
IRecordStoreIRecordStore instance as well as any permanent storage resources occupieddispose in interface IRecordStoreGRS2RecordStoreException - the state of the IRecordStore does not allow for this operation to be completedCopyright © 2014. All Rights Reserved.