public class OffHeapBufferHalfStorageEngine<T> extends PortabilityBasedHalfStorageEngine<T> implements OffHeapStorageArea.Owner
| Constructor and Description |
|---|
OffHeapBufferHalfStorageEngine(PageSource source,
int initialPageSize,
int maximalPageSize,
Portability<? super T> portability,
boolean thief,
boolean victim) |
OffHeapBufferHalfStorageEngine(PageSource source,
int pageSize,
Portability<? super T> portability) |
OffHeapBufferHalfStorageEngine(PageSource source,
int pageSize,
Portability<? super T> portability,
boolean thief,
boolean victim) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(StorageEngine.Owner o,
long m) |
void |
clear()
Called to indicate that all keys and values are now free.
|
static <T> Factory<OffHeapBufferHalfStorageEngine<T>> |
createFactory(PageSource source,
int initialPageSize,
int maximalPageSize,
Portability<? super T> portability,
boolean thief,
boolean victim) |
static <T> Factory<OffHeapBufferHalfStorageEngine<T>> |
createFactory(PageSource source,
int pageSize,
Portability<? super T> portability) |
static <T> Factory<OffHeapBufferHalfStorageEngine<T>> |
createFactory(PageSource source,
int pageSize,
Portability<? super T> portability,
boolean thief,
boolean victim) |
void |
destroy() |
Collection<Long> |
evictAtAddress(long address,
boolean shrink) |
void |
free(int address)
Called to indicate that the associated encoded value is no longer needed.
|
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.
|
long |
getOccupiedMemory()
Returns a measure of the amount of memory consumed by this storage engine.
|
long |
getVitalMemory()
Returns a measure of the amount of vital memory allocated for this storage engine.
|
boolean |
isThief() |
boolean |
moved(long from,
long to) |
protected ByteBuffer |
readBuffer(int address) |
boolean |
shrink() |
int |
sizeOf(long address) |
String |
toString() |
protected Integer |
writeBuffer(ByteBuffer buffer,
int hash) |
Lock |
writeLock() |
equals, invalidateCache, read, writepublic OffHeapBufferHalfStorageEngine(PageSource source, int pageSize, Portability<? super T> portability)
public OffHeapBufferHalfStorageEngine(PageSource source, int pageSize, Portability<? super T> portability, boolean thief, boolean victim)
public OffHeapBufferHalfStorageEngine(PageSource source, int initialPageSize, int maximalPageSize, Portability<? super T> portability, boolean thief, boolean victim)
public static <T> Factory<OffHeapBufferHalfStorageEngine<T>> createFactory(PageSource source, int pageSize, Portability<? super T> portability)
public static <T> Factory<OffHeapBufferHalfStorageEngine<T>> createFactory(PageSource source, int pageSize, Portability<? super T> portability, boolean thief, boolean victim)
public static <T> Factory<OffHeapBufferHalfStorageEngine<T>> createFactory(PageSource source, int initialPageSize, int maximalPageSize, Portability<? super T> portability, boolean thief, boolean victim)
public void clear()
HalfStorageEngineclear in interface HalfStorageEngine<T>public void free(int address)
HalfStorageEngineThis call can be used to free any associated resources tied to the lifecycle of the supplied encoded value.
free in interface HalfStorageEngine<T>free in class PortabilityBasedHalfStorageEngine<T>address - encoded valueprotected ByteBuffer readBuffer(int address)
readBuffer in class PortabilityBasedHalfStorageEngine<T>protected Integer writeBuffer(ByteBuffer buffer, int hash)
writeBuffer in class PortabilityBasedHalfStorageEngine<T>public long getAllocatedMemory()
HalfStorageEnginegetAllocatedMemory in interface HalfStorageEngine<T>public long getOccupiedMemory()
HalfStorageEnginegetOccupiedMemory in interface HalfStorageEngine<T>public long getVitalMemory()
HalfStorageEnginegetVitalMemory in interface HalfStorageEngine<T>public long getDataSize()
HalfStorageEnginegetDataSize in interface HalfStorageEngine<T>public void bind(StorageEngine.Owner o, long m)
bind in interface HalfStorageEngine<T>public void destroy()
destroy in interface HalfStorageEngine<T>public boolean shrink()
shrink in interface HalfStorageEngine<T>public Collection<Long> evictAtAddress(long address, boolean shrink)
evictAtAddress in interface OffHeapStorageArea.Ownerpublic Lock writeLock()
writeLock in interface OffHeapStorageArea.Ownerpublic boolean isThief()
isThief in interface OffHeapStorageArea.Ownerpublic boolean moved(long from,
long to)
moved in interface OffHeapStorageArea.Ownerpublic int sizeOf(long address)
sizeOf in interface OffHeapStorageArea.OwnerCopyright © 2015–2024. All rights reserved.