V - the value typepublic abstract class AbstractExternalCacheRequestContext<V> extends Object
ExternalCache.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractExternalCacheRequestContext.DeferredOperation<V>
Represents a deferred operation.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractExternalCacheRequestContext(ExternalCacheKeyGenerator keyGenerator,
String name,
Supplier<String> partitionSupplier,
Duration lockTimeout) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract long |
cacheVersion() |
protected void |
clearKeyMaps() |
String |
externalEntryKeyFor(String internalKey) |
void |
forgetAll() |
void |
forgetAllValues() |
void |
forgetValue(String internalKey) |
VCacheLock |
getGlobalLock() |
Set<Map.Entry<String,AbstractExternalCacheRequestContext.DeferredOperation<V>>> |
getKeyedOperations() |
Optional<Optional<V>> |
getValueRecorded(String internalKey) |
boolean |
hasPendingOperations() |
boolean |
hasRemoveAll() |
String |
internalEntryKeyFor(String externalKey)
Returns the internal key for a supplied external key.
|
void |
recordPut(String internalKey,
V value,
PutPolicy policy)
Saves a new value in the value map and adds the put policy for this operation.
|
void |
recordPutPolicy(String internalKey,
V value,
PutPolicy policy)
Stores the policy for the recordPut().
|
void |
recordRemove(Iterable<String> internalKeys) |
void |
recordRemoveAll() |
void |
recordValue(String internalKey,
Optional<V> outcome) |
void |
recordValues(Map<String,V> knownValues) |
protected final String name
protected AbstractExternalCacheRequestContext(ExternalCacheKeyGenerator keyGenerator, String name, Supplier<String> partitionSupplier, Duration lockTimeout)
protected abstract long cacheVersion()
protected void clearKeyMaps()
public VCacheLock getGlobalLock()
public String internalEntryKeyFor(String externalKey)
externalEntryKeyFor(String) must have
returned the value now being specified, in the current request.externalKey - the external key previously returned by externalEntryKeyFor(String)public void forgetValue(String internalKey)
public void forgetAllValues()
public void recordPut(String internalKey, V value, PutPolicy policy)
internalKey - The internal key.value - The value to record.policy - The PutPolicy used to record this value.public void recordPutPolicy(String internalKey, V value, PutPolicy policy)
internalKey - The internal keyvalue - The value saved.policy - The PutPolicy used to record this value.public void recordRemoveAll()
public boolean hasRemoveAll()
public void forgetAll()
public Set<Map.Entry<String,AbstractExternalCacheRequestContext.DeferredOperation<V>>> getKeyedOperations()
public boolean hasPendingOperations()
Copyright © 2016 Atlassian. All rights reserved.