Interface CacheMetrics
- 
 public interface CacheMetricsCache metrics used to obtain statistics on cache itself. UseIgniteCache.metrics()to obtain metrics for a cache.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description longestimateRebalancingFinishTime()Deprecated.floatgetAverageGetTime()The mean time to execute gets.floatgetAveragePutTime()The mean time to execute puts.floatgetAverageRemoveTime()The mean time to execute removes.floatgetAverageTxCommitTime()The mean time to execute tx commit.floatgetAverageTxRollbackTime()The mean time to execute tx rollbacks.longgetCacheEvictions()The total number of evictions from the cache.longgetCacheGets()The total number of requests to the cache.floatgetCacheHitPercentage()This is a measure of cache efficiency.longgetCacheHits()The number of get requests that were satisfied by the cache.longgetCacheMisses()A miss is a get request that is not satisfied.floatgetCacheMissPercentage()Returns the percentage of cache accesses that did not find a requested entry in the cache.longgetCachePuts()The total number of puts to the cache.longgetCacheRemovals()The total number of removals from the cache.longgetCacheSize()Cache size.longgetCacheTxCommits()Gets total number of transaction commits.longgetCacheTxRollbacks()Gets total number of transaction rollbacks.intgetDhtEvictQueueCurrentSize()Deprecated.floatgetEntryProcessorAverageInvocationTime()The mean time to execute cache invokes.floatgetEntryProcessorHitPercentage()The percentage of invocations on keys, which exist in cache.longgetEntryProcessorHits()The total number of invocations on keys, which exist in cache.longgetEntryProcessorInvocations()The total number of cache invocations.floatgetEntryProcessorMaxInvocationTime()So far, the maximum time to execute cache invokes.floatgetEntryProcessorMinInvocationTime()So far, the minimum time to execute cache invokes.longgetEntryProcessorMisses()The total number of invocations on keys, which don't exist in cache.floatgetEntryProcessorMissPercentage()The percentage of invocations on keys, which don't exist in cache.longgetEntryProcessorPuts()The total number of cache invocations, caused update.longgetEntryProcessorReadOnlyInvocations()The total number of cache invocations, caused no updates.longgetEntryProcessorRemovals()The total number of cache invocations, caused removal.longgetEstimatedRebalancingFinishTime()longgetEstimatedRebalancingKeys()longgetHeapEntriesCount()Gets the number of cache entries in heap memory, including entries held by active transactions, entries in onheap cache and near entries.intgetIndexBuildPartitionsLeftCount()longgetIndexRebuildKeysProcessed()Return number of keys processed during index rebuilding.intgetKeySize()Deprecated.Can overflow.longgetKeysToRebalanceLeft()StringgetKeyType()Determines the required type of keys for thisCache, if any.longgetOffHeapAllocatedSize()Gets memory size allocated in off-heap.longgetOffHeapBackupEntriesCount()Gets number of backup entries stored in off-heap memory.longgetOffHeapEntriesCount()Gets number of entries stored in off-heap memory.longgetOffHeapEvictions()The total number of evictions from the off-heap memory.longgetOffHeapGets()The total number of get requests to the off-heap memory.floatgetOffHeapHitPercentage()Gets the percentage of hits on off-heap memory.longgetOffHeapHits()The number of get requests that were satisfied by the off-heap memory.longgetOffHeapMisses()A miss is a get request that is not satisfied by off-heap memory.floatgetOffHeapMissPercentage()Gets the percentage of misses on off-heap memory.longgetOffHeapPrimaryEntriesCount()Gets number of primary entries stored in off-heap memory.longgetOffHeapPuts()The total number of put requests to the off-heap memory.longgetOffHeapRemovals()The total number of removals from the off-heap memory.longgetRebalanceClearingPartitionsLeft()longgetRebalancedKeys()longgetRebalancingBytesRate()longgetRebalancingKeysRate()intgetRebalancingPartitionsCount()longgetRebalancingStartTime()intgetSize()Deprecated.Can overflow.intgetTotalPartitionsCount()intgetTxCommitQueueSize()Deprecated.intgetTxCommittedVersionsSize()Gets number of cached committed transaction IDs.intgetTxDhtCommitQueueSize()Deprecated.intgetTxDhtCommittedVersionsSize()Gets number of cached committed DHT transaction IDs.intgetTxDhtPrepareQueueSize()Deprecated.intgetTxDhtRolledbackVersionsSize()Gets number of cached rolled back DHT transaction IDs.intgetTxDhtStartVersionCountsSize()Deprecated.intgetTxDhtThreadMapSize()Gets transaction DHT per-thread map size.intgetTxDhtXidMapSize()Gets transaction DHT per-Xid map size.@NotNull StringgetTxKeyCollisions()Checks if there were any tx key collisions last time.intgetTxPrepareQueueSize()Deprecated.intgetTxRolledbackVersionsSize()Gets number of cached rolled back transaction IDs.intgetTxStartVersionCountsSize()Deprecated.intgetTxThreadMapSize()Gets transaction per-thread map size.intgetTxXidMapSize()Gets transaction per-Xid map size.StringgetValueType()Determines the required type of values for thisCache, if any.intgetWriteBehindBufferSize()Gets count of entries that were processed by the write-behind store and have not been flushed to the underlying store yet.intgetWriteBehindCriticalOverflowCount()Gets count of write buffer overflow events in progress at the moment.intgetWriteBehindErrorRetryCount()Gets count of cache entries that are in a store-retry state.longgetWriteBehindFlushFrequency()Gets the cache flush frequency.intgetWriteBehindFlushSize()Gets the maximum size of the write-behind buffer.intgetWriteBehindFlushThreadCount()Gets the number of flush threads that will perform store update operations.intgetWriteBehindStoreBatchSize()Gets the maximum count of similar (put or remove) operations that can be grouped to a single batch.intgetWriteBehindTotalCriticalOverflowCount()Gets count of write buffer overflow events since initialization.booleanisEmpty()Returnstrueif this cache is empty.booleanisIndexRebuildInProgress()Returntrueif index rebuild is in progress.booleanisManagementEnabled()Checks whether management is enabled on this cache.booleanisReadThrough()Determines if aCacheshould operate in read-through mode.booleanisStatisticsEnabled()Checks whether statistics collection is enabled in this cache.booleanisStoreByValue()Whether storeByValuetrueor storeByReferencefalse.booleanisValidForReading()Checks whether cache topology is valid for read operations.booleanisValidForWriting()Checks whether cache topology is valid for write operations.booleanisWriteBehindEnabled()Returnstrueif write-behind is enabled.booleanisWriteThrough()Determines if aCacheshould operate in "write-through" mode.Stringname()Gets name of this cache.longrebalancingStartTime()Deprecated.
 
- 
- 
- 
Method Detail- 
getCacheHitslong getCacheHits() The number of get requests that were satisfied by the cache.- Returns:
- The number of hits.
 
 - 
getCacheHitPercentagefloat getCacheHitPercentage() This is a measure of cache efficiency.- Returns:
- The percentage of successful hits, as a decimal e.g 75.
 
 - 
getCacheMisseslong getCacheMisses() A miss is a get request that is not satisfied.- Returns:
- The number of misses.
 
 - 
getCacheMissPercentagefloat 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.
 
 - 
getCacheGetslong 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.
 
 - 
getCachePutslong getCachePuts() The total number of puts to the cache.- Returns:
- The number of puts.
 
 - 
getEntryProcessorPutslong getEntryProcessorPuts() The total number of cache invocations, caused update.- Returns:
- The number of invocation updates.
 
 - 
getEntryProcessorRemovalslong getEntryProcessorRemovals() The total number of cache invocations, caused removal.- Returns:
- The number of invocation removals.
 
 - 
getEntryProcessorReadOnlyInvocationslong getEntryProcessorReadOnlyInvocations() The total number of cache invocations, caused no updates.- Returns:
- The number of read-only invocations.
 
 - 
getEntryProcessorInvocationslong getEntryProcessorInvocations() The total number of cache invocations.- Returns:
- The number of cache invocations.
 
 - 
getEntryProcessorHitslong getEntryProcessorHits() The total number of invocations on keys, which exist in cache.- Returns:
- The number of cache invocation hits.
 
 - 
getEntryProcessorHitPercentagefloat getEntryProcessorHitPercentage() The percentage of invocations on keys, which exist in cache.- Returns:
- The percentage of successful invocation hits.
 
 - 
getEntryProcessorMisseslong getEntryProcessorMisses() The total number of invocations on keys, which don't exist in cache.- Returns:
- The number of cache invocation misses.
 
 - 
getEntryProcessorMissPercentagefloat getEntryProcessorMissPercentage() The percentage of invocations on keys, which don't exist in cache.- Returns:
- The percentage of invocation misses.
 
 - 
getEntryProcessorAverageInvocationTimefloat getEntryProcessorAverageInvocationTime() The mean time to execute cache invokes.- Returns:
- The time in µs.
 
 - 
getEntryProcessorMinInvocationTimefloat getEntryProcessorMinInvocationTime() So far, the minimum time to execute cache invokes.- Returns:
- The time in µs.
 
 - 
getEntryProcessorMaxInvocationTimefloat getEntryProcessorMaxInvocationTime() So far, the maximum time to execute cache invokes.- Returns:
- The time in µs.
 
 - 
getCacheRemovalslong 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.
 
 - 
getCacheEvictionslong 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.
 
 - 
getAverageGetTimefloat getAverageGetTime() The mean time to execute gets.- Returns:
- The time in µs.
 
 - 
getAveragePutTimefloat getAveragePutTime() The mean time to execute puts.- Returns:
- The time in µs.
 
 - 
getAverageRemoveTimefloat getAverageRemoveTime() The mean time to execute removes.- Returns:
- The time in µs.
 
 - 
getAverageTxCommitTimefloat getAverageTxCommitTime() The mean time to execute tx commit.- Returns:
- The time in µs.
 
 - 
getAverageTxRollbackTimefloat getAverageTxRollbackTime() The mean time to execute tx rollbacks.- Returns:
- Number of transaction rollbacks.
 
 - 
getCacheTxCommitslong getCacheTxCommits() Gets total number of transaction commits.- Returns:
- Number of transaction commits.
 
 - 
getCacheTxRollbackslong getCacheTxRollbacks() Gets total number of transaction rollbacks.- Returns:
- Number of transaction rollbacks.
 
 - 
nameString name() Gets name of this cache.- Returns:
- Cache name.
 
 - 
getOffHeapGetslong getOffHeapGets() The total number of get requests to the off-heap memory.- Returns:
- The number of gets.
 
 - 
getOffHeapPutslong getOffHeapPuts() The total number of put requests to the off-heap memory.- Returns:
- The number of puts.
 
 - 
getOffHeapRemovalslong getOffHeapRemovals() The total number of removals from the off-heap memory. This does not include evictions.- Returns:
- The number of removals.
 
 - 
getOffHeapEvictionslong getOffHeapEvictions() The total number of evictions from the off-heap memory.- Returns:
- The number of evictions.
 
 - 
getOffHeapHitslong getOffHeapHits() The number of get requests that were satisfied by the off-heap memory.- Returns:
- The off-heap hits number.
 
 - 
getOffHeapHitPercentagefloat getOffHeapHitPercentage() Gets the percentage of hits on off-heap memory.- Returns:
- The percentage of hits on off-heap memory.
 
 - 
getOffHeapMisseslong getOffHeapMisses() A miss is a get request that is not satisfied by off-heap memory.- Returns:
- The off-heap misses number.
 
 - 
getOffHeapMissPercentagefloat getOffHeapMissPercentage() Gets the percentage of misses on off-heap memory.- Returns:
- The percentage of misses on off-heap memory.
 
 - 
getHeapEntriesCountlong 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.
 
 - 
getOffHeapEntriesCountlong getOffHeapEntriesCount() Gets number of entries stored in off-heap memory.- Returns:
- Number of entries stored in off-heap memory.
 
 - 
getOffHeapPrimaryEntriesCountlong getOffHeapPrimaryEntriesCount() Gets number of primary entries stored in off-heap memory.- Returns:
- Number of primary entries stored in off-heap memory.
 
 - 
getOffHeapBackupEntriesCountlong getOffHeapBackupEntriesCount() Gets number of backup entries stored in off-heap memory.- Returns:
- Number of backup entries stored in off-heap memory.
 
 - 
getOffHeapAllocatedSizelong 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-nullvalues in the cache. Note this method will always return0- Returns:
- Number of non-nullvalues in the cache.
 
 - 
getCacheSizelong getCacheSize() Cache size.- Returns:
- Cache size.
 
 - 
getKeySize@Deprecated int getKeySize() Deprecated.Can overflow. UsegetCacheSize()instead.Gets number of keys in the cache, possibly withnullvalues. Note this method will always return0- Returns:
- Number of keys in the cache.
 
 - 
isEmptyboolean isEmpty() Returnstrueif this cache is empty.- Returns:
- Trueif 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.
 
 - 
getTxThreadMapSizeint getTxThreadMapSize() Gets transaction per-thread map size.- Returns:
- Thread map size.
 
 - 
getTxXidMapSizeint 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.
 
 - 
getTxCommittedVersionsSizeint getTxCommittedVersionsSize() Gets number of cached committed transaction IDs.- Returns:
- Number of cached committed transaction IDs.
 
 - 
getTxRolledbackVersionsSizeint getTxRolledbackVersionsSize() Gets number of cached rolled back transaction IDs.- Returns:
- Number of cached rolled back transaction IDs.
 
 - 
getTxDhtThreadMapSizeint getTxDhtThreadMapSize() Gets transaction DHT per-thread map size.- Returns:
- DHT thread map size.
 
 - 
getTxDhtXidMapSizeint 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.
 
 - 
getTxDhtCommittedVersionsSizeint getTxDhtCommittedVersionsSize() Gets number of cached committed DHT transaction IDs.- Returns:
- Number of cached committed DHT transaction IDs.
 
 - 
getTxDhtRolledbackVersionsSizeint getTxDhtRolledbackVersionsSize() Gets number of cached rolled back DHT transaction IDs.- Returns:
- Number of cached rolled back DHT transaction IDs.
 
 - 
isWriteBehindEnabledboolean isWriteBehindEnabled() Returnstrueif write-behind is enabled.- Returns:
- Trueif write-behind is enabled.
 
 - 
getWriteBehindFlushSizeint 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.
 
 - 
getWriteBehindFlushThreadCountint getWriteBehindFlushThreadCount() Gets the number of flush threads that will perform store update operations.- Returns:
- Count of worker threads.
 
 - 
getWriteBehindFlushFrequencylong 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.
 
 - 
getWriteBehindStoreBatchSizeint getWriteBehindStoreBatchSize() Gets the maximum count of similar (put or remove) operations that can be grouped to a single batch.- Returns:
- Maximum size of batch.
 
 - 
getWriteBehindTotalCriticalOverflowCountint 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.
 
 - 
getWriteBehindCriticalOverflowCountint 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.
 
 - 
getWriteBehindErrorRetryCountint 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.
 
 - 
getWriteBehindBufferSizeint 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.
 
 - 
getKeyTypeString 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.
 
 - 
getValueTypeString 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.
 
 - 
isStoreByValueboolean isStoreByValue() Whether storeByValuetrueor 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:
- Trueif the cache is store by value.
 
 - 
getTotalPartitionsCountint getTotalPartitionsCount() - Returns:
- Total number of partitions on current node.
 
 - 
getRebalancingPartitionsCountint getRebalancingPartitionsCount() - Returns:
- Number of currently rebalancing partitions on current node.
 
 - 
getRebalancedKeyslong getRebalancedKeys() - Returns:
- Number of already rebalanced keys.
 
 - 
getEstimatedRebalancingKeyslong getEstimatedRebalancingKeys() - Returns:
- Number estimated to rebalance keys.
 
 - 
getKeysToRebalanceLeftlong getKeysToRebalanceLeft() - Returns:
- Estimated number of keys to be rebalanced on current node.
 
 - 
getRebalancingKeysRatelong getRebalancingKeysRate() - Returns:
- Estimated rebalancing speed in keys.
 
 - 
getRebalancingBytesRatelong 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.
 
 - 
getEstimatedRebalancingFinishTimelong getEstimatedRebalancingFinishTime() - Returns:
- Estimated rebalancing finish time.
 
 - 
getRebalancingStartTimelong getRebalancingStartTime() - Returns:
- Rebalancing start time.
 
 - 
getRebalanceClearingPartitionsLeftlong getRebalanceClearingPartitionsLeft() - Returns:
- The number of partitions need to be cleared before actual rebalance start.
 
 - 
isStatisticsEnabledboolean isStatisticsEnabled() Checks whether statistics collection is enabled in this cache.The default value is false.- Returns:
- Trueif statistics collection is enabled.
 
 - 
isManagementEnabledboolean isManagementEnabled() Checks whether management is enabled on this cache.The default value is false.- Returns:
- trueif management is enabled.
 
 - 
isReadThroughboolean isReadThrough() Determines if aCacheshould operate in read-through mode.The default value is false- Returns:
- Truewhen a- Cacheis in "read-through" mode.
- See Also:
- CacheLoader
 
 - 
isWriteThroughboolean isWriteThrough() Determines if aCacheshould operate in "write-through" mode.will appropriately cause the configured CacheWriterto be invoked.The default value is false- Returns:
- Truewhen a- Cacheis in "write-through" mode.
- See Also:
- CacheWriter
 
 - 
isValidForReadingboolean isValidForReading() Checks whether cache topology is valid for read operations.Note: the method will return falseif any partition was lost despite the fact others can be awailable for reading.- Returns:
- truewhen cache topology is valid for reading.
 
 - 
isValidForWritingboolean isValidForWriting() Checks whether cache topology is valid for write operations.Note: the method will return falseif any partition was lost despite the fact others can be awailable for writing according to configured partition loss policy.- Returns:
- truewhen 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_INTERVALorTransactionsMXBean.setTxKeyCollisionsInterval(int).- Returns:
- Key collisions and appropriate queue size string representation.
 
 - 
isIndexRebuildInProgressboolean isIndexRebuildInProgress() Returntrueif index rebuild is in progress.- Returns:
- trueif index rebuild is in progress.
 
 - 
getIndexRebuildKeysProcessedlong 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.
 
 - 
getIndexBuildPartitionsLeftCountint 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.
 
 
- 
 
-