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) |
protected final String name
protected AbstractExternalCacheRequestContext(ExternalCacheKeyGenerator keyGenerator, String name, Supplier<String> partitionSupplier)
protected abstract long cacheVersion()
protected void clearKeyMaps()
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 recordValue(String internalKey, CompletionStage<Optional<V>> outcome)
public CompletionStage<Optional<V>> computeValue(String key, BiFunction<String,CompletionStage<Optional<V>>,CompletionStage<Optional<V>>> doCompute)
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.