K
- the type of keys maintained the cacheV
- the type of cached valuesSerializable
CompleteConfiguration<K,V>
MutableConfiguration
public interface Configuration<K,V> extends Serializable
Cache
configuration.
The properties provided by instances of this interface are used by
CacheManager
s to configure Cache
s.
Implementations of this interface must override Object.hashCode()
and
Object.equals(Object)
as Configuration
s are often compared at
runtime.
Modifier and Type | Method | Description |
---|---|---|
Class<K> |
getKeyType() |
Determines the required type of keys for
Cache s configured
with this Configuration . |
Class<V> |
getValueType() |
Determines the required type of values for
Cache s configured
with this Configuration . |
boolean |
isStoreByValue() |
Whether storeByValue (true) or storeByReference (false).
|
Class<K> getKeyType()
Cache
s configured
with this Configuration
.Object.class
if the type is undefinedClass<V> getValueType()
Cache
s 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.