public abstract class KCVSCache extends KCVSProxy
| Modifier and Type | Field and Description |
|---|---|
static List<Entry> |
NO_DELETIONS |
NO_ADDITIONS| Modifier | Constructor and Description |
|---|---|
protected |
KCVSCache(KeyColumnValueStore store,
String metricsName) |
protected KCVSCache(KeyColumnValueStore store, String metricsName)
protected boolean hasValidateKeysOnly()
protected void incActionBy(int by,
CacheMetricsAction action,
StoreTransaction txh)
public abstract void clearCache()
protected abstract void invalidate(StaticBuffer key, List<CachableStaticBuffer> entries)
public void mutate(StaticBuffer key, List<Entry> additions, List<StaticBuffer> deletions, StoreTransaction txh) throws BackendException
KeyColumnValueStoretxh from previous calls to
KeyColumnValueStore.acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)
, then writes supplied additions and/or deletions to
key in the underlying data store. Deletions are applied strictly
before additions. In other words, if both an addition and deletion are
supplied for the same column, then the column will first be deleted and
then the supplied Entry for the column will be added.
Implementations which don't support locking should skip the initial lock
verification step but otherwise behave as described above.mutate in interface KeyColumnValueStoremutate in class KCVSProxykey - the key under which the columns in additions and
deletions will be writtenadditions - the list of Entry instances representing column-value pairs to
create under key, or null to add no column-value pairsdeletions - the list of columns to delete from key, or null to
delete no columnstxh - the transaction to usePermanentLockingException - if locking is supported by the implementation and at least
one lock acquisition attempted by
KeyColumnValueStore.acquireLock(StaticBuffer, StaticBuffer, StaticBuffer, StoreTransaction)
has failedBackendExceptionpublic void mutateEntries(StaticBuffer key, List<Entry> additions, List<Entry> deletions, StoreTransaction txh) throws BackendException
BackendExceptionprotected final StoreTransaction unwrapTx(StoreTransaction txh)
public EntryList getSliceNoCache(KeySliceQuery query, StoreTransaction txh) throws BackendException
BackendExceptionpublic Map<StaticBuffer,EntryList> getSliceNoCache(List<StaticBuffer> keys, SliceQuery query, StoreTransaction txh) throws BackendException
BackendExceptionCopyright © 2012–2015. All rights reserved.