|
|||||||||
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 Record s 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)
IRecordStore
IRecordStore.retrieveByIndex(long, boolean)
operation should be enabled or not
enableOrder
in interface IRecordStore
enableOrder
- whether the IRecordStore.retrieveByIndex(long, boolean)
operation should be enabled or notpublic long getRecordCount()
IRecordStore
Record
s stored using this IRecordStore
getRecordCount
in interface IRecordStore
Record
s storedpublic void persist(Record record) throws GRS2RecordStoreException
IRecordStore
Record
persist
in interface IRecordStore
record
- the Record
to persist
GRS2RecordStoreException
- the state of the IRecordStore
does not allow for this operation to be completedpublic Record retrieve(long recordID, boolean reset) throws GRS2RecordStoreException
IRecordStore
Record
based on its id
retrieve
in interface IRecordStore
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 completedpublic Record retrieveByIndex(long recordIndex, boolean reset) throws GRS2RecordStoreException
IRecordStore
Record
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 IRecordStore
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 completedpublic void dispose() throws GRS2RecordStoreException
IRecordStore
IRecordStore
instance as well as any permanent storage resources occupied
dispose
in interface IRecordStore
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 |