org.apache.ignite.internal.visor.cache

## Class VisorCacheMetrics

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorDataTransferObject
  - - org.apache.ignite.internal.visor.cache.VisorCacheMetrics

All Implemented Interfaces:
  Externalizable, Serializable

    public class VisorCacheMetrics
    extends VisorDataTransferObject

Data transfer object for `CacheMetrics`.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`V1, V2`

### Constructor Summary

Constructors
Constructor and Description
`VisorCacheMetrics()` Default constructor.
`VisorCacheMetrics(IgniteEx ignite, String cacheName)` Create data transfer object for given cache metrics.

### Method Summary

Methods
`float` `getAvgPutTime()`
`float` `getAvgReadTime()`
`float` `getAvgRemovalTime()`
`float` `getAvgTxCommitTime()`
`float` `getAvgTxRollbackTime()`
`int` `getCommitsPerSecond()`
`int` `getDhtEvictQueueCurrentSize()`
`long` `getEvictions()`
`long` `getHeapEntriesCount()`
`long` `getHits()`
`int` `getKeySize()`
`long` `getKeysToRebalanceLeft()`
`long` `getMisses()`
`CacheMode` `getMode()`
`String` `getName()`
`long` `getOffHeapAllocatedSize()`
`long` `getOffHeapBackupEntriesCount()`
`long` `getOffHeapEntriesCount()`
`long` `getOffHeapPrimaryEntriesCount()`
`long` `getPuts()`
`int` `getPutsPerSecond()`
`VisorQueryMetrics` `getQueryMetrics()`
`long` `getReads()`
`int` `getReadsPerSecond()`
`long` `getRebalancingBytesRate()`
`long` `getRebalancingKeysRate()`
`int` `getRebalancingPartitionsCount()`
`long` `getRemovals()`
`int` `getRemovalsPerSecond()`
`int` `getRollbacksPerSecond()`
`int` `getSize()`
`int` `getTotalPartitionsCount()`
`int` `getTxCommitQueueSize()`
`long` `getTxCommits()`
`int` `getTxCommittedVersionsSize()`
`int` `getTxDhtCommitQueueSize()`
`int` `getTxDhtCommittedVersionsSize()`
`int` `getTxDhtPrepareQueueSize()`
`int` `getTxDhtRolledbackVersionsSize()`
`int` `getTxDhtStartVersionCountsSize()`
`int` `getTxDhtThreadMapSize()`
`int` `getTxDhtXidMapSize()`
`int` `getTxPrepareQueueSize()`
`long` `getTxRollbacks()`
`int` `getTxRolledbackVersionsSize()`
`int` `getTxStartVersionCountsSize()`
`int` `getTxThreadMapSize()`
`int` `getTxXidMapSize()`
`long` `getWrites()`
`boolean` `isSystem()`
`protected void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`void` `setName(String name)` Sets cache name.
`String` `toString()`
`protected void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

### Methods inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`getProtocolVersion, readExternal, toList, toSet, writeExternal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VisorCacheMetrics

    public VisorCacheMetrics()

Default constructor.

#### VisorCacheMetrics

    public VisorCacheMetrics(IgniteEx ignite,
                     String cacheName)

Create data transfer object for given cache metrics.

Parameters:
  `ignite` - Ignite.
  `cacheName` - Cache name.

### Method Detail

#### getName

    public String getName()

Returns:
  Cache name.

#### setName

    public void setName(String name)

Sets cache name.

Parameters:
  `name` - New value for cache name.

#### getMode

    public CacheMode getMode()

Returns:
  Cache mode.

#### isSystem

    public boolean isSystem()

Returns:
  Cache system state.

#### getReads

    public long getReads()

Returns:
  Total number of reads of the owning entity (either cache or entry).

#### getAvgReadTime

    public float getAvgReadTime()

Returns:
  The mean time to execute gets

#### getWrites

    public long getWrites()

Returns:
  Total number of writes of the owning entity (either cache or entry).

#### getHits

    public long getHits()

Returns:
  Total number of hits for the owning entity (either cache or entry).

#### getMisses

    public long getMisses()

Returns:
  Total number of misses for the owning entity (either cache or entry).

#### getTxCommits

    public long getTxCommits()

Returns:
  Total number of transaction commits.

#### getAvgTxCommitTime

    public float getAvgTxCommitTime()

Returns:
  avgTxCommitTime

#### getAvgTxRollbackTime

    public float getAvgTxRollbackTime()

Returns:
  The mean time to execute tx rollbacks.

#### getPuts

    public long getPuts()

Returns:
  The total number of puts to the cache.

#### getAvgPutTime

    public float getAvgPutTime()

Returns:
  The mean time to execute puts.

#### getRemovals

    public long getRemovals()

Returns:
  The total number of removals from the cache.

#### getAvgRemovalTime

    public float getAvgRemovalTime()

Returns:
  The mean time to execute removes.

#### getEvictions

    public long getEvictions()

Returns:
  The total number of evictions from the cache.

#### getTxRollbacks

    public long getTxRollbacks()

Returns:
  Total number of transaction rollbacks.

#### getReadsPerSecond

    public int getReadsPerSecond()

Returns:
  Reads per second.

#### getPutsPerSecond

    public int getPutsPerSecond()

Returns:
  Puts per second.

#### getRemovalsPerSecond

    public int getRemovalsPerSecond()

Returns:
  Removes per second.

#### getCommitsPerSecond

    public int getCommitsPerSecond()

Returns:
  Commits per second.

#### getRollbacksPerSecond

    public int getRollbacksPerSecond()

Returns:
  Rollbacks per second.

#### getSize

    public int getSize()

Returns:
  Number of non-`null` values in the cache.

#### getKeySize

    public int getKeySize()

Returns:
  Gets number of keys in the cache, possibly with `null` values.

#### getQueryMetrics

    public VisorQueryMetrics getQueryMetrics()

Returns:
  Gets query metrics for cache.

#### getDhtEvictQueueCurrentSize

    public int getDhtEvictQueueCurrentSize()

Returns:
  Current size of evict queue used to batch up evictions.

#### getTxThreadMapSize

    public int getTxThreadMapSize()

Returns:
  Gets transaction per-thread map size.

#### getTxXidMapSize

    public int getTxXidMapSize()

Returns:
  Transaction per-Xid map size.

#### getTxCommitQueueSize

    public int getTxCommitQueueSize()

Returns:
  Committed transaction queue size.

#### getTxPrepareQueueSize

    public int getTxPrepareQueueSize()

Returns:
  Prepared transaction queue size.

#### getTxStartVersionCountsSize

    public int getTxStartVersionCountsSize()

Returns:
  Start version counts map size.

#### getTxCommittedVersionsSize

    public int getTxCommittedVersionsSize()

Returns:
  Number of cached committed transaction IDs.

#### getTxRolledbackVersionsSize

    public int getTxRolledbackVersionsSize()

Returns:
  Number of cached rolled back transaction IDs.

#### getTxDhtThreadMapSize

    public int getTxDhtThreadMapSize()

Returns:
  DHT thread map size

#### getTxDhtXidMapSize

    public int getTxDhtXidMapSize()

Returns:
  Transaction DHT per-Xid map size.

#### getTxDhtCommitQueueSize

    public int getTxDhtCommitQueueSize()

Returns:
  Committed DHT transaction queue size.

#### getTxDhtPrepareQueueSize

    public int getTxDhtPrepareQueueSize()

Returns:
  Prepared DHT transaction queue size.

#### getTxDhtStartVersionCountsSize

    public int getTxDhtStartVersionCountsSize()

Returns:
  DHT start version counts map size.

#### getTxDhtCommittedVersionsSize

    public int getTxDhtCommittedVersionsSize()

Returns:
  Number of cached committed DHT transaction IDs.

#### getTxDhtRolledbackVersionsSize

    public int getTxDhtRolledbackVersionsSize()

Returns:
  Number of cached rolled back DHT transaction IDs.

#### getHeapEntriesCount

    public long getHeapEntriesCount()

Returns:
  Number of entries in heap memory.

#### getOffHeapAllocatedSize

    public long getOffHeapAllocatedSize()

Returns:
  Memory size allocated in off-heap.

#### getOffHeapEntriesCount

    public long getOffHeapEntriesCount()

Returns:
  Number of cache entries stored in off-heap memory.

#### getOffHeapPrimaryEntriesCount

    public long getOffHeapPrimaryEntriesCount()

Returns:
  Number of primary cache entries stored in off-heap memory.

#### getOffHeapBackupEntriesCount

    public long getOffHeapBackupEntriesCount()

Returns:
  Number of backup cache entries stored in off-heap memory.

#### getTotalPartitionsCount

    public int getTotalPartitionsCount()

Returns:
  Total number of partitions on current node.

#### getRebalancingPartitionsCount

    public int getRebalancingPartitionsCount()

Returns:
  Number of currently rebalancing partitions on current node.

#### getKeysToRebalanceLeft

    public long getKeysToRebalanceLeft()

Returns:
  Estimated number of keys to be rebalanced on current node.

#### getRebalancingKeysRate

    public long getRebalancingKeysRate()

Returns:
  Estimated rebalancing speed in keys.

#### getRebalancingBytesRate

    public long getRebalancingBytesRate()

Returns:
  Estimated rebalancing speed in bytes.

#### writeExternalData

    protected void writeExternalData(ObjectOutput out)
                              throws IOException

Save object's specific data content.

Specified by:
  `writeExternalData` in class `VisorDataTransferObject`
Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### readExternalData

    protected void readExternalData(byte protoVer,
                        ObjectInput in)
                             throws IOException,
                                    ClassNotFoundException

Load object's specific data content.

Specified by:
  `readExternalData` in class `VisorDataTransferObject`
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.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017