V - the value typepublic abstract class AbstractExternalCache<V> extends Object implements ExternalCache<V>
ExternalCache instances.| Modifier and Type | Field and Description |
|---|---|
protected Duration |
lockTimeout |
protected String |
name |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractExternalCache(String name,
Duration lockTimeout,
ExternalCacheExceptionListener externalCacheExceptionListener) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract AbstractExternalCacheRequestContext<V> |
ensureCacheContext()
Returns the cache context for the current request.
|
protected abstract org.slf4j.Logger |
getLogger()
Returns the logging instance for the implementation class.
|
String |
getName()
The name of the cache, uniquely identifies this cache.
|
protected abstract ExternalCacheException |
mapException(Exception ex)
Maps a generic
Exception to a corresponding ExternalCacheException. |
protected <T> CompletionStage<T> |
perform(Callable<T> txn)
Performs a transaction and handles all the standard exceptions that may occur.
|
protected <T> CompletionStage<T> |
perform(Callable<T> txn,
Consumer<T> successHandler)
Performs a transaction and handles all the standard exceptions that may occur.
|
protected AbstractExternalCache(String name, Duration lockTimeout, ExternalCacheExceptionListener externalCacheExceptionListener)
protected abstract AbstractExternalCacheRequestContext<V> ensureCacheContext()
protected abstract org.slf4j.Logger getLogger()
protected abstract ExternalCacheException mapException(Exception ex)
Exception to a corresponding ExternalCacheException.public final String getName()
VCacheprotected <T> CompletionStage<T> perform(Callable<T> txn)
T - the return typetxn - the transaction the performCompletionStage representing the outcome of performing the transaction.protected <T> CompletionStage<T> perform(Callable<T> txn, Consumer<T> successHandler)
T - the return typetxn - the transaction the performsuccessHandler - called if the txn is successfulCompletionStage representing the outcome of performing the transaction.Copyright © 2019 Atlassian. All rights reserved.