public class GridH2KeyValueRowOffheap extends GridH2AbstractKeyValueRow
desc, expirationTime, KEY_COL, VAL_COL, VAL_STR_IDXSTATE_INSERTED, STATE_NEW, STATE_REJECTED| Constructor and Description |
|---|
GridH2KeyValueRowOffheap(GridH2RowDescriptor desc,
long ptr) |
GridH2KeyValueRowOffheap(GridH2RowDescriptor desc,
Object key,
int keyType,
Object val,
int valType,
long expirationTime)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cache()
Caches this row for reuse.
|
void |
decrementRefCount() |
long |
expirationTime() |
byte |
finishInsert(boolean success)
Sets whether insert failed due to unique index violation.
|
protected org.h2.value.Value |
getOffheapValue(int col) |
void |
incrementRefCount() |
void |
onSwap()
Should be called to remove reference on value.
|
void |
onUnswap(Object val)
Should be called when entry getting unswapped.
|
long |
pointer() |
protected byte |
refreshState()
Refreshes state.
|
protected org.h2.value.Value |
syncValue() |
protected org.h2.value.Value |
updateWeakValue(org.h2.value.Value exp,
org.h2.value.Value upd)
Atomically updates weak value.
|
getColumnCount, getCopy, getKey, getValue, setDeleted, setKey, setKeyAndVersion, setSessionId, setVersion, toStringwaitInsertCompletecommit, getByteCount, getMemory, getSessionId, getValueList, getVersion, isDeleted, isEmpty, setValuepublic GridH2KeyValueRowOffheap(GridH2RowDescriptor desc, long ptr)
desc - Row descriptor.ptr - Pointer.public GridH2KeyValueRowOffheap(GridH2RowDescriptor desc, Object key, int keyType, @Nullable Object val, int valType, long expirationTime) throws org.gridgain.grid.spi.GridSpiException
desc - Row descriptor.key - Key.keyType - Key type.val - Value.valType - Value type.expirationTime - Expiration time.org.gridgain.grid.spi.GridSpiException - If failed.public long expirationTime()
expirationTime in class GridH2AbstractKeyValueRowprotected void cache()
cache in class GridH2AbstractKeyValueRowprotected org.h2.value.Value getOffheapValue(int col)
getOffheapValue in class GridH2AbstractKeyValueRowcol - Column.protected byte refreshState()
refreshState in class GridH2Rowpublic byte finishInsert(boolean success)
finishInsert in class GridH2Rowsuccess - Flag value.public long pointer()
public void onSwap()
throws org.gridgain.grid.GridException
onSwap in class GridH2AbstractKeyValueRoworg.gridgain.grid.spi.GridSpiException - If failed.org.gridgain.grid.GridExceptionprotected org.h2.value.Value updateWeakValue(org.h2.value.Value exp,
org.h2.value.Value upd)
updateWeakValue in class GridH2AbstractKeyValueRowexp - Expected value.upd - New value.public void onUnswap(Object val) throws org.gridgain.grid.GridException
onUnswap in class GridH2AbstractKeyValueRowval - Value.org.gridgain.grid.GridException - If failed.protected org.h2.value.Value syncValue()
syncValue in class GridH2AbstractKeyValueRowpublic void incrementRefCount()
incrementRefCount in interface org.gridgain.grid.util.offheap.unsafe.GridOffHeapSmartPointerincrementRefCount in class GridH2Rowpublic void decrementRefCount()
decrementRefCount in interface org.gridgain.grid.util.offheap.unsafe.GridOffHeapSmartPointerdecrementRefCount in class GridH2RowCopyright © 2014. All rights reserved.