Class AbstractDataStore
- java.lang.Object
-
- net.timewalker.ffmq4.storage.data.impl.AbstractDataStore
-
- All Implemented Interfaces:
DataStore,LinkedDataStore
- Direct Known Subclasses:
AbstractBlockBasedDataStore,InMemoryLinkedDataStore
public abstract class AbstractDataStore extends Object implements LinkedDataStore
AbstractDataStore
-
-
Field Summary
Fields Modifier and Type Field Description protected FastBitSetlocksprotected static booleanSAFE_MODE
-
Constructor Summary
Constructors Constructor Description AbstractDataStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckHandle(int handle)Check handle validitybooleanisLocked(int handle)Check if the data associated with a given handle is lockedvoidlock(int handle)Lock the data associated to a given handlevoidunlock(int handle)Unlock the data associated to a given handle-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.timewalker.ffmq4.storage.data.DataStore
close, commitChanges, commitChanges, getAbsoluteStoreUsage, getStoreUsage, size
-
-
-
-
Field Detail
-
SAFE_MODE
protected static final boolean SAFE_MODE
-
locks
protected FastBitSet locks
-
-
Method Detail
-
checkHandle
protected abstract void checkHandle(int handle) throws DataStoreExceptionCheck handle validity- Parameters:
handle-- Throws:
DataStoreException
-
isLocked
public final boolean isLocked(int handle) throws DataStoreExceptionDescription copied from interface:LinkedDataStoreCheck if the data associated with a given handle is locked- Specified by:
isLockedin interfaceLinkedDataStore- Throws:
DataStoreException- on storage error or invalid handle
-
lock
public final void lock(int handle) throws DataStoreExceptionDescription copied from interface:LinkedDataStoreLock the data associated to a given handle- Specified by:
lockin interfaceLinkedDataStore- Throws:
DataStoreException- on storage error or invalid handle
-
unlock
public final void unlock(int handle) throws DataStoreExceptionDescription copied from interface:LinkedDataStoreUnlock the data associated to a given handle- Specified by:
unlockin interfaceLinkedDataStore- Throws:
DataStoreException- on storage error or invalid handle
-
-