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 and Description |
|---|---|
| public Class | Returns: the key type orObject.class if the type is undefinedDetermines the required type of keys for |
| public Class | Returns: the value type orObject.class if the type is undefinedDetermines the required type of values for |
| public boolean | Returns: true if the cache is store by valueWhether storeByValue (true) or storeByReference (false). |
| getKeyType | back to summary |
|---|---|
| public Class Determines the required type of keys for
| |
| getValueType | back to summary |
|---|---|
| public Class Determines the required type of values for
| |
| isStoreByValue | back to summary |
|---|---|
| public boolean isStoreByValue() Whether storeByValue (true) or storeByReference (false). When true, both keys and values are stored by value. 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
| |