V - the value typepublic class GuavaStableReadExternalCache<V> extends AbstractStableReadExternalCache<V>
StableReadExternalCache.metricsRecorderlockTimeout, name| Constructor and Description |
|---|
GuavaStableReadExternalCache(String name,
com.google.common.cache.Cache<String,IdentifiedData> delegate,
Supplier<RequestContext> contextSupplier,
ExternalCacheKeyGenerator keyGenerator,
Optional<com.atlassian.marshalling.api.MarshallingPair<V>> valueMarshalling,
MetricsRecorder metricsRecorder,
Duration lockTimeout) |
| Modifier and Type | Method and Description |
|---|---|
protected Optional<V> |
directGet(String externalKey)
Performs a direct get operation against the external cache using the supplied external key.
|
protected Map<String,Optional<V>> |
directGetBulk(Set<String> externalKeys)
Performs a direct bulk get operation against the external cache using the supplied external keys.
|
protected AbstractExternalCacheRequestContext<V> |
ensureCacheContext()
Returns the cache context for the current request.
|
protected org.slf4j.Logger |
getLogger()
Returns the logging instance for the implementation class.
|
protected V |
handleCreation(String internalKey,
V candidateValue)
Handles the creation of an entry, if required.
|
protected boolean |
internalPut(String internalKey,
V value,
PutPolicy policy) |
protected void |
internalRemove(Iterable<String> internalKeys) |
protected void |
internalRemoveAll() |
protected ExternalCacheException |
mapException(Exception ex)
Maps a generic
Exception to a corresponding ExternalCacheException. |
get, get, getBulk, getBulk, put, remove, removeAllgetName, perform, performclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBulk, getBulkremovepublic GuavaStableReadExternalCache(String name, com.google.common.cache.Cache<String,IdentifiedData> delegate, Supplier<RequestContext> contextSupplier, ExternalCacheKeyGenerator keyGenerator, Optional<com.atlassian.marshalling.api.MarshallingPair<V>> valueMarshalling, MetricsRecorder metricsRecorder, Duration lockTimeout)
protected boolean internalPut(String internalKey, V value, PutPolicy policy)
internalPut in class AbstractStableReadExternalCache<V>protected void internalRemove(Iterable<String> internalKeys)
internalRemove in class AbstractStableReadExternalCache<V>protected void internalRemoveAll()
internalRemoveAll in class AbstractStableReadExternalCache<V>protected org.slf4j.Logger getLogger()
AbstractExternalCachegetLogger in class AbstractExternalCache<V>protected AbstractExternalCacheRequestContext<V> ensureCacheContext()
AbstractExternalCacheensureCacheContext in class AbstractExternalCache<V>protected V handleCreation(String internalKey, V candidateValue) throws ExecutionException, InterruptedException
AbstractStableReadExternalCachehandleCreation in class AbstractStableReadExternalCache<V>internalKey - the internal key for the entry.candidateValue - the candidate value to add, if requiredExecutionExceptionInterruptedExceptionprotected final ExternalCacheException mapException(Exception ex)
AbstractExternalCacheException to a corresponding ExternalCacheException.mapException in class AbstractExternalCache<V>protected final Optional<V> directGet(String externalKey)
AbstractStableReadExternalCachedirectGet in class AbstractStableReadExternalCache<V>protected final Map<String,Optional<V>> directGetBulk(Set<String> externalKeys)
AbstractStableReadExternalCachedirectGetBulk in class AbstractStableReadExternalCache<V>Copyright © 2019 Atlassian. All rights reserved.