public class FileBackedStorageEngine<K,V> extends PortabilityBasedStorageEngine<K,V> implements PersistentStorageEngine<K,V>
StorageEngine.OwnerkeyPortability, valuePortability| Constructor and Description |
|---|
FileBackedStorageEngine(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability) |
FileBackedStorageEngine(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
boolean bootstrap) |
FileBackedStorageEngine(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
ExecutorService writer) |
FileBackedStorageEngine(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
ExecutorService writer,
boolean bootstrap) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(StorageEngine.Owner m) |
void |
bootstrap(ObjectInput input) |
protected void |
clearInternal() |
void |
close() |
static <K,V> Factory<FileBackedStorageEngine<K,V>> |
createFactory(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability) |
static <K,V> Factory<FileBackedStorageEngine<K,V>> |
createFactory(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
boolean bootstrap) |
static <K,V> Factory<FileBackedStorageEngine<K,V>> |
createFactory(MappedPageSource source,
long maxChunkSize,
MemoryUnit maxChunkUnit,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
Factory<? extends ExecutorService> executorFactory,
boolean bootstrap) |
void |
destroy() |
void |
flush() |
protected void |
free(long address) |
long |
getAllocatedMemory()
Returns a measure of the amount of memory allocated for this storage engine.
|
long |
getDataSize()
Returns a measure of the total size of the keys and values stored in this storage engine.
|
protected WriteContext |
getKeyWriteContext(long address) |
long |
getOccupiedMemory()
Returns a measure of the amount of memory consumed by this storage engine.
|
protected WriteContext |
getValueWriteContext(long address) |
long |
getVitalMemory()
Returns a measure of the amount of vital memory allocated for this storage engine.
|
void |
persist(ObjectOutput output) |
protected ByteBuffer |
readKeyBuffer(long address) |
int |
readKeyHash(long address) |
protected ByteBuffer |
readValueBuffer(long address) |
boolean |
shrink() |
protected Long |
writeMappingBuffers(ByteBuffer keyBuffer,
ByteBuffer valueBuffer,
int hash) |
attachedMapping, clear, equalsBinaryKey, equalsKey, equalsValue, freeMapping, invalidateCache, readBinaryKey, readBinaryValue, readKey, readValue, writeBinaryMapping, writeBinaryMapping, writeMapping, writeMappingBuffersGatheringfireCleared, fireCopied, fireFreed, fireRecovered, fireWritten, hasListeners, hasRecoveryListeners, registerListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitattachedMapping, clear, equalsKey, equalsValue, freeMapping, invalidateCache, readKey, readValue, writeMappingpublic FileBackedStorageEngine(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability)
public FileBackedStorageEngine(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability, ExecutorService writer)
public FileBackedStorageEngine(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability, boolean bootstrap)
public FileBackedStorageEngine(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability, ExecutorService writer, boolean bootstrap)
public static <K,V> Factory<FileBackedStorageEngine<K,V>> createFactory(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability)
public static <K,V> Factory<FileBackedStorageEngine<K,V>> createFactory(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability, boolean bootstrap)
public static <K,V> Factory<FileBackedStorageEngine<K,V>> createFactory(MappedPageSource source, long maxChunkSize, MemoryUnit maxChunkUnit, Portability<? super K> keyPortability, Portability<? super V> valuePortability, Factory<? extends ExecutorService> executorFactory, boolean bootstrap)
protected void clearInternal()
clearInternal in class PortabilityBasedStorageEngine<K,V>public void destroy()
destroy in interface StorageEngine<K,V>public void flush()
throws IOException
flush in interface PersistentIOExceptionpublic void close()
throws IOException
close in interface PersistentIOExceptionpublic void persist(ObjectOutput output) throws IOException
persist in interface PersistentIOExceptionpublic void bootstrap(ObjectInput input) throws IOException
bootstrap in interface PersistentIOExceptionprotected void free(long address)
free in class PortabilityBasedStorageEngine<K,V>protected ByteBuffer readKeyBuffer(long address)
readKeyBuffer in class PortabilityBasedStorageEngine<K,V>protected WriteContext getKeyWriteContext(long address)
getKeyWriteContext in class PortabilityBasedStorageEngine<K,V>protected ByteBuffer readValueBuffer(long address)
readValueBuffer in class PortabilityBasedStorageEngine<K,V>protected WriteContext getValueWriteContext(long address)
getValueWriteContext in class PortabilityBasedStorageEngine<K,V>protected Long writeMappingBuffers(ByteBuffer keyBuffer, ByteBuffer valueBuffer, int hash)
writeMappingBuffers in class PortabilityBasedStorageEngine<K,V>public long getAllocatedMemory()
StorageEnginegetAllocatedMemory in interface StorageEngine<K,V>public long getOccupiedMemory()
StorageEnginegetOccupiedMemory in interface StorageEngine<K,V>public long getVitalMemory()
StorageEnginegetVitalMemory in interface StorageEngine<K,V>public long getDataSize()
StorageEnginegetDataSize in interface StorageEngine<K,V>public boolean shrink()
shrink in interface StorageEngine<K,V>public void bind(StorageEngine.Owner m)
bind in interface StorageEngine<K,V>public int readKeyHash(long address)
readKeyHash in interface BinaryStorageEngineCopyright © 2015–2024. All rights reserved.