|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mapdb.Store
public abstract class Store
Low level record store.
| Field Summary | |
|---|---|
protected boolean |
checksum
|
protected static int |
CHECKSUM_FLAG_MASK
|
protected static int |
CHUNK_SIZE
|
protected static int |
CHUNK_SIZE_MOD_MASK
|
protected boolean |
compress
|
protected static int |
COMPRESS_FLAG_MASK
|
protected boolean |
encrypt
|
protected static int |
ENCRYPT_FLAG_MASK
|
protected EncryptionXTEA |
encryptionXTEA
|
protected ReentrantReadWriteLock[] |
locks
|
protected static Logger |
LOG
|
protected ThreadLocal<CompressLZF> |
LZF
|
protected ReentrantReadWriteLock |
newRecidLock
|
protected byte[] |
password
|
protected Queue<DataOutput2> |
recycledDataOuts
|
protected SerializerPojo |
serializerPojo
default serializer used for persistence. |
protected Lock |
serializerPojoInitLock
|
protected ReentrantLock |
structuralLock
|
| Fields inherited from interface org.mapdb.Engine |
|---|
CATALOG_RECID, CHECK_RECORD, CLASS_INFO_RECID, LAST_RESERVED_RECID |
| Constructor Summary | |
|---|---|
protected |
Store(boolean checksum,
boolean compress,
byte[] password,
boolean disableLocks)
|
| Method Summary | ||
|---|---|---|
abstract String |
calculateStatistics()
get some statistics about store. |
|
boolean |
canSnapshot()
|
|
void |
closeListenerRegister(Runnable closeListener)
|
|
void |
closeListenerUnregister(Runnable closeListener)
|
|
protected
|
deserialize(Serializer<A> serializer,
int size,
DataInput input)
|
|
protected int |
expectedMasks()
|
|
static Store |
forDB(DB db)
traverses EngineWrappers and returns underlying Store |
|
static Store |
forEngine(Engine e)
traverses EngineWrappers and returns underlying Store |
|
abstract long |
getCurrSize()
returns current size occupied by physical store (does not include index). |
|
abstract Iterator<Long> |
getFreeRecids()
|
|
abstract long |
getFreeSize()
returns free size in physical store (does not include index). |
|
abstract long |
getMaxRecid()
|
|
abstract ByteBuffer |
getRaw(long recid)
|
|
SerializerPojo |
getSerializerPojo()
Returns default serializer associated with this engine. |
|
abstract long |
getSizeLimit()
returns maximal store size or `0` if there is no limit |
|
protected void |
lockAllWrite()
|
|
protected static int |
lockPos(long key)
|
|
protected DataOutput2 |
newDataOut2()
|
|
void |
printStatistics()
|
|
protected
|
serialize(A value,
Serializer<A> serializer)
|
|
Engine |
snapshot()
Returns read-only snapshot of data in Engine. |
|
protected void |
unlockAllWrite()
|
|
abstract void |
updateRaw(long recid,
ByteBuffer data)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mapdb.Engine |
|---|
canRollback, clearCache, close, commit, compact, compareAndSwap, delete, get, isClosed, isReadOnly, preallocate, preallocate, put, rollback, update |
| Field Detail |
|---|
protected static final Logger LOG
protected final boolean checksum
protected final boolean compress
protected final boolean encrypt
protected final byte[] password
protected final EncryptionXTEA encryptionXTEA
protected static final int CHECKSUM_FLAG_MASK
protected static final int COMPRESS_FLAG_MASK
protected static final int ENCRYPT_FLAG_MASK
protected static final int CHUNK_SIZE
protected static final int CHUNK_SIZE_MOD_MASK
protected SerializerPojo serializerPojo
protected final ThreadLocal<CompressLZF> LZF
protected Lock serializerPojoInitLock
protected final ReentrantLock structuralLock
protected final ReentrantReadWriteLock newRecidLock
protected final ReentrantReadWriteLock[] locks
protected final Queue<DataOutput2> recycledDataOuts
| Constructor Detail |
|---|
protected Store(boolean checksum,
boolean compress,
byte[] password,
boolean disableLocks)
| Method Detail |
|---|
public abstract long getMaxRecid()
public abstract ByteBuffer getRaw(long recid)
public abstract Iterator<Long> getFreeRecids()
public abstract void updateRaw(long recid,
ByteBuffer data)
public abstract long getSizeLimit()
public abstract long getCurrSize()
public abstract long getFreeSize()
public abstract String calculateStatistics()
public void printStatistics()
public SerializerPojo getSerializerPojo()
Engine
getSerializerPojo in interface Engineprotected void lockAllWrite()
protected void unlockAllWrite()
protected <A> DataOutput2 serialize(A value,
Serializer<A> serializer)
protected DataOutput2 newDataOut2()
protected <A> A deserialize(Serializer<A> serializer,
int size,
DataInput input)
throws IOException
IOExceptionpublic static Store forDB(DB db)
EngineWrappers and returns underlying Store
public static Store forEngine(Engine e)
EngineWrappers and returns underlying Store
protected int expectedMasks()
protected static int lockPos(long key)
public boolean canSnapshot()
canSnapshot in interface Engine
public Engine snapshot()
throws UnsupportedOperationException
Engine
snapshot in interface EngineUnsupportedOperationException - if snapshots are not supported/enabledEngineWrapper.canSnapshot()public void closeListenerRegister(Runnable closeListener)
closeListenerRegister in interface Enginepublic void closeListenerUnregister(Runnable closeListener)
closeListenerUnregister in interface Engine
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||