Interface CacheMetrics
-
public interface CacheMetrics
Cache metrics used to obtain statistics on cache itself. UseIgniteCache.metrics()
to obtain metrics for a cache.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description long
estimateRebalancingFinishTime()
Deprecated.float
getAverageGetTime()
The mean time to execute gets.float
getAveragePutTime()
The mean time to execute puts.float
getAverageRemoveTime()
The mean time to execute removes.float
getAverageTxCommitTime()
The mean time to execute tx commit.float
getAverageTxRollbackTime()
The mean time to execute tx rollbacks.long
getCacheEvictions()
The total number of evictions from the cache.long
getCacheGets()
The total number of requests to the cache.float
getCacheHitPercentage()
This is a measure of cache efficiency.long
getCacheHits()
The number of get requests that were satisfied by the cache.long
getCacheMisses()
A miss is a get request that is not satisfied.float
getCacheMissPercentage()
Returns the percentage of cache accesses that did not find a requested entry in the cache.long
getCachePuts()
The total number of puts to the cache.long
getCacheRemovals()
The total number of removals from the cache.long
getCacheSize()
Cache size.long
getCacheTxCommits()
Gets total number of transaction commits.long
getCacheTxRollbacks()
Gets total number of transaction rollbacks.int
getDhtEvictQueueCurrentSize()
Deprecated.float
getEntryProcessorAverageInvocationTime()
The mean time to execute cache invokes.float
getEntryProcessorHitPercentage()
The percentage of invocations on keys, which exist in cache.long
getEntryProcessorHits()
The total number of invocations on keys, which exist in cache.long
getEntryProcessorInvocations()
The total number of cache invocations.float
getEntryProcessorMaxInvocationTime()
So far, the maximum time to execute cache invokes.float
getEntryProcessorMinInvocationTime()
So far, the minimum time to execute cache invokes.long
getEntryProcessorMisses()
The total number of invocations on keys, which don't exist in cache.float
getEntryProcessorMissPercentage()
The percentage of invocations on keys, which don't exist in cache.long
getEntryProcessorPuts()
The total number of cache invocations, caused update.long
getEntryProcessorReadOnlyInvocations()
The total number of cache invocations, caused no updates.long
getEntryProcessorRemovals()
The total number of cache invocations, caused removal.long
getEstimatedRebalancingFinishTime()
long
getEstimatedRebalancingKeys()
long
getHeapEntriesCount()
Gets the number of cache entries in heap memory, including entries held by active transactions, entries in onheap cache and near entries.int
getIndexBuildPartitionsLeftCount()
long
getIndexRebuildKeysProcessed()
Return number of keys processed during index rebuilding.int
getKeySize()
Deprecated.Can overflow.long
getKeysToRebalanceLeft()
String
getKeyType()
Determines the required type of keys for thisCache
, if any.long
getOffHeapAllocatedSize()
Gets memory size allocated in off-heap.long
getOffHeapBackupEntriesCount()
Gets number of backup entries stored in off-heap memory.long
getOffHeapEntriesCount()
Gets number of entries stored in off-heap memory.long
getOffHeapEvictions()
The total number of evictions from the off-heap memory.long
getOffHeapGets()
The total number of get requests to the off-heap memory.float
getOffHeapHitPercentage()
Gets the percentage of hits on off-heap memory.long
getOffHeapHits()
The number of get requests that were satisfied by the off-heap memory.long
getOffHeapMisses()
A miss is a get request that is not satisfied by off-heap memory.float
getOffHeapMissPercentage()
Gets the percentage of misses on off-heap memory.long
getOffHeapPrimaryEntriesCount()
Gets number of primary entries stored in off-heap memory.long
getOffHeapPuts()
The total number of put requests to the off-heap memory.long
getOffHeapRemovals()
The total number of removals from the off-heap memory.long
getRebalanceClearingPartitionsLeft()
long
getRebalancedKeys()
long
getRebalancingBytesRate()
long
getRebalancingKeysRate()
int
getRebalancingPartitionsCount()
long
getRebalancingStartTime()
int
getSize()
Deprecated.Can overflow.int
getTotalPartitionsCount()
int
getTxCommitQueueSize()
Deprecated.int
getTxCommittedVersionsSize()
Gets number of cached committed transaction IDs.int
getTxDhtCommitQueueSize()
Deprecated.int
getTxDhtCommittedVersionsSize()
Gets number of cached committed DHT transaction IDs.int
getTxDhtPrepareQueueSize()
Deprecated.int
getTxDhtRolledbackVersionsSize()
Gets number of cached rolled back DHT transaction IDs.int
getTxDhtStartVersionCountsSize()
Deprecated.int
getTxDhtThreadMapSize()
Gets transaction DHT per-thread map size.int
getTxDhtXidMapSize()
Gets transaction DHT per-Xid map size.@NotNull String
getTxKeyCollisions()
Checks if there were any tx key collisions last time.int
getTxPrepareQueueSize()
Deprecated.int
getTxRolledbackVersionsSize()
Gets number of cached rolled back transaction IDs.int
getTxStartVersionCountsSize()
Deprecated.int
getTxThreadMapSize()
Gets transaction per-thread map size.int
getTxXidMapSize()
Gets transaction per-Xid map size.String
getValueType()
Determines the required type of values for thisCache
, if any.int
getWriteBehindBufferSize()
Gets count of entries that were processed by the write-behind store and have not been flushed to the underlying store yet.int
getWriteBehindCriticalOverflowCount()
Gets count of write buffer overflow events in progress at the moment.int
getWriteBehindErrorRetryCount()
Gets count of cache entries that are in a store-retry state.long
getWriteBehindFlushFrequency()
Gets the cache flush frequency.int
getWriteBehindFlushSize()
Gets the maximum size of the write-behind buffer.int
getWriteBehindFlushThreadCount()
Gets the number of flush threads that will perform store update operations.int
getWriteBehindStoreBatchSize()
Gets the maximum count of similar (put or remove) operations that can be grouped to a single batch.int
getWriteBehindTotalCriticalOverflowCount()
Gets count of write buffer overflow events since initialization.boolean
isEmpty()
Returnstrue
if this cache is empty.boolean
isIndexRebuildInProgress()
Returntrue
if index rebuild is in progress.boolean
isManagementEnabled()
Checks whether management is enabled on this cache.boolean
isReadThrough()
Determines if aCache
should operate in read-through mode.boolean
isStatisticsEnabled()
Checks whether statistics collection is enabled in this cache.boolean
isStoreByValue()
Whether storeByValuetrue
or storeByReferencefalse
.boolean
isValidForReading()
Checks whether cache topology is valid for read operations.boolean
isValidForWriting()
Checks whether cache topology is valid for write operations.boolean
isWriteBehindEnabled()
Returnstrue
if write-behind is enabled.boolean
isWriteThrough()
Determines if aCache
should operate in "write-through" mode.String
name()
Gets name of this cache.long
rebalancingStartTime()
Deprecated.
-
-
-
Method Detail
-
getCacheHits
long getCacheHits()
The number of get requests that were satisfied by the cache.- Returns:
- The number of hits.
-
getCacheHitPercentage
float getCacheHitPercentage()
This is a measure of cache efficiency.- Returns:
- The percentage of successful hits, as a decimal e.g 75.
-
getCacheMisses
long getCacheMisses()
A miss is a get request that is not satisfied.- Returns:
- The number of misses.
-
getCacheMissPercentage
float getCacheMissPercentage()
Returns the percentage of cache accesses that did not find a requested entry in the cache.- Returns:
- The percentage of accesses that failed to find anything.
-
getCacheGets
long getCacheGets()
The total number of requests to the cache. This will be equal to the sum of the hits and misses.- Returns:
- The number of gets.
-
getCachePuts
long getCachePuts()
The total number of puts to the cache.- Returns:
- The number of puts.
-
getEntryProcessorPuts
long getEntryProcessorPuts()
The total number of cache invocations, caused update.- Returns:
- The number of invocation updates.
-
getEntryProcessorRemovals
long getEntryProcessorRemovals()
The total number of cache invocations, caused removal.- Returns:
- The number of invocation removals.
-
getEntryProcessorReadOnlyInvocations
long getEntryProcessorReadOnlyInvocations()
The total number of cache invocations, caused no updates.- Returns:
- The number of read-only invocations.
-
getEntryProcessorInvocations
long getEntryProcessorInvocations()
The total number of cache invocations.- Returns:
- The number of cache invocations.
-
getEntryProcessorHits
long getEntryProcessorHits()
The total number of invocations on keys, which exist in cache.- Returns:
- The number of cache invocation hits.
-
getEntryProcessorHitPercentage
float getEntryProcessorHitPercentage()
The percentage of invocations on keys, which exist in cache.- Returns:
- The percentage of successful invocation hits.
-
getEntryProcessorMisses
long getEntryProcessorMisses()
The total number of invocations on keys, which don't exist in cache.- Returns:
- The number of cache invocation misses.
-
getEntryProcessorMissPercentage
float getEntryProcessorMissPercentage()
The percentage of invocations on keys, which don't exist in cache.- Returns:
- The percentage of invocation misses.
-
getEntryProcessorAverageInvocationTime
float getEntryProcessorAverageInvocationTime()
The mean time to execute cache invokes.- Returns:
- The time in µs.
-
getEntryProcessorMinInvocationTime
float getEntryProcessorMinInvocationTime()
So far, the minimum time to execute cache invokes.- Returns:
- The time in µs.
-
getEntryProcessorMaxInvocationTime
float getEntryProcessorMaxInvocationTime()
So far, the maximum time to execute cache invokes.- Returns:
- The time in µs.
-
getCacheRemovals
long getCacheRemovals()
The total number of removals from the cache. This does not include evictions, where the cache itself initiates the removal to make space.- Returns:
- The number of removals.
-
getCacheEvictions
long getCacheEvictions()
The total number of evictions from the cache. An eviction is a removal initiated by the cache itself to free up space. An eviction is not treated as a removal and does not appear in the removal counts.- Returns:
- The number of evictions.
-
getAverageGetTime
float getAverageGetTime()
The mean time to execute gets.- Returns:
- The time in µs.
-
getAveragePutTime
float getAveragePutTime()
The mean time to execute puts.- Returns:
- The time in µs.
-
getAverageRemoveTime
float getAverageRemoveTime()
The mean time to execute removes.- Returns:
- The time in µs.
-
getAverageTxCommitTime
float getAverageTxCommitTime()
The mean time to execute tx commit.- Returns:
- The time in µs.
-
getAverageTxRollbackTime
float getAverageTxRollbackTime()
The mean time to execute tx rollbacks.- Returns:
- Number of transaction rollbacks.
-
getCacheTxCommits
long getCacheTxCommits()
Gets total number of transaction commits.- Returns:
- Number of transaction commits.
-
getCacheTxRollbacks
long getCacheTxRollbacks()
Gets total number of transaction rollbacks.- Returns:
- Number of transaction rollbacks.
-
name
String name()
Gets name of this cache.- Returns:
- Cache name.
-
getOffHeapGets
long getOffHeapGets()
The total number of get requests to the off-heap memory.- Returns:
- The number of gets.
-
getOffHeapPuts
long getOffHeapPuts()
The total number of put requests to the off-heap memory.- Returns:
- The number of puts.
-
getOffHeapRemovals
long getOffHeapRemovals()
The total number of removals from the off-heap memory. This does not include evictions.- Returns:
- The number of removals.
-
getOffHeapEvictions
long getOffHeapEvictions()
The total number of evictions from the off-heap memory.- Returns:
- The number of evictions.
-
getOffHeapHits
long getOffHeapHits()
The number of get requests that were satisfied by the off-heap memory.- Returns:
- The off-heap hits number.
-
getOffHeapHitPercentage
float getOffHeapHitPercentage()
Gets the percentage of hits on off-heap memory.- Returns:
- The percentage of hits on off-heap memory.
-
getOffHeapMisses
long getOffHeapMisses()
A miss is a get request that is not satisfied by off-heap memory.- Returns:
- The off-heap misses number.
-
getOffHeapMissPercentage
float getOffHeapMissPercentage()
Gets the percentage of misses on off-heap memory.- Returns:
- The percentage of misses on off-heap memory.
-
getHeapEntriesCount
long getHeapEntriesCount()
Gets the number of cache entries in heap memory, including entries held by active transactions, entries in onheap cache and near entries.- Returns:
- Number of entries in heap memory.
-
getOffHeapEntriesCount
long getOffHeapEntriesCount()
Gets number of entries stored in off-heap memory.- Returns:
- Number of entries stored in off-heap memory.
-
getOffHeapPrimaryEntriesCount
long getOffHeapPrimaryEntriesCount()
Gets number of primary entries stored in off-heap memory.- Returns:
- Number of primary entries stored in off-heap memory.
-
getOffHeapBackupEntriesCount
long getOffHeapBackupEntriesCount()
Gets number of backup entries stored in off-heap memory.- Returns:
- Number of backup entries stored in off-heap memory.
-
getOffHeapAllocatedSize
long getOffHeapAllocatedSize()
Gets memory size allocated in off-heap.- Returns:
- Memory size allocated in off-heap.
-
getSize
@Deprecated int getSize()
Deprecated.Can overflow. UsegetCacheSize()
instead.Gets number of non-null
values in the cache. Note this method will always return0
- Returns:
- Number of non-
null
values in the cache.
-
getCacheSize
long getCacheSize()
Cache size.- Returns:
- Cache size.
-
getKeySize
@Deprecated int getKeySize()
Deprecated.Can overflow. UsegetCacheSize()
instead.Gets number of keys in the cache, possibly withnull
values. Note this method will always return0
- Returns:
- Number of keys in the cache.
-
isEmpty
boolean isEmpty()
Returnstrue
if this cache is empty.- Returns:
True
if this cache is empty.
-
getDhtEvictQueueCurrentSize
@Deprecated int getDhtEvictQueueCurrentSize()
Deprecated.Gets current size of evict queue used to batch up evictions.- Returns:
- Current size of evict queue.
-
getTxThreadMapSize
int getTxThreadMapSize()
Gets transaction per-thread map size.- Returns:
- Thread map size.
-
getTxXidMapSize
int getTxXidMapSize()
Gets transaction per-Xid map size.- Returns:
- Transaction per-Xid map size.
-
getTxCommitQueueSize
@Deprecated int getTxCommitQueueSize()
Deprecated.Gets committed transaction queue size.- Returns:
- Committed transaction queue size.
-
getTxPrepareQueueSize
@Deprecated int getTxPrepareQueueSize()
Deprecated.Gets prepared transaction queue size.- Returns:
- Prepared transaction queue size.
-
getTxStartVersionCountsSize
@Deprecated int getTxStartVersionCountsSize()
Deprecated.Gets start version counts map size.- Returns:
- Start version counts map size.
-
getTxCommittedVersionsSize
int getTxCommittedVersionsSize()
Gets number of cached committed transaction IDs.- Returns:
- Number of cached committed transaction IDs.
-
getTxRolledbackVersionsSize
int getTxRolledbackVersionsSize()
Gets number of cached rolled back transaction IDs.- Returns:
- Number of cached rolled back transaction IDs.
-
getTxDhtThreadMapSize
int getTxDhtThreadMapSize()
Gets transaction DHT per-thread map size.- Returns:
- DHT thread map size.
-
getTxDhtXidMapSize
int getTxDhtXidMapSize()
Gets transaction DHT per-Xid map size.- Returns:
- Transaction DHT per-Xid map size.
-
getTxDhtCommitQueueSize
@Deprecated int getTxDhtCommitQueueSize()
Deprecated.Gets committed DHT transaction queue size.- Returns:
- Committed DHT transaction queue size.
-
getTxDhtPrepareQueueSize
@Deprecated int getTxDhtPrepareQueueSize()
Deprecated.Gets prepared DHT transaction queue size.- Returns:
- Prepared DHT transaction queue size.
-
getTxDhtStartVersionCountsSize
@Deprecated int getTxDhtStartVersionCountsSize()
Deprecated.Gets DHT start version counts map size.- Returns:
- DHT start version counts map size.
-
getTxDhtCommittedVersionsSize
int getTxDhtCommittedVersionsSize()
Gets number of cached committed DHT transaction IDs.- Returns:
- Number of cached committed DHT transaction IDs.
-
getTxDhtRolledbackVersionsSize
int getTxDhtRolledbackVersionsSize()
Gets number of cached rolled back DHT transaction IDs.- Returns:
- Number of cached rolled back DHT transaction IDs.
-
isWriteBehindEnabled
boolean isWriteBehindEnabled()
Returnstrue
if write-behind is enabled.- Returns:
True
if write-behind is enabled.
-
getWriteBehindFlushSize
int getWriteBehindFlushSize()
Gets the maximum size of the write-behind buffer. When the count of unique keys in write buffer exceeds this value, the buffer is scheduled for write to the underlying store. If this value is0
, then flush is performed only on time-elapsing basis. However, when this value is0
, the cache critical size is set toCacheConfiguration.DFLT_WRITE_BEHIND_CRITICAL_SIZE
- Returns:
- Buffer size that triggers flush procedure.
-
getWriteBehindFlushThreadCount
int getWriteBehindFlushThreadCount()
Gets the number of flush threads that will perform store update operations.- Returns:
- Count of worker threads.
-
getWriteBehindFlushFrequency
long getWriteBehindFlushFrequency()
Gets the cache flush frequency. All pending operations on the underlying store will be performed within time interval not less then this value. If this value is0
, then flush is performed only when buffer size exceeds flush size.- Returns:
- Flush frequency in milliseconds.
-
getWriteBehindStoreBatchSize
int getWriteBehindStoreBatchSize()
Gets the maximum count of similar (put or remove) operations that can be grouped to a single batch.- Returns:
- Maximum size of batch.
-
getWriteBehindTotalCriticalOverflowCount
int getWriteBehindTotalCriticalOverflowCount()
Gets count of write buffer overflow events since initialization. Each overflow event causes the ongoing flush operation to be performed synchronously.- Returns:
- Count of cache overflow events since start.
-
getWriteBehindCriticalOverflowCount
int getWriteBehindCriticalOverflowCount()
Gets count of write buffer overflow events in progress at the moment. Each overflow event causes the ongoing flush operation to be performed synchronously.- Returns:
- Count of cache overflow events since start.
-
getWriteBehindErrorRetryCount
int getWriteBehindErrorRetryCount()
Gets count of cache entries that are in a store-retry state. An entry is assigned a store-retry state when underlying store failed due some reason and cache has enough space to retain this entry till the next try.- Returns:
- Count of entries in store-retry state.
-
getWriteBehindBufferSize
int getWriteBehindBufferSize()
Gets count of entries that were processed by the write-behind store and have not been flushed to the underlying store yet.- Returns:
- Total count of entries in cache store internal buffer.
-
getKeyType
String getKeyType()
Determines the required type of keys for thisCache
, if any.- Returns:
- The fully qualified class name of the key type,
or
"java.lang.Object"
if the type is undefined.
-
getValueType
String getValueType()
Determines the required type of values for thisCache
, if any.- Returns:
- The fully qualified class name of the value type,
or
"java.lang.Object"
if the type is undefined.
-
isStoreByValue
boolean isStoreByValue()
Whether storeByValuetrue
or storeByReferencefalse
. Whentrue
, 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:- if the key is mutated, then the key may not be retrievable or removable
- if the value is mutated, then all threads in the JVM can potentially observe those mutations, subject to the normal Java Memory Model rules.
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
.- Returns:
True
if the cache is store by value.
-
getTotalPartitionsCount
int getTotalPartitionsCount()
- Returns:
- Total number of partitions on current node.
-
getRebalancingPartitionsCount
int getRebalancingPartitionsCount()
- Returns:
- Number of currently rebalancing partitions on current node.
-
getRebalancedKeys
long getRebalancedKeys()
- Returns:
- Number of already rebalanced keys.
-
getEstimatedRebalancingKeys
long getEstimatedRebalancingKeys()
- Returns:
- Number estimated to rebalance keys.
-
getKeysToRebalanceLeft
long getKeysToRebalanceLeft()
- Returns:
- Estimated number of keys to be rebalanced on current node.
-
getRebalancingKeysRate
long getRebalancingKeysRate()
- Returns:
- Estimated rebalancing speed in keys.
-
getRebalancingBytesRate
long getRebalancingBytesRate()
- Returns:
- Estimated rebalancing speed in bytes.
-
estimateRebalancingFinishTime
@Deprecated long estimateRebalancingFinishTime()
Deprecated.This method is deprecated and will be deleted in future major release. UsegetEstimatedRebalancingFinishTime()
instead.- Returns:
- Estimated rebalancing finished time.
-
rebalancingStartTime
@Deprecated long rebalancingStartTime()
Deprecated.This method is deprecated and will be deleted in future major release. UsegetRebalancingStartTime()
instead.- Returns:
- Rebalancing start time.
-
getEstimatedRebalancingFinishTime
long getEstimatedRebalancingFinishTime()
- Returns:
- Estimated rebalancing finish time.
-
getRebalancingStartTime
long getRebalancingStartTime()
- Returns:
- Rebalancing start time.
-
getRebalanceClearingPartitionsLeft
long getRebalanceClearingPartitionsLeft()
- Returns:
- The number of partitions need to be cleared before actual rebalance start.
-
isStatisticsEnabled
boolean isStatisticsEnabled()
Checks whether statistics collection is enabled in this cache.The default value is
false
.- Returns:
True
if statistics collection is enabled.
-
isManagementEnabled
boolean isManagementEnabled()
Checks whether management is enabled on this cache.The default value is
false
.- Returns:
true
if management is enabled.
-
isReadThrough
boolean isReadThrough()
Determines if aCache
should operate in read-through mode.The default value is
false
- Returns:
True
when aCache
is in "read-through" mode.- See Also:
CacheLoader
-
isWriteThrough
boolean isWriteThrough()
Determines if aCache
should operate in "write-through" mode.will appropriately cause the configured
CacheWriter
to be invoked.The default value is
false
- Returns:
True
when aCache
is in "write-through" mode.- See Also:
CacheWriter
-
isValidForReading
boolean isValidForReading()
Checks whether cache topology is valid for read operations.Note: the method will return
false
if any partition was lost despite the fact others can be awailable for reading.- Returns:
true
when cache topology is valid for reading.
-
isValidForWriting
boolean isValidForWriting()
Checks whether cache topology is valid for write operations.Note: the method will return
false
if any partition was lost despite the fact others can be awailable for writing according to configured partition loss policy.- Returns:
true
when cache topology is valid for writing.
-
getTxKeyCollisions
@NotNull @NotNull String getTxKeyCollisions()
Checks if there were any tx key collisions last time. Interval for check specified throught:IgniteSystemProperties.IGNITE_DUMP_TX_COLLISIONS_INTERVAL
orTransactionsMXBean.setTxKeyCollisionsInterval(int)
.- Returns:
- Key collisions and appropriate queue size string representation.
-
isIndexRebuildInProgress
boolean isIndexRebuildInProgress()
Returntrue
if index rebuild is in progress.- Returns:
true
if index rebuild is in progress.
-
getIndexRebuildKeysProcessed
long getIndexRebuildKeysProcessed()
Return number of keys processed during index rebuilding. To get remaining number of keys for rebuilding, subtract current value fromgetCacheSize()
.- Returns:
- Number of keys processed during index rebuilding.
-
getIndexBuildPartitionsLeftCount
int getIndexBuildPartitionsLeftCount()
- Returns:
- The number of partitions that remain to be processed to complete indexing. Note that this metric includes backup partitions, which also participate in index building on each node.
-
-