@MXBean public interface CacheMXBean
Each cache's management object must be registered with an ObjectName that is unique and has the following type and attributes:
Type:
javax.cache:type=CacheConfiguration
Required Attributes:
Modifier and Type | Method | Description |
---|---|---|
String |
getKeyType() |
Determines the required type of keys for this
Cache , if any. |
String |
getValueType() |
Determines the required type of values for this
Cache , if any. |
boolean |
isManagementEnabled() |
Checks whether management is enabled on this cache.
|
boolean |
isReadThrough() |
Determines if a
Cache should operate in read-through mode. |
boolean |
isStatisticsEnabled() |
Checks whether statistics collection is enabled in this cache.
|
boolean |
isStoreByValue() |
Whether storeByValue (true) or storeByReference (false).
|
boolean |
isWriteThrough() |
Determines if a
Cache should operate in "write-through"
mode. |
String getKeyType()
Cache
, if any.String getValueType()
Cache
, if any.boolean isReadThrough()
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" call via one of
Cache.get(K)
,
Cache.getAll(java.util.Set<? extends K>)
,
Cache.getAndRemove(K)
and/or
Cache.getAndReplace(K, V)
will appropriately
cause the configured CacheLoader
to be
invoked.
The default value is false
.
true
when a Cache
is in
"read-through" mode.CacheLoader
boolean isWriteThrough()
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
Cache.put(K, V)
,
Cache.getAndRemove(K)
,
Cache.removeAll(java.util.Set<? extends K>)
,
Cache.getAndPut(K, V)
Cache.getAndRemove(K)
,
Cache.getAndReplace(K, V)
,
Cache.invoke(K, javax.cache.processor.EntryProcessor<K, V, T>, java.lang.Object...)
Cache.invokeAll(java.util.Set<? extends K>, javax.cache.processor.EntryProcessor<K, V, T>, java.lang.Object...)
will appropriately cause the configured CacheWriter
to be invoked.
The default value is false
.
true
when a Cache
is in "write-through" mode.CacheWriter
boolean 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
.
boolean isStatisticsEnabled()
The default value is false
.
boolean isManagementEnabled()
The default value is false
.
Copyright © 2017. All rights reserved.