public interface VCacheLifecycleManager
Handlers need to be provided to applicationSetup(String, Function, Function). These handlers
are called whenever a cache is about to be configured by the VCache implementation. Using these hooks, the
host application can:
JvmCache
is being created.
RuntimeException. The
VCache implementation will propagate these exceptions to the original caller.
| Modifier and Type | Method and Description |
|---|---|
void |
applicationSetup(String productIdentifier,
Function<JvmCacheDetails,JvmCacheSettings> jvmCacheCreationHandler,
Function<ExternalCacheDetails,ExternalCacheSettings> externalCacheCreationHandler)
To be called when the host application is being setup.
|
void |
applicationTeardown()
To be called when the host application is being shutdown.
|
int |
currentRequestCount()
Returns the current number of requests in progress.
|
boolean |
isRequestInProgress()
Returns whether a request is currently in progress for this thread.
|
CacheMetrics |
requestTeardown()
To be called after a thread has performed a request (unit of work).
|
void applicationSetup(String productIdentifier, Function<JvmCacheDetails,JvmCacheSettings> jvmCacheCreationHandler, Function<ExternalCacheDetails,ExternalCacheSettings> externalCacheCreationHandler)
IllegalStateException - if this method is called multiple times.void applicationTeardown()
currentRequestCount()
beforehand to check whether any requests are currently in progress.int currentRequestCount()
boolean isRequestInProgress()
@Nonnull CacheMetrics requestTeardown()
Copyright © 2015 Atlassian. All rights reserved.