Top Description Fields Methods
net.sf.ehcache.hibernate.management.api

public Interface EhcacheStats

extends NotificationEmitter
Known Direct Subinterfaces
net.sf.ehcache.hibernate.management.api.EhcacheHibernateMBean
Known Direct Implementers
net.sf.ehcache.hibernate.management.impl.EhcacheStatsImpl
Imports
java.util.Map, javax.management.NotificationEmitter

Interface for ehcache related statistics of hibernate second level cache

Author
Abhishek Sanoujam

Field Summary

Modifier and TypeField and Description
public static final String
CACHE_ENABLED

CACHE_ENABLED

public static final String
CACHE_FLUSHED

CACHE_FLUSHED

public static final String
CACHE_REGION_CHANGED

CACHE_REGION_CHANGED

public static final String
CACHE_REGION_FLUSHED

CACHE_REGION_FLUSHED

public static final String
CACHE_STATISTICS_ENABLED

CACHE_STATISTICS_ENABLED

public static final String
CACHE_STATISTICS_RESET

CACHE_STATISTICS_RESET

Method Summary

Modifier and TypeMethod and Description
public void
flushRegionCache(String region)

Flushes the cache for the input region

public void
flushRegionCaches()

Flushes all the caches for all the regions

public String

Returns:

the currently active cache configuration
generateActiveConfigDeclaration
()

Returns the currently active cache configuration

public String

Returns:

Returns the currently active cache configuration for the supplied region
generateActiveConfigDeclaration
(String region)

Returns the currently active cache configuration for the supplied region

public float

Returns:

Return average time taken in milliseconds for a get operation for the input cache name
getAverageGetTimeMillis
(String region)

Return average time taken in milliseconds for a get operation for the input cache name

public long

Returns:

Returns hit count for all the caches
getCacheHitCount
()

Returns hit count for all the caches

public double

Returns:

Returns hit rate for all the caches
getCacheHitRate
()

Returns hit rate for all the caches

public long

Returns:

Returns hit count sample for all the caches
getCacheHitSample
()

Returns hit count sample for all the caches

public long

Returns:

Returns miss count for all the caches
getCacheMissCount
()

Returns miss count for all the caches

public double

Returns:

Returns miss rate for all the caches
getCacheMissRate
()

Returns miss rate for all the caches

public long

Returns:

Returns miss count sample for all the caches
getCacheMissSample
()

Returns miss count sample for all the caches

public long

Returns:

Returns put count for all the caches
getCachePutCount
()

Returns put count for all the caches

public double

Returns:

Returns put rate for all the caches
getCachePutRate
()

Returns put rate for all the caches

public long

Returns:

Returns put count sample for all the caches
getCachePutSample
()

Returns put count sample for all the caches

public long

Returns:

Return maximum time taken in milliseconds for a get operation
getMaxGetTimeMillis
()

Return maximum time taken in milliseconds for a get operation

public long

Returns:

Return maximum time taken in milliseconds for a get operation for the input cache name
getMaxGetTimeMillis
(String cacheName)

Return maximum time taken in milliseconds for a get operation for the input cache name

public long

Returns:

minimum time taken for a get operation in the cache in milliseconds
getMinGetTimeMillis
()

Return minimum time taken for a get operation in the cache in milliseconds

public long

Returns:

Return minimum time taken in milliseconds for a get operation for the input cache name
getMinGetTimeMillis
(String cacheName)

Return minimum time taken in milliseconds for a get operation for the input cache name

public int

Returns:

Returns number of elements in-memory in the cache for the input region
getNumberOfElementsInMemory
(String region)

Returns number of elements in-memory in the cache for the input region

public int

Returns:

Returns number of elements off-heap in the cache for the input region
getNumberOfElementsOffHeap
(String region)

Returns number of elements off-heap in the cache for the input region

public int

Returns:

Returns number of elements on-disk in the cache for the input region
getNumberOfElementsOnDisk
(String region)

Returns number of elements on-disk in the cache for the input region

public String

Returns:

the original cache configuration
getOriginalConfigDeclaration
()

Get the original cache configuration

public String

Returns:

the original cache configuration for the supplied region
getOriginalConfigDeclaration
(String
for which the configuration is required
region
)

Returns the original cache configuration for the supplied region

public Map<String, Object>

Returns:

Returns a map containing attributes of the cache for the input cache region name
getRegionCacheAttributes
(String regionName)

Returns a map containing attributes of the cache for the input cache region name

public Map<String, Map<String, Object>>

Returns:

Returns a map containing mapping of all cache region names to their attributes
getRegionCacheAttributes
()

Returns a map containing mapping of all cache region names to their attributes

public int

Returns:

Returns the time to live for the input cache region
getRegionCacheMaxTTISeconds
(String region)

Returns the time to idle for the input cache region

public int

Returns:

Returns the time to live for the input cache region
getRegionCacheMaxTTLSeconds
(String region)

Returns the time to live for the input cache region

public int

Returns:

Returns the orphan eviction period for the input cache region.
getRegionCacheOrphanEvictionPeriod
(String region)

Returns the orphan eviction period for the input cache region.

public Map<String, int[]>

Returns:

Returns a map containing mapping between cache names and an array containing hit, miss and put count samples
getRegionCacheSamples
()

Returns a map containing mapping between cache names and an array containing hit, miss and put count samples

public int

Returns:

Returns the maxElementsInMemory of the input cache region
getRegionCacheTargetMaxInMemoryCount
(String region)

Returns the maxElementsInMemory of the input cache region

public int

Returns:

Returns the maxElementsOnDisk of the input cache region
getRegionCacheTargetMaxTotalCount
(String region)

Returns the maxElementsOnDisk of the input cache region

public String[]

Returns:

Returns the region names which are clustered with terracotta
getTerracottaHibernateCacheRegionNames
()

Returns the region names which are clustered with terracotta

public boolean

Returns:

Returns true if cache is enabled for the input region
isRegionCacheEnabled
(String region)

Returns true if cache is enabled for the input region

public boolean

Returns:

Returns true if logging is enabled for the input cache region
isRegionCacheLoggingEnabled
(String region)

Returns true if logging is enabled for the input cache region

public boolean

Returns:

Returns true if orphan eviction is enabled for the region otherwise false
isRegionCacheOrphanEvictionEnabled
(String region)

Returns true if orphan eviction is enabled for the region otherwise false

public boolean

Returns:

Returns true if all the cache regions are enabled. If even one cache is disabled, it will return false
isRegionCachesEnabled
()

Returns true if all the cache regions are enabled.

public boolean

Returns:

Returns true if the input region is clustered with terracotta
isTerracottaHibernateCache
(String region)

Returns true if the input region is clustered with terracotta

public void
setRegionCacheEnabled(String region, boolean enabled)

Enables/disables a particular region

public void
setRegionCacheLoggingEnabled(String region, boolean loggingEnabled)

Enable/Disable logging for the input cache region

public void
setRegionCacheMaxTTISeconds(String region, int
Returns the time to idle for the input cache region
maxTTISeconds
)

Sets the time to idle for the input cache region

public void
setRegionCacheMaxTTLSeconds(String region, int maxTTLSeconds)

Sets the time to live for the input cache region

public void
setRegionCachesEnabled(boolean enabled)

Enable/disable all the cache regions.

public void
setRegionCacheTargetMaxInMemoryCount(String region, int targetMaxInMemoryCount)

Sets the maxElementsInMemory of the input cache region

public void
setRegionCacheTargetMaxTotalCount(String region, int targetMaxTotalCount)

Sets the maxElementsOnDisk of the input cache region

Inherited from javax.management.NotificationEmitter:
removeNotificationListener

Field Detail

CACHE_ENABLEDback to summary
public static final String CACHE_ENABLED

CACHE_ENABLED

CACHE_FLUSHEDback to summary
public static final String CACHE_FLUSHED

CACHE_FLUSHED

CACHE_REGION_CHANGEDback to summary
public static final String CACHE_REGION_CHANGED

CACHE_REGION_CHANGED

CACHE_REGION_FLUSHEDback to summary
public static final String CACHE_REGION_FLUSHED

CACHE_REGION_FLUSHED

CACHE_STATISTICS_ENABLEDback to summary
public static final String CACHE_STATISTICS_ENABLED

CACHE_STATISTICS_ENABLED

CACHE_STATISTICS_RESETback to summary
public static final String CACHE_STATISTICS_RESET

CACHE_STATISTICS_RESET

Method Detail

flushRegionCacheback to summary
public void flushRegionCache(String region)

Flushes the cache for the input region

flushRegionCachesback to summary
public void flushRegionCaches()

Flushes all the caches for all the regions

generateActiveConfigDeclarationback to summary
public String generateActiveConfigDeclaration()

Returns the currently active cache configuration

Returns:String

the currently active cache configuration

generateActiveConfigDeclarationback to summary
public String generateActiveConfigDeclaration(String region)

Returns the currently active cache configuration for the supplied region

Returns:String

Returns the currently active cache configuration for the supplied region

getAverageGetTimeMillisback to summary
public float getAverageGetTimeMillis(String region)

Return average time taken in milliseconds for a get operation for the input cache name

Returns:float

Return average time taken in milliseconds for a get operation for the input cache name

getCacheHitCountback to summary
public long getCacheHitCount()

Returns hit count for all the caches

Returns:long

Returns hit count for all the caches

getCacheHitRateback to summary
public double getCacheHitRate()

Returns hit rate for all the caches

Returns:double

Returns hit rate for all the caches

getCacheHitSampleback to summary
public long getCacheHitSample()

Returns hit count sample for all the caches

Returns:long

Returns hit count sample for all the caches

getCacheMissCountback to summary
public long getCacheMissCount()

Returns miss count for all the caches

Returns:long

Returns miss count for all the caches

getCacheMissRateback to summary
public double getCacheMissRate()

Returns miss rate for all the caches

Returns:double

Returns miss rate for all the caches

getCacheMissSampleback to summary
public long getCacheMissSample()

Returns miss count sample for all the caches

Returns:long

Returns miss count sample for all the caches

getCachePutCountback to summary
public long getCachePutCount()

Returns put count for all the caches

Returns:long

Returns put count for all the caches

getCachePutRateback to summary
public double getCachePutRate()

Returns put rate for all the caches

Returns:double

Returns put rate for all the caches

getCachePutSampleback to summary
public long getCachePutSample()

Returns put count sample for all the caches

Returns:long

Returns put count sample for all the caches

getMaxGetTimeMillisback to summary
public long getMaxGetTimeMillis()

Return maximum time taken in milliseconds for a get operation

Returns:long

Return maximum time taken in milliseconds for a get operation

getMaxGetTimeMillisback to summary
public long getMaxGetTimeMillis(String cacheName)

Return maximum time taken in milliseconds for a get operation for the input cache name

Returns:long

Return maximum time taken in milliseconds for a get operation for the input cache name

getMinGetTimeMillisback to summary
public long getMinGetTimeMillis()

Return minimum time taken for a get operation in the cache in milliseconds

Returns:long

minimum time taken for a get operation in the cache in milliseconds

getMinGetTimeMillisback to summary
public long getMinGetTimeMillis(String cacheName)

Return minimum time taken in milliseconds for a get operation for the input cache name

Returns:long

Return minimum time taken in milliseconds for a get operation for the input cache name

getNumberOfElementsInMemoryback to summary
public int getNumberOfElementsInMemory(String region)

Returns number of elements in-memory in the cache for the input region

Returns:int

Returns number of elements in-memory in the cache for the input region

getNumberOfElementsOffHeapback to summary
public int getNumberOfElementsOffHeap(String region)

Returns number of elements off-heap in the cache for the input region

Returns:int

Returns number of elements off-heap in the cache for the input region

getNumberOfElementsOnDiskback to summary
public int getNumberOfElementsOnDisk(String region)

Returns number of elements on-disk in the cache for the input region

Returns:int

Returns number of elements on-disk in the cache for the input region

getOriginalConfigDeclarationback to summary
public String getOriginalConfigDeclaration()

Get the original cache configuration

Returns:String

the original cache configuration

getOriginalConfigDeclarationback to summary
public String getOriginalConfigDeclaration(String region)

Returns the original cache configuration for the supplied region

Parameters
region:String

for which the configuration is required

Returns:String

the original cache configuration for the supplied region

getRegionCacheAttributesback to summary
public Map<String, Object> getRegionCacheAttributes(String regionName)

Returns a map containing attributes of the cache for the input cache region name

Returns:Map<String, Object>

Returns a map containing attributes of the cache for the input cache region name

getRegionCacheAttributesback to summary
public Map<String, Map<String, Object>> getRegionCacheAttributes()

Returns a map containing mapping of all cache region names to their attributes

Returns:Map<String, Map<String, Object>>

Returns a map containing mapping of all cache region names to their attributes

getRegionCacheMaxTTISecondsback to summary
public int getRegionCacheMaxTTISeconds(String region)

Returns the time to idle for the input cache region

Returns:int

Returns the time to live for the input cache region

getRegionCacheMaxTTLSecondsback to summary
public int getRegionCacheMaxTTLSeconds(String region)

Returns the time to live for the input cache region

Returns:int

Returns the time to live for the input cache region

getRegionCacheOrphanEvictionPeriodback to summary
public int getRegionCacheOrphanEvictionPeriod(String region)

Returns the orphan eviction period for the input cache region.

Returns:int

Returns the orphan eviction period for the input cache region.

getRegionCacheSamplesback to summary
public Map<String, int[]> getRegionCacheSamples()

Returns a map containing mapping between cache names and an array containing hit, miss and put count samples

Returns:Map<String, int[]>

Returns a map containing mapping between cache names and an array containing hit, miss and put count samples

getRegionCacheTargetMaxInMemoryCountback to summary
public int getRegionCacheTargetMaxInMemoryCount(String region)

Returns the maxElementsInMemory of the input cache region

Returns:int

Returns the maxElementsInMemory of the input cache region

getRegionCacheTargetMaxTotalCountback to summary
public int getRegionCacheTargetMaxTotalCount(String region)

Returns the maxElementsOnDisk of the input cache region

Returns:int

Returns the maxElementsOnDisk of the input cache region

getTerracottaHibernateCacheRegionNamesback to summary
public String[] getTerracottaHibernateCacheRegionNames()

Returns the region names which are clustered with terracotta

Returns:String[]

Returns the region names which are clustered with terracotta

isRegionCacheEnabledback to summary
public boolean isRegionCacheEnabled(String region)

Returns true if cache is enabled for the input region

Returns:boolean

Returns true if cache is enabled for the input region

isRegionCacheLoggingEnabledback to summary
public boolean isRegionCacheLoggingEnabled(String region)

Returns true if logging is enabled for the input cache region

Returns:boolean

Returns true if logging is enabled for the input cache region

isRegionCacheOrphanEvictionEnabledback to summary
public boolean isRegionCacheOrphanEvictionEnabled(String region)

Returns true if orphan eviction is enabled for the region otherwise false

Returns:boolean

Returns true if orphan eviction is enabled for the region otherwise false

isRegionCachesEnabledback to summary
public boolean isRegionCachesEnabled()

Returns true if all the cache regions are enabled. If even one cache is disabled, it will return false

Returns:boolean

Returns true if all the cache regions are enabled. If even one cache is disabled, it will return false

isTerracottaHibernateCacheback to summary
public boolean isTerracottaHibernateCache(String region)

Returns true if the input region is clustered with terracotta

Returns:boolean

Returns true if the input region is clustered with terracotta

setRegionCacheEnabledback to summary
public void setRegionCacheEnabled(String region, boolean enabled)

Enables/disables a particular region

setRegionCacheLoggingEnabledback to summary
public void setRegionCacheLoggingEnabled(String region, boolean loggingEnabled)

Enable/Disable logging for the input cache region

setRegionCacheMaxTTISecondsback to summary
public void setRegionCacheMaxTTISeconds(String region, int maxTTISeconds)

Sets the time to idle for the input cache region

Parameters
maxTTISeconds:int

Returns the time to idle for the input cache region

setRegionCacheMaxTTLSecondsback to summary
public void setRegionCacheMaxTTLSeconds(String region, int maxTTLSeconds)

Sets the time to live for the input cache region

setRegionCachesEnabledback to summary
public void setRegionCachesEnabled(boolean enabled)

Enable/disable all the cache regions.

setRegionCacheTargetMaxInMemoryCountback to summary
public void setRegionCacheTargetMaxInMemoryCount(String region, int targetMaxInMemoryCount)

Sets the maxElementsInMemory of the input cache region

setRegionCacheTargetMaxTotalCountback to summary
public void setRegionCacheTargetMaxTotalCount(String region, int targetMaxTotalCount)

Sets the maxElementsOnDisk of the input cache region