K - the type of keys maintained the cacheV - the type of cached valuesSerializableCompleteConfiguration<K,V>MutableConfigurationpublic interface Configuration<K,V> extends Serializable
Cache configuration.
The properties provided by instances of this interface are used by
CacheManagers to configure Caches.
Implementations of this interface must override Object.hashCode() and
Object.equals(Object) as Configurations are often compared at
runtime.
| Modifier and Type | Method | Description |
|---|---|---|
Class<K> |
getKeyType() |
Determines the required type of keys for
Caches configured
with this Configuration. |
Class<V> |
getValueType() |
Determines the required type of values for
Caches configured
with this Configuration. |
boolean |
isStoreByValue() |
Whether storeByValue (true) or storeByReference (false).
|
Class<K> getKeyType()
Caches configured
with this Configuration.Object.class if the type is undefinedClass<V> getValueType()
Caches configured
with this Configuration.Object.class if the type is undefinedboolean isStoreByValue()
When false, both keys and values are stored by reference. Caches stored by reference are capable of mutation by any threads holding the reference. The effects are:
When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.
The default value is true.
Copyright © 2017. All rights reserved.