public class RestartablePartialStorageEngine<I,K,V> extends RestartableMinimalStorageEngine<I,K,V>
RestartableMinimalStorageEngine.EntryStorageEngine.OwnerkeyPortability, metadataArea, owner, valuePortability| Constructor and Description |
|---|
RestartablePartialStorageEngine(I identifier,
com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource,
boolean synchronous,
PointerSize width,
PageSource source,
int initialPageSize,
int maximalPageSize,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
boolean thief,
boolean victim,
float compressThreshold) |
RestartablePartialStorageEngine(I identifier,
com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource,
boolean synchronous,
PointerSize width,
PageSource source,
int initialPageSize,
int maximalPageSize,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
float compressThreshold) |
RestartablePartialStorageEngine(I identifier,
com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource,
boolean synchronous,
PointerSize width,
PageSource source,
int pageSize,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
boolean thief,
boolean victim,
float compressThreshold) |
RestartablePartialStorageEngine(I identifier,
com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource,
boolean synchronous,
PointerSize width,
PageSource source,
int pageSize,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
float compressThreshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(StorageEngine.Owner owner) |
void |
clear()
Called to indicate that all keys and values are now free.
|
static <I,K,V> Factory<RestartablePartialStorageEngine<I,K,V>> |
createPartialFactory(I identifier,
com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource,
boolean synchronous,
PointerSize width,
PageSource source,
int initialPageSize,
int maximalPageSize,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
boolean thief,
boolean victim,
float compressThreshold) |
static <I,K,V> Factory<RestartablePartialStorageEngine<I,K,V>> |
createPartialFactory(I identifier,
com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource,
boolean synchronous,
PointerSize width,
PageSource source,
int pageSize,
Portability<? super K> keyPortability,
Portability<? super V> valuePortability,
boolean thief,
boolean victim,
float compressThreshold) |
void |
destroy() |
boolean |
equalsBinaryKey(ByteBuffer probeBinaryKey,
long encoding) |
boolean |
equalsKey(Object key,
long encoding)
Called to determine the equality of the given object against the
given encoded form.
|
boolean |
equalsValue(Object value,
long encoding)
Called to determine the equality of the given Java object value against the
given encoded form.
|
void |
freeMapping(long encoding,
int hash,
boolean removal)
Called to indicate that the associated encoded value is no longer needed.
|
protected int |
getActualEntrySize(long encoding) |
long |
getAllocatedMemory()
Returns a measure of the amount of memory allocated for this storage engine.
|
long |
getOccupiedMemory()
Returns a measure of the amount of memory consumed by this storage engine.
|
protected int |
getRequiredEntrySize(ByteBuffer binaryKey,
ByteBuffer binaryValue) |
ByteBuffer |
readBinaryKey(long encoding) |
ByteBuffer |
readBinaryValue(long encoding) |
K |
readKey(long encoding,
int hashcode)
Converts the supplied encoded key into its correct object form.
|
V |
readValue(long encoding)
Converts the supplied encoded value into its correct object form.
|
boolean |
shrink() |
Long |
writeBinaryMapping(ByteBuffer[] binaryKey,
ByteBuffer[] binaryValue,
int pojoHash,
int metadata) |
Long |
writeBinaryMapping(ByteBuffer binaryKey,
ByteBuffer binaryValue,
int pojoHash,
int metadata) |
Long |
writeMapping(K key,
V value,
int hash,
int metadata)
Converts the supplied key and value objects into their encoded form.
|
acquireCompactionEntry, assignLsn, attachedMapping, createMinimalFactory, createMinimalFactory, deriveMetadata, detach, equalsBinaryKey, firstEncoding, getDataSize, getLowestLsn, getLsn, getVitalMemory, invalidateCache, lastEncoding, linkNodeExpectingFirst, linkNodeExpectingLast, put, readEntry, readKeyHash, releaseCompactionEntry, remove, replayPut, size, sizeInBytes, unlinkNode, updateLsn, validChain, writePartialEntryfireCleared, fireCopied, fireFreed, fireRecovered, fireWritten, hasListeners, hasRecoveryListeners, registerListenerpublic RestartablePartialStorageEngine(I identifier, com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource, boolean synchronous, PointerSize width, PageSource source, int pageSize, Portability<? super K> keyPortability, Portability<? super V> valuePortability, float compressThreshold)
public RestartablePartialStorageEngine(I identifier, com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource, boolean synchronous, PointerSize width, PageSource source, int initialPageSize, int maximalPageSize, Portability<? super K> keyPortability, Portability<? super V> valuePortability, float compressThreshold)
public RestartablePartialStorageEngine(I identifier, com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource, boolean synchronous, PointerSize width, PageSource source, int pageSize, Portability<? super K> keyPortability, Portability<? super V> valuePortability, boolean thief, boolean victim, float compressThreshold)
public RestartablePartialStorageEngine(I identifier, com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource, boolean synchronous, PointerSize width, PageSource source, int initialPageSize, int maximalPageSize, Portability<? super K> keyPortability, Portability<? super V> valuePortability, boolean thief, boolean victim, float compressThreshold)
public static <I,K,V> Factory<RestartablePartialStorageEngine<I,K,V>> createPartialFactory(I identifier, com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource, boolean synchronous, PointerSize width, PageSource source, int pageSize, Portability<? super K> keyPortability, Portability<? super V> valuePortability, boolean thief, boolean victim, float compressThreshold)
public static <I,K,V> Factory<RestartablePartialStorageEngine<I,K,V>> createPartialFactory(I identifier, com.terracottatech.frs.RestartStore<I,ByteBuffer,ByteBuffer> transactionSource, boolean synchronous, PointerSize width, PageSource source, int initialPageSize, int maximalPageSize, Portability<? super K> keyPortability, Portability<? super V> valuePortability, boolean thief, boolean victim, float compressThreshold)
public Long writeMapping(K key, V value, int hash, int metadata)
StorageEnginewriteMapping in interface StorageEngine<K,V>writeMapping in class RestartableMinimalStorageEngine<I,K,V>key - a key objectvalue - a value objecthash - the key hashmetadata - the metadata bitspublic Long writeBinaryMapping(ByteBuffer binaryKey, ByteBuffer binaryValue, int pojoHash, int metadata)
writeBinaryMapping in interface BinaryStorageEnginewriteBinaryMapping in class RestartableMinimalStorageEngine<I,K,V>public Long writeBinaryMapping(ByteBuffer[] binaryKey, ByteBuffer[] binaryValue, int pojoHash, int metadata)
writeBinaryMapping in interface BinaryStorageEnginewriteBinaryMapping in class RestartableMinimalStorageEngine<I,K,V>protected int getRequiredEntrySize(ByteBuffer binaryKey, ByteBuffer binaryValue)
getRequiredEntrySize in class RestartableMinimalStorageEngine<I,K,V>protected int getActualEntrySize(long encoding)
getActualEntrySize in class RestartableMinimalStorageEngine<I,K,V>public void freeMapping(long encoding,
int hash,
boolean removal)
StorageEngineThis call can be used to free any associated resources tied to the lifecycle of the supplied encoded value.
freeMapping in interface StorageEngine<K,V>freeMapping in class RestartableMinimalStorageEngine<I,K,V>encoding - encoded valuehash - hash of the freed mappingremoval - marks removal from a mappublic V readValue(long encoding)
StorageEnginereadValue in interface StorageEngine<K,V>readValue in class RestartableMinimalStorageEngine<I,K,V>encoding - encoded valuepublic boolean equalsValue(Object value, long encoding)
StorageEngine
Simple implementations will probably perform a decode on the given encoded
form in order to do a regular Object.equals(Object) comparison.
This method is provided to allow implementations to optimize this
comparison if possible.
equalsValue in interface StorageEngine<K,V>equalsValue in class RestartableMinimalStorageEngine<I,K,V>value - a value objectencoding - encoded valuetrue if the value and the encoding are equalpublic K readKey(long encoding, int hashcode)
StorageEnginereadKey in interface StorageEngine<K,V>readKey in class RestartableMinimalStorageEngine<I,K,V>encoding - encoded keyhashcode - hash-code of the decoded keypublic boolean equalsKey(Object key, long encoding)
StorageEngine
Simple implementations will probably perform a decode on the given encoded
form in order to do a regular Object.equals(Object) comparison.
This method is provided to allow implementations to optimize this
comparison if possible.
equalsKey in interface StorageEngine<K,V>equalsKey in class RestartableMinimalStorageEngine<I,K,V>key - a key objectencoding - encoded valuetrue if the key and the encoding are equalpublic boolean equalsBinaryKey(ByteBuffer probeBinaryKey, long encoding)
equalsBinaryKey in interface BinaryStorageEngineequalsBinaryKey in class RestartableMinimalStorageEngine<I,K,V>public void clear()
StorageEngineclear in interface StorageEngine<K,V>clear in class RestartableMinimalStorageEngine<I,K,V>public long getAllocatedMemory()
StorageEnginegetAllocatedMemory in interface StorageEngine<K,V>getAllocatedMemory in class RestartableMinimalStorageEngine<I,K,V>public long getOccupiedMemory()
StorageEnginegetOccupiedMemory in interface StorageEngine<K,V>getOccupiedMemory in class RestartableMinimalStorageEngine<I,K,V>public void bind(StorageEngine.Owner owner)
bind in interface StorageEngine<K,V>bind in class RestartableMinimalStorageEngine<I,K,V>public void destroy()
destroy in interface StorageEngine<K,V>destroy in class RestartableMinimalStorageEngine<I,K,V>public boolean shrink()
shrink in interface StorageEngine<K,V>shrink in class RestartableMinimalStorageEngine<I,K,V>public ByteBuffer readBinaryKey(long encoding)
readBinaryKey in interface BinaryStorageEnginereadBinaryKey in class RestartableMinimalStorageEngine<I,K,V>public ByteBuffer readBinaryValue(long encoding)
readBinaryValue in interface BinaryStorageEnginereadBinaryValue in class RestartableMinimalStorageEngine<I,K,V>Copyright © 2015–2024. All rights reserved.