Package | Description |
---|---|
org.cache2k |
API package for cache2k Java caching library.
|
Modifier and Type | Method and Description |
---|---|
Cache2kBuilder<K,V> |
Cache2kBuilder.addAsyncListener(CacheEntryOperationListener<K,V> listener)
A set of listeners.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.addListener(CacheEntryOperationListener<K,V> listener)
Add a listener.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.asyncListenerExecutor(Executor v)
Executor for asynchronous listeners.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.boostConcurrency(boolean f)
When
true , optimize for high core counts and applications that do lots of mutations
in the cache. |
Cache2kBuilder<K,V> |
Cache2kBuilder.disableLastModificationTime(boolean flag)
Disable that the last modification time is available at
CacheEntry.getLastModification() . |
Cache2kBuilder<K,V> |
Cache2kBuilder.disableStatistics(boolean flag)
By default statistic gathering is enabled.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.entryCapacity(long v)
The maximum number of entries hold by the cache.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.eternal(boolean v)
When set to
true , cached values do not expire by time. |
Cache2kBuilder<K,V> |
Cache2kBuilder.exceptionPropagator(ExceptionPropagator<K> ep)
Sets customization for propagating loader exceptions.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.expireAfterWrite(long v,
TimeUnit u)
Time duration after insert or updated an cache entry expires.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.expiryPolicy(ExpiryPolicy<K,V> c)
Set expiry policy to use.
|
static Cache2kBuilder |
Cache2kBuilder.forUnknownTypes()
|
Cache2kBuilder<K,V> |
Cache2kBuilder.keepDataAfterExpired(boolean v)
Expired data is kept in the cache until the entry is evicted.
|
<K2> Cache2kBuilder<K2,V> |
Cache2kBuilder.keyType(CacheType<K2> t)
The used type of the cache key.
|
<K2> Cache2kBuilder<K2,V> |
Cache2kBuilder.keyType(Class<K2> t)
The used type of the cache key.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.loader(AdvancedCacheLoader<K,V> l)
Enables read through operation and sets a cache loader that provides the the
cached data.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.loader(CacheLoader<K,V> l)
Enables read through operation and sets a cache loader that provides the the
cached data.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.loader(FunctionalCacheLoader<K,V> l)
Enables read through operation and sets a cache loader that provides the the
cached data.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.loaderExecutor(Executor v)
Thread pool / executor service to use for asynchronous load operations.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.loaderThreadCount(int v)
If no separate executor is set via
loaderExecutor(Executor) the cache will
create a separate thread pool used exclusively by it. |
Cache2kBuilder<K,V> |
Cache2kBuilder.manager(CacheManager manager)
The manager, the created cache will belong to.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.maxRetryInterval(long v,
TimeUnit u)
If a loader exception happens, this is the maximum time interval after a
retry attempt is made.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.name(Class<?> _class)
Sets a cache name from the fully qualified class name.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.name(Class<?> _class,
String _fieldName)
Constructs a cache name out of the class name and field name.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.name(String v)
Sets the name of a cache.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.name(String _uniqueName,
Class<?> _class,
String _fieldName)
Constructs a cache name out of the class name, a field name and a unique name identifying the
component in the application.
|
static <K,T> Cache2kBuilder<K,T> |
Cache2kBuilder.of(Cache2kConfiguration<K,T> c)
Create a builder from the configuration.
|
static <K,T> Cache2kBuilder<K,T> |
Cache2kBuilder.of(Class<K> _keyType,
Class<T> _valueType)
Create a new cache builder for key and value types of classes with no generic parameters.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.permitNullValues(boolean flag)
When
true , null values are allowed in the cache. |
Cache2kBuilder<K,V> |
Cache2kBuilder.prefetchExecutor(Executor v)
Thread pool / executor service to use for refresh ahead and prefetch operations.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.refreshAhead(boolean f)
When true, enable background refresh / refresh ahead.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.resilienceDuration(long v,
TimeUnit u)
Time span the cache will suppress loader exceptions if a value is available from
a previous load.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.resiliencePolicy(ResiliencePolicy<K,V> v)
Sets a custom resilience policy to control the cache behavior in the presence
of exceptions from the loader.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.retryInterval(long v,
TimeUnit u)
If a loader exception happens, this is the time interval after a
retry attempt is made.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.sharpExpiry(boolean f)
By default the expiry time is not exact, which means, a value might be visible a few
milliseconds after the time of expiry.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.storeByReference(boolean v)
Ensure that the cache value is stored via direct object reference and that
no serialization takes place.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.strictEviction(boolean flag)
To increase performance cache2k optimizes the eviction and does eviction in
greater chunks.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.suppressExceptions(boolean v)
Suppress an exception from the cache loader, if there is previous data.
|
<T2> Cache2kBuilder<K,T2> |
Cache2kBuilder.valueType(CacheType<T2> t)
Sets the value type to use.
|
<T2> Cache2kBuilder<K,T2> |
Cache2kBuilder.valueType(Class<T2> t)
Sets the value type to use.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.with(ConfigurationSectionBuilder<? extends ConfigurationSection>... sectionBuilders)
Add a new configuration sub section.
|
Cache2kBuilder<K,V> |
Cache2kBuilder.writer(CacheWriter<K,V> w)
Enables write through operation and sets a writer customization that gets
called synchronously upon cache mutations.
|
cache2k API documentation. Copyright © 2000–2017 headissue GmbH, Munich.