|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.offheapstore.storage.PortabilityBasedHalfStorageEngine<T>
org.terracotta.offheapstore.storage.OffHeapBufferHalfStorageEngine<T>
public class OffHeapBufferHalfStorageEngine<T>
| Constructor Summary | |
|---|---|
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)
|
|
| Method Summary | ||
|---|---|---|
void |
bind(StorageEngine.Owner o,
long m)
|
|
void |
clear()
Called to indicate that all keys and values are now free. |
|
static
|
createFactory(PageSource source,
int initialPageSize,
int maximalPageSize,
Portability<? super T> portability,
boolean thief,
boolean victim)
|
|
static
|
createFactory(PageSource source,
int pageSize,
Portability<? super T> portability)
|
|
static
|
createFactory(PageSource source,
int pageSize,
Portability<? super T> portability,
boolean thief,
boolean victim)
|
|
void |
destroy()
|
|
boolean |
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()
|
|
| Methods inherited from class org.terracotta.offheapstore.storage.PortabilityBasedHalfStorageEngine |
|---|
equals, invalidateCache, read, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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)
| Method Detail |
|---|
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()
HalfStorageEngine
clear 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()
HalfStorageEngine
getAllocatedMemory in interface HalfStorageEngine<T>public long getOccupiedMemory()
HalfStorageEngine
getOccupiedMemory in interface HalfStorageEngine<T>public long getVitalMemory()
HalfStorageEngine
getVitalMemory in interface HalfStorageEngine<T>public long getDataSize()
HalfStorageEngine
getDataSize in interface HalfStorageEngine<T>public String toString()
toString in class Object
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 boolean evictAtAddress(long address,
boolean shrink)
evictAtAddress in interface OffHeapStorageArea.Ownerpublic Lock writeLock()
writeLock in interface OffHeapStorageArea.Ownerpublic boolean isThief()
isThief in interface OffHeapStorageArea.Owner
public boolean moved(long from,
long to)
moved in interface OffHeapStorageArea.Ownerpublic int sizeOf(long address)
sizeOf in interface OffHeapStorageArea.Owner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||