Top Description Methods
javax.cache.configuration

public Interface CompleteConfiguration<K, V>

extends Configuration<K, V>, Serializable
Known Direct Implementers
javax.cache.configuration.MutableConfiguration
Type Parameters
<K>
the type of keys maintained the cache
<V>
the type of cached values
Imports
javax.cache.expiry.ExpiryPolicy, javax.cache.integration.CacheLoader, .CacheWriter, java.io.Serializable

A read-only representation of the complete JCache javax.cache.Cache configuration.

The properties provided by instances of this interface are used by javax.cache.CacheManagers to configure javax.cache.Caches.

Implementations of this interface must override Object#hashCode() and Object#equals(Object) as javax.cache.configuration.CompleteConfigurations are often compared at runtime.

Authors
Greg Luck, Yannis Cosmadopoulos, Brian Oliver
Since
1.0

Method Summary

Modifier and TypeMethod and Description
public Iterable<CacheEntryListenerConfiguration<K, V>>
public Factory<CacheLoader<K, V>>
public Factory<CacheWriter<? super K, ? super V>>
public Factory<ExpiryPolicy>
public boolean

Returns:

true if management is enabled
isManagementEnabled
()

Checks whether management is enabled on this cache.

public boolean

Returns:

true when a javax.cache.Cache is in "read-through" mode.
isReadThrough
()

Determines if a javax.cache.Cache should operate in read-through mode.

public boolean

Returns:

true if statistics collection is enabled
isStatisticsEnabled
()

Checks whether statistics collection is enabled in this cache.

public boolean

Returns:

true when a javax.cache.Cache is in "write-through" mode.
isWriteThrough
()

Determines if a javax.cache.Cache should operate in write-through mode.

Inherited from javax.cache.configuration.Configuration:
getKeyTypegetValueTypeisStoreByValue

Method Detail

getCacheEntryListenerConfigurationsback to summary
public Iterable<CacheEntryListenerConfiguration<K, V>> getCacheEntryListenerConfigurations()

Obtains the javax.cache.configuration.CacheEntryListenerConfigurations for javax.cache.event.CacheEntryListeners to be configured on a javax.cache.Cache.

Returns:Iterable<CacheEntryListenerConfiguration<K, V>>

an Iterable over the javax.cache.configuration.CacheEntryListenerConfigurations

getCacheLoaderFactoryback to summary
public Factory<CacheLoader<K, V>> getCacheLoaderFactory()

Gets the javax.cache.configuration.Factory for the javax.cache.integration.CacheLoader, if any.

A CacheLoader should be configured for "Read Through" caches to load values when a cache miss occurs using either the javax.cache.Cache#get(Object) and/or javax.cache.Cache#getAll(java.util.Set) methods.

The default value is null.

Returns:Factory<CacheLoader<K, V>>

the javax.cache.configuration.Factory for the javax.cache.integration.CacheLoader or null if none has been set.

getCacheWriterFactoryback to summary
public Factory<CacheWriter<? super K, ? super V>> getCacheWriterFactory()

Gets the javax.cache.configuration.Factory for the javax.cache.integration.CacheWriter, if any.

The default value is null.

Returns:Factory<CacheWriter<? super K, ? super V>>

the javax.cache.configuration.Factory for the javax.cache.integration.CacheWriter or null if none has been set.

getExpiryPolicyFactoryback to summary
public Factory<ExpiryPolicy> getExpiryPolicyFactory()

Gets the javax.cache.configuration.Factory for the javax.cache.expiry.ExpiryPolicy to be used for caches.

The default value is a javax.cache.configuration.Factory that will produce a javax.cache.expiry.EternalExpiryPolicy instance.

Returns:Factory<ExpiryPolicy>

the javax.cache.configuration.Factory for javax.cache.expiry.ExpiryPolicy (must not be null)

isManagementEnabledback to summary
public boolean isManagementEnabled()

Checks whether management is enabled on this cache.

The default value is false.

Returns:boolean

true if management is enabled

isReadThroughback to summary
public boolean isReadThrough()

Determines if a javax.cache.Cache should operate in read-through mode.

When in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured javax.cache.integration.CacheLoader to be invoked.

The default value is false.

Returns:boolean

true when a javax.cache.Cache is in "read-through" mode.

See Also
getCacheLoaderFactory()
isStatisticsEnabledback to summary
public boolean isStatisticsEnabled()

Checks whether statistics collection is enabled in this cache.

The default value is false.

Returns:boolean

true if statistics collection is enabled

isWriteThroughback to summary
public boolean isWriteThrough()

Determines if a javax.cache.Cache should operate in write-through mode.

When in "write-through" mode, cache updates that occur as a result of performing "put" operations called via one of javax.cache.Cache#put(Object, Object), javax.cache.Cache#getAndRemove(Object), javax.cache.Cache#removeAll(), javax.cache.Cache#getAndPut(Object, Object) javax.cache.Cache#getAndRemove(Object), javax.cache.Cache#getAndReplace(Object, Object), javax.cache.Cache#invoke(Object, javax.cache.processor.EntryProcessor, Object...), javax.cache.Cache#invokeAll(java.util.Set, javax.cache.processor.EntryProcessor, Object...) will appropriately cause the configured javax.cache.integration.CacheWriter to be invoked.

The default value is false.

Returns:boolean

true when a javax.cache.Cache is in "write-through" mode.

See Also
getCacheWriterFactory()