Interface LinkedDataStore
-
- All Superinterfaces:
DataStore
- All Known Implementing Classes:
AbstractBlockBasedDataStore,AbstractDataStore,BlockBasedDataStore,InMemoryLinkedDataStore,JournalingBlockBasedDataStore
public interface LinkedDataStore extends DataStore
LinkedDataStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intdelete(int handle)Delete data associated to the given handle from the storeintfirst()Get the first data handle storedvoidinit()Initialize the data storebooleanisLocked(int handle)Check if the data associated with a given handle is lockedvoidlock(int handle)Lock the data associated to a given handleintnext(int handle)Get the next data handle after the given oneintprevious(int handle)Get the previous data handle after the given oneintreplace(int handle, Object obj)Replace data in the store at the given positionObjectretrieve(int handle)Retrieve the data associated to a given handleintstore(Object obj, int previousHandle)Put some data under in the store after the previous handle datavoidunlock(int handle)Unlock the data associated to a given handle-
Methods inherited from interface net.timewalker.ffmq4.storage.data.DataStore
close, commitChanges, commitChanges, getAbsoluteStoreUsage, getStoreUsage, size
-
-
-
-
Method Detail
-
init
void init() throws DataStoreException
Initialize the data store- Throws:
DataStoreException
-
first
int first() throws DataStoreException
Get the first data handle stored- Returns:
- the first entry handle or -1 if the store is empty
- Throws:
DataStoreException
-
next
int next(int handle) throws DataStoreException
Get the next data handle after the given one- Parameters:
handle- block handle- Returns:
- the next entry handle or -1 if their is no successor
- Throws:
DataStoreException
-
previous
int previous(int handle) throws DataStoreExceptionGet the previous data handle after the given one- Parameters:
handle- block handle- Returns:
- the previous entry handle or -1 if their is no predecessor
- Throws:
DataStoreException
-
store
int store(Object obj, int previousHandle) throws DataStoreException
Put some data under in the store after the previous handle data- Parameters:
previousHandle- previous entry handle, use 0 if the store is empty- Throws:
DataStoreException
-
replace
int replace(int handle, Object obj) throws DataStoreExceptionReplace data in the store at the given position- Parameters:
handle- message handleobj- the message to store- Throws:
DataStoreException
-
retrieve
Object retrieve(int handle) throws DataStoreException
Retrieve the data associated to a given handle- Throws:
DataStoreException- on storage error or invalid handle
-
delete
int delete(int handle) throws DataStoreExceptionDelete data associated to the given handle from the store- Returns:
- the previous handle or -1
- Throws:
DataStoreException- on storage error or invalid handle
-
lock
void lock(int handle) throws DataStoreException
Lock the data associated to a given handle- Throws:
DataStoreException- on storage error or invalid handle
-
unlock
void unlock(int handle) throws DataStoreExceptionUnlock the data associated to a given handle- Throws:
DataStoreException- on storage error or invalid handle
-
isLocked
boolean isLocked(int handle) throws DataStoreExceptionCheck if the data associated with a given handle is locked- Throws:
DataStoreException- on storage error or invalid handle
-
-