Class CacheMetricsSnapshot
- java.lang.Object
-
- org.apache.ignite.internal.dto.IgniteDataTransferObject
-
- org.apache.ignite.internal.processors.cache.CacheMetricsSnapshot
-
- All Implemented Interfaces:
Externalizable,Serializable,CacheMetrics
public class CacheMetricsSnapshot extends IgniteDataTransferObject implements CacheMetrics
Metrics snapshot.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CacheMetricsSnapshot()Default constructor.CacheMetricsSnapshot(CacheMetrics loc, Collection<CacheMetrics> metrics)Constructs merged cache metrics.CacheMetricsSnapshot(CacheMetricsImpl m)Create snapshot for given metrics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longestimateRebalancingFinishTime()This method is deprecated and will be deleted in future major release.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()Gets current size of evict queue used to batch up evictions.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()Gets number of keys in the cache, possibly withnullvalues.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()Gets number of non-nullvalues in the cache.intgetTotalPartitionsCount()intgetTxCommitQueueSize()Gets committed transaction queue size.intgetTxCommittedVersionsSize()Gets number of cached committed transaction IDs.intgetTxDhtCommitQueueSize()Gets committed DHT transaction queue size.intgetTxDhtCommittedVersionsSize()Gets number of cached committed DHT transaction IDs.intgetTxDhtPrepareQueueSize()Gets prepared DHT transaction queue size.intgetTxDhtRolledbackVersionsSize()Gets number of cached rolled back DHT transaction IDs.intgetTxDhtStartVersionCountsSize()Gets DHT start version counts map size.intgetTxDhtThreadMapSize()Gets transaction DHT per-thread map size.intgetTxDhtXidMapSize()Gets transaction DHT per-Xid map size.StringgetTxKeyCollisions()Checks if there were any tx key collisions last time.intgetTxPrepareQueueSize()Gets prepared transaction queue size.intgetTxRolledbackVersionsSize()Gets number of cached rolled back transaction IDs.intgetTxStartVersionCountsSize()Gets start version counts map size.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.voidreadExternalData(byte protoVer, ObjectInput in)Load object's specific data content.longrebalancingStartTime()This method is deprecated and will be deleted in future major release.StringtoString()voidwriteExternalData(ObjectOutput out)Save object's specific data content.-
Methods inherited from class org.apache.ignite.internal.dto.IgniteDataTransferObject
getProtocolVersion, readExternal, toList, toSet, writeExternal
-
-
-
-
Constructor Detail
-
CacheMetricsSnapshot
public CacheMetricsSnapshot()
Default constructor.
-
CacheMetricsSnapshot
public CacheMetricsSnapshot(CacheMetricsImpl m)
Create snapshot for given metrics.- Parameters:
m- Cache metrics.
-
CacheMetricsSnapshot
public CacheMetricsSnapshot(CacheMetrics loc, Collection<CacheMetrics> metrics)
Constructs merged cache metrics.- Parameters:
loc- Metrics for cache on local node.metrics- Metrics for merge.
-
-
Method Detail
-
getCacheHits
public long getCacheHits()
The number of get requests that were satisfied by the cache.- Specified by:
getCacheHitsin interfaceCacheMetrics- Returns:
- The number of hits.
-
getCacheHitPercentage
public float getCacheHitPercentage()
This is a measure of cache efficiency.- Specified by:
getCacheHitPercentagein interfaceCacheMetrics- Returns:
- The percentage of successful hits, as a decimal e.g 75.
-
getCacheMisses
public long getCacheMisses()
A miss is a get request that is not satisfied.- Specified by:
getCacheMissesin interfaceCacheMetrics- Returns:
- The number of misses.
-
getCacheMissPercentage
public float getCacheMissPercentage()
Returns the percentage of cache accesses that did not find a requested entry in the cache.- Specified by:
getCacheMissPercentagein interfaceCacheMetrics- Returns:
- The percentage of accesses that failed to find anything.
-
getCacheGets
public long getCacheGets()
The total number of requests to the cache. This will be equal to the sum of the hits and misses.- Specified by:
getCacheGetsin interfaceCacheMetrics- Returns:
- The number of gets.
-
getCachePuts
public long getCachePuts()
The total number of puts to the cache.- Specified by:
getCachePutsin interfaceCacheMetrics- Returns:
- The number of puts.
-
getEntryProcessorPuts
public long getEntryProcessorPuts()
The total number of cache invocations, caused update.- Specified by:
getEntryProcessorPutsin interfaceCacheMetrics- Returns:
- The number of invocation updates.
-
getEntryProcessorReadOnlyInvocations
public long getEntryProcessorReadOnlyInvocations()
The total number of cache invocations, caused no updates.- Specified by:
getEntryProcessorReadOnlyInvocationsin interfaceCacheMetrics- Returns:
- The number of read-only invocations.
-
getEntryProcessorInvocations
public long getEntryProcessorInvocations()
The total number of cache invocations.- Specified by:
getEntryProcessorInvocationsin interfaceCacheMetrics- Returns:
- The number of cache invocations.
-
getEntryProcessorHits
public long getEntryProcessorHits()
The total number of invocations on keys, which exist in cache.- Specified by:
getEntryProcessorHitsin interfaceCacheMetrics- Returns:
- The number of cache invocation hits.
-
getEntryProcessorHitPercentage
public float getEntryProcessorHitPercentage()
The percentage of invocations on keys, which exist in cache.- Specified by:
getEntryProcessorHitPercentagein interfaceCacheMetrics- Returns:
- The percentage of successful invocation hits.
-
getEntryProcessorMissPercentage
public float getEntryProcessorMissPercentage()
The percentage of invocations on keys, which don't exist in cache.- Specified by:
getEntryProcessorMissPercentagein interfaceCacheMetrics- Returns:
- The percentage of invocation misses.
-
getEntryProcessorMisses
public long getEntryProcessorMisses()
The total number of invocations on keys, which don't exist in cache.- Specified by:
getEntryProcessorMissesin interfaceCacheMetrics- Returns:
- The number of cache invocation misses.
-
getEntryProcessorRemovals
public long getEntryProcessorRemovals()
The total number of cache invocations, caused removal.- Specified by:
getEntryProcessorRemovalsin interfaceCacheMetrics- Returns:
- The number of invocation removals.
-
getEntryProcessorAverageInvocationTime
public float getEntryProcessorAverageInvocationTime()
The mean time to execute cache invokes.- Specified by:
getEntryProcessorAverageInvocationTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getEntryProcessorMinInvocationTime
public float getEntryProcessorMinInvocationTime()
So far, the minimum time to execute cache invokes.- Specified by:
getEntryProcessorMinInvocationTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getEntryProcessorMaxInvocationTime
public float getEntryProcessorMaxInvocationTime()
So far, the maximum time to execute cache invokes.- Specified by:
getEntryProcessorMaxInvocationTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getCacheRemovals
public 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.- Specified by:
getCacheRemovalsin interfaceCacheMetrics- Returns:
- The number of removals.
-
getCacheEvictions
public 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.- Specified by:
getCacheEvictionsin interfaceCacheMetrics- Returns:
- The number of evictions.
-
getAverageGetTime
public float getAverageGetTime()
The mean time to execute gets.- Specified by:
getAverageGetTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getAveragePutTime
public float getAveragePutTime()
The mean time to execute puts.- Specified by:
getAveragePutTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getAverageRemoveTime
public float getAverageRemoveTime()
The mean time to execute removes.- Specified by:
getAverageRemoveTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getAverageTxCommitTime
public float getAverageTxCommitTime()
The mean time to execute tx commit.- Specified by:
getAverageTxCommitTimein interfaceCacheMetrics- Returns:
- The time in µs.
-
getAverageTxRollbackTime
public float getAverageTxRollbackTime()
The mean time to execute tx rollbacks.- Specified by:
getAverageTxRollbackTimein interfaceCacheMetrics- Returns:
- Number of transaction rollbacks.
-
getCacheTxCommits
public long getCacheTxCommits()
Gets total number of transaction commits.- Specified by:
getCacheTxCommitsin interfaceCacheMetrics- Returns:
- Number of transaction commits.
-
getCacheTxRollbacks
public long getCacheTxRollbacks()
Gets total number of transaction rollbacks.- Specified by:
getCacheTxRollbacksin interfaceCacheMetrics- Returns:
- Number of transaction rollbacks.
-
name
public String name()
Gets name of this cache.- Specified by:
namein interfaceCacheMetrics- Returns:
- Cache name.
-
getOffHeapGets
public long getOffHeapGets()
The total number of get requests to the off-heap memory.- Specified by:
getOffHeapGetsin interfaceCacheMetrics- Returns:
- The number of gets.
-
getOffHeapPuts
public long getOffHeapPuts()
The total number of put requests to the off-heap memory.- Specified by:
getOffHeapPutsin interfaceCacheMetrics- Returns:
- The number of puts.
-
getOffHeapRemovals
public long getOffHeapRemovals()
The total number of removals from the off-heap memory. This does not include evictions.- Specified by:
getOffHeapRemovalsin interfaceCacheMetrics- Returns:
- The number of removals.
-
getOffHeapEvictions
public long getOffHeapEvictions()
The total number of evictions from the off-heap memory.- Specified by:
getOffHeapEvictionsin interfaceCacheMetrics- Returns:
- The number of evictions.
-
getOffHeapHits
public long getOffHeapHits()
The number of get requests that were satisfied by the off-heap memory.- Specified by:
getOffHeapHitsin interfaceCacheMetrics- Returns:
- The off-heap hits number.
-
getOffHeapHitPercentage
public float getOffHeapHitPercentage()
Gets the percentage of hits on off-heap memory.- Specified by:
getOffHeapHitPercentagein interfaceCacheMetrics- Returns:
- The percentage of hits on off-heap memory.
-
getOffHeapMisses
public long getOffHeapMisses()
A miss is a get request that is not satisfied by off-heap memory.- Specified by:
getOffHeapMissesin interfaceCacheMetrics- Returns:
- The off-heap misses number.
-
getOffHeapMissPercentage
public float getOffHeapMissPercentage()
Gets the percentage of misses on off-heap memory.- Specified by:
getOffHeapMissPercentagein interfaceCacheMetrics- Returns:
- The percentage of misses on off-heap memory.
-
getOffHeapEntriesCount
public long getOffHeapEntriesCount()
Gets number of entries stored in off-heap memory.- Specified by:
getOffHeapEntriesCountin interfaceCacheMetrics- Returns:
- Number of entries stored in off-heap memory.
-
getHeapEntriesCount
public long getHeapEntriesCount()
Gets the number of cache entries in heap memory, including entries held by active transactions, entries in onheap cache and near entries.- Specified by:
getHeapEntriesCountin interfaceCacheMetrics- Returns:
- Number of entries in heap memory.
-
getOffHeapPrimaryEntriesCount
public long getOffHeapPrimaryEntriesCount()
Gets number of primary entries stored in off-heap memory.- Specified by:
getOffHeapPrimaryEntriesCountin interfaceCacheMetrics- Returns:
- Number of primary entries stored in off-heap memory.
-
getOffHeapBackupEntriesCount
public long getOffHeapBackupEntriesCount()
Gets number of backup entries stored in off-heap memory.- Specified by:
getOffHeapBackupEntriesCountin interfaceCacheMetrics- Returns:
- Number of backup entries stored in off-heap memory.
-
getOffHeapAllocatedSize
public long getOffHeapAllocatedSize()
Gets memory size allocated in off-heap.- Specified by:
getOffHeapAllocatedSizein interfaceCacheMetrics- Returns:
- Memory size allocated in off-heap.
-
getSize
public int getSize()
Gets number of non-nullvalues in the cache. Note this method will always return0- Specified by:
getSizein interfaceCacheMetrics- Returns:
- Number of non-
nullvalues in the cache.
-
getCacheSize
public long getCacheSize()
Cache size.- Specified by:
getCacheSizein interfaceCacheMetrics- Returns:
- Cache size.
-
getKeySize
public int getKeySize()
Gets number of keys in the cache, possibly withnullvalues. Note this method will always return0- Specified by:
getKeySizein interfaceCacheMetrics- Returns:
- Number of keys in the cache.
-
isEmpty
public boolean isEmpty()
Returnstrueif this cache is empty.- Specified by:
isEmptyin interfaceCacheMetrics- Returns:
Trueif this cache is empty.
-
getDhtEvictQueueCurrentSize
public int getDhtEvictQueueCurrentSize()
Gets current size of evict queue used to batch up evictions.- Specified by:
getDhtEvictQueueCurrentSizein interfaceCacheMetrics- Returns:
- Current size of evict queue.
-
getTxThreadMapSize
public int getTxThreadMapSize()
Gets transaction per-thread map size.- Specified by:
getTxThreadMapSizein interfaceCacheMetrics- Returns:
- Thread map size.
-
getTxXidMapSize
public int getTxXidMapSize()
Gets transaction per-Xid map size.- Specified by:
getTxXidMapSizein interfaceCacheMetrics- Returns:
- Transaction per-Xid map size.
-
getTxCommitQueueSize
public int getTxCommitQueueSize()
Gets committed transaction queue size.- Specified by:
getTxCommitQueueSizein interfaceCacheMetrics- Returns:
- Committed transaction queue size.
-
getTxPrepareQueueSize
public int getTxPrepareQueueSize()
Gets prepared transaction queue size.- Specified by:
getTxPrepareQueueSizein interfaceCacheMetrics- Returns:
- Prepared transaction queue size.
-
getTxStartVersionCountsSize
public int getTxStartVersionCountsSize()
Gets start version counts map size.- Specified by:
getTxStartVersionCountsSizein interfaceCacheMetrics- Returns:
- Start version counts map size.
-
getTxCommittedVersionsSize
public int getTxCommittedVersionsSize()
Gets number of cached committed transaction IDs.- Specified by:
getTxCommittedVersionsSizein interfaceCacheMetrics- Returns:
- Number of cached committed transaction IDs.
-
getTxRolledbackVersionsSize
public int getTxRolledbackVersionsSize()
Gets number of cached rolled back transaction IDs.- Specified by:
getTxRolledbackVersionsSizein interfaceCacheMetrics- Returns:
- Number of cached rolled back transaction IDs.
-
getTxDhtThreadMapSize
public int getTxDhtThreadMapSize()
Gets transaction DHT per-thread map size.- Specified by:
getTxDhtThreadMapSizein interfaceCacheMetrics- Returns:
- DHT thread map size.
-
getTxDhtXidMapSize
public int getTxDhtXidMapSize()
Gets transaction DHT per-Xid map size.- Specified by:
getTxDhtXidMapSizein interfaceCacheMetrics- Returns:
- Transaction DHT per-Xid map size.
-
getTxDhtCommitQueueSize
public int getTxDhtCommitQueueSize()
Gets committed DHT transaction queue size.- Specified by:
getTxDhtCommitQueueSizein interfaceCacheMetrics- Returns:
- Committed DHT transaction queue size.
-
getTxDhtPrepareQueueSize
public int getTxDhtPrepareQueueSize()
Gets prepared DHT transaction queue size.- Specified by:
getTxDhtPrepareQueueSizein interfaceCacheMetrics- Returns:
- Prepared DHT transaction queue size.
-
getTxDhtStartVersionCountsSize
public int getTxDhtStartVersionCountsSize()
Gets DHT start version counts map size.- Specified by:
getTxDhtStartVersionCountsSizein interfaceCacheMetrics- Returns:
- DHT start version counts map size.
-
getTxDhtCommittedVersionsSize
public int getTxDhtCommittedVersionsSize()
Gets number of cached committed DHT transaction IDs.- Specified by:
getTxDhtCommittedVersionsSizein interfaceCacheMetrics- Returns:
- Number of cached committed DHT transaction IDs.
-
getTxDhtRolledbackVersionsSize
public int getTxDhtRolledbackVersionsSize()
Gets number of cached rolled back DHT transaction IDs.- Specified by:
getTxDhtRolledbackVersionsSizein interfaceCacheMetrics- Returns:
- Number of cached rolled back DHT transaction IDs.
-
getTotalPartitionsCount
public int getTotalPartitionsCount()
- Specified by:
getTotalPartitionsCountin interfaceCacheMetrics- Returns:
- Total number of partitions on current node.
-
getRebalancedKeys
public long getRebalancedKeys()
- Specified by:
getRebalancedKeysin interfaceCacheMetrics- Returns:
- Number of already rebalanced keys.
-
getEstimatedRebalancingKeys
public long getEstimatedRebalancingKeys()
- Specified by:
getEstimatedRebalancingKeysin interfaceCacheMetrics- Returns:
- Number estimated to rebalance keys.
-
getRebalancingPartitionsCount
public int getRebalancingPartitionsCount()
- Specified by:
getRebalancingPartitionsCountin interfaceCacheMetrics- Returns:
- Number of currently rebalancing partitions on current node.
-
getKeysToRebalanceLeft
public long getKeysToRebalanceLeft()
- Specified by:
getKeysToRebalanceLeftin interfaceCacheMetrics- Returns:
- Estimated number of keys to be rebalanced on current node.
-
getRebalancingKeysRate
public long getRebalancingKeysRate()
- Specified by:
getRebalancingKeysRatein interfaceCacheMetrics- Returns:
- Estimated rebalancing speed in keys.
-
getRebalancingBytesRate
public long getRebalancingBytesRate()
- Specified by:
getRebalancingBytesRatein interfaceCacheMetrics- Returns:
- Estimated rebalancing speed in bytes.
-
estimateRebalancingFinishTime
public long estimateRebalancingFinishTime()
This method is deprecated and will be deleted in future major release. UseCacheMetrics.getEstimatedRebalancingFinishTime()instead.- Specified by:
estimateRebalancingFinishTimein interfaceCacheMetrics- Returns:
- Estimated rebalancing finished time.
-
rebalancingStartTime
public long rebalancingStartTime()
This method is deprecated and will be deleted in future major release. UseCacheMetrics.getRebalancingStartTime()instead.- Specified by:
rebalancingStartTimein interfaceCacheMetrics- Returns:
- Rebalancing start time.
-
getEstimatedRebalancingFinishTime
public long getEstimatedRebalancingFinishTime()
- Specified by:
getEstimatedRebalancingFinishTimein interfaceCacheMetrics- Returns:
- Estimated rebalancing finish time.
-
getRebalancingStartTime
public long getRebalancingStartTime()
- Specified by:
getRebalancingStartTimein interfaceCacheMetrics- Returns:
- Rebalancing start time.
-
getRebalanceClearingPartitionsLeft
public long getRebalanceClearingPartitionsLeft()
- Specified by:
getRebalanceClearingPartitionsLeftin interfaceCacheMetrics- Returns:
- The number of partitions need to be cleared before actual rebalance start.
-
isWriteBehindEnabled
public boolean isWriteBehindEnabled()
Returnstrueif write-behind is enabled.- Specified by:
isWriteBehindEnabledin interfaceCacheMetrics- Returns:
Trueif write-behind is enabled.
-
getWriteBehindFlushSize
public 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- Specified by:
getWriteBehindFlushSizein interfaceCacheMetrics- Returns:
- Buffer size that triggers flush procedure.
-
getWriteBehindFlushThreadCount
public int getWriteBehindFlushThreadCount()
Gets the number of flush threads that will perform store update operations.- Specified by:
getWriteBehindFlushThreadCountin interfaceCacheMetrics- Returns:
- Count of worker threads.
-
getWriteBehindFlushFrequency
public 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.- Specified by:
getWriteBehindFlushFrequencyin interfaceCacheMetrics- Returns:
- Flush frequency in milliseconds.
-
getWriteBehindStoreBatchSize
public int getWriteBehindStoreBatchSize()
Gets the maximum count of similar (put or remove) operations that can be grouped to a single batch.- Specified by:
getWriteBehindStoreBatchSizein interfaceCacheMetrics- Returns:
- Maximum size of batch.
-
getWriteBehindTotalCriticalOverflowCount
public int getWriteBehindTotalCriticalOverflowCount()
Gets count of write buffer overflow events since initialization. Each overflow event causes the ongoing flush operation to be performed synchronously.- Specified by:
getWriteBehindTotalCriticalOverflowCountin interfaceCacheMetrics- Returns:
- Count of cache overflow events since start.
-
getWriteBehindCriticalOverflowCount
public 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.- Specified by:
getWriteBehindCriticalOverflowCountin interfaceCacheMetrics- Returns:
- Count of cache overflow events since start.
-
getWriteBehindErrorRetryCount
public 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.- Specified by:
getWriteBehindErrorRetryCountin interfaceCacheMetrics- Returns:
- Count of entries in store-retry state.
-
getWriteBehindBufferSize
public int getWriteBehindBufferSize()
Gets count of entries that were processed by the write-behind store and have not been flushed to the underlying store yet.- Specified by:
getWriteBehindBufferSizein interfaceCacheMetrics- Returns:
- Total count of entries in cache store internal buffer.
-
getKeyType
public String getKeyType()
Determines the required type of keys for thisCache, if any.- Specified by:
getKeyTypein interfaceCacheMetrics- Returns:
- The fully qualified class name of the key type,
or
"java.lang.Object"if the type is undefined.
-
getValueType
public String getValueType()
Determines the required type of values for thisCache, if any.- Specified by:
getValueTypein interfaceCacheMetrics- Returns:
- The fully qualified class name of the value type,
or
"java.lang.Object"if the type is undefined.
-
isStoreByValue
public boolean 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.- Specified by:
isStoreByValuein interfaceCacheMetrics- Returns:
Trueif the cache is store by value.
-
isStatisticsEnabled
public boolean isStatisticsEnabled()
Checks whether statistics collection is enabled in this cache.The default value is
false.- Specified by:
isStatisticsEnabledin interfaceCacheMetrics- Returns:
Trueif statistics collection is enabled.
-
isManagementEnabled
public boolean isManagementEnabled()
Checks whether management is enabled on this cache.The default value is
false.- Specified by:
isManagementEnabledin interfaceCacheMetrics- Returns:
trueif management is enabled.
-
isReadThrough
public boolean isReadThrough()
Determines if aCacheshould operate in read-through mode.The default value is
false- Specified by:
isReadThroughin interfaceCacheMetrics- Returns:
Truewhen aCacheis in "read-through" mode.- See Also:
CacheLoader
-
isWriteThrough
public boolean isWriteThrough()
Determines if aCacheshould operate in "write-through" mode.will appropriately cause the configured
CacheWriterto be invoked.The default value is
false- Specified by:
isWriteThroughin interfaceCacheMetrics- Returns:
Truewhen aCacheis in "write-through" mode.- See Also:
CacheWriter
-
isValidForReading
public boolean 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.- Specified by:
isValidForReadingin interfaceCacheMetrics- Returns:
truewhen cache topology is valid for reading.
-
isValidForWriting
public boolean 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.- Specified by:
isValidForWritingin interfaceCacheMetrics- Returns:
truewhen cache topology is valid for writing.
-
getTxKeyCollisions
public 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).- Specified by:
getTxKeyCollisionsin interfaceCacheMetrics- Returns:
- Key collisions and appropriate queue size string representation.
-
isIndexRebuildInProgress
public boolean isIndexRebuildInProgress()
Returntrueif index rebuild is in progress.- Specified by:
isIndexRebuildInProgressin interfaceCacheMetrics- Returns:
trueif index rebuild is in progress.
-
getIndexRebuildKeysProcessed
public long getIndexRebuildKeysProcessed()
Return number of keys processed during index rebuilding. To get remaining number of keys for rebuilding, subtract current value fromCacheMetrics.getCacheSize().- Specified by:
getIndexRebuildKeysProcessedin interfaceCacheMetrics- Returns:
- Number of keys processed during index rebuilding.
-
getIndexBuildPartitionsLeftCount
public int getIndexBuildPartitionsLeftCount()
- Specified by:
getIndexBuildPartitionsLeftCountin interfaceCacheMetrics- 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.
-
writeExternalData
public void writeExternalData(ObjectOutput out) throws IOException
Save object's specific data content.- Specified by:
writeExternalDatain classIgniteDataTransferObject- Parameters:
out- Output object to write data content.- Throws:
IOException- If I/O errors occur.
-
readExternalData
public void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundExceptionLoad object's specific data content.- Specified by:
readExternalDatain classIgniteDataTransferObject- Parameters:
protoVer- Input object version.in- Input object to load data content.- Throws:
IOException- If I/O errors occur.ClassNotFoundException- If the class for an object being restored cannot be found.
-
-