org.apache.ignite.internal

## Class ClusterMetricsMXBeanImpl

- java.lang.Object
- - org.apache.ignite.internal.ClusterMetricsMXBeanImpl

All Implemented Interfaces:
  ClusterMetrics, ClusterMetricsMXBean

    public class ClusterMetricsMXBeanImpl
    extends Object
    implements ClusterMetricsMXBean

Cluster metrics MBean.

### Constructor Summary

Constructors
Constructor and Description
`ClusterMetricsMXBeanImpl(ClusterGroup cluster)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Set<String>` `attributeNames()` Get distinct attribute names for given nodes projection.
`Set<String>` `attributeValues(String attrName)` Get distinct attribute values for given nodes projection.
`int` `getActiveBaselineNodes()` Get count of active baseline nodes.
`float` `getAverageActiveJobs()` Gets average number of active jobs concurrently executing on the node.
`float` `getAverageCancelledJobs()` Gets average number of cancelled jobs this node ever had running concurrently.
`double` `getAverageCpuLoad()` Gets average of CPU load values over all metrics kept in the history.
`double` `getAverageJobExecuteTime()` Gets average time a job takes to execute on the node.
`double` `getAverageJobWaitTime()` Gets average time jobs spend waiting in the queue to be executed.
`float` `getAverageRejectedJobs()` Gets average number of jobs this node rejects during collision resolution operations.
`float` `getAverageWaitingJobs()` Gets average number of waiting jobs this node had queued.
`float` `getBusyTimePercentage()` Gets percentage of time this node is busy executing jobs vs. idling.
`int` `getCurrentActiveJobs()` Gets number of currently active jobs concurrently executing on the node.
`int` `getCurrentCancelledJobs()` Gets number of cancelled jobs that are still running.
`double` `getCurrentCpuLoad()` Returns the CPU usage usage in `[0, 1]` range.
`int` `getCurrentDaemonThreadCount()` Returns the current number of live daemon threads.
`double` `getCurrentGcCpuLoad()` Returns average time spent in CG since the last update.
`long` `getCurrentIdleTime()` Gets time this node spend idling since executing last job.
`long` `getCurrentJobExecuteTime()` Gets longest time a current job has been executing for.
`long` `getCurrentJobWaitTime()` Gets current time an oldest jobs has spent waiting to be executed.
`long` `getCurrentPmeDuration()` Gets execution duration for current partition map exchange in milliseconds.
`int` `getCurrentRejectedJobs()` Gets number of jobs rejected after more recent collision resolution operation.
`int` `getCurrentThreadCount()` Returns the current number of live threads including both daemon and non-daemon threads.
`int` `getCurrentWaitingJobs()` Gets number of queued jobs currently waiting to be executed.
`long` `getHeapMemoryCommitted()` Returns the amount of heap memory in bytes that is committed for the JVM to use.
`long` `getHeapMemoryInitialized()` Returns the amount of heap memory in bytes that the JVM initially requests from the operating system for memory management.
`long` `getHeapMemoryMaximum()` Returns the maximum amount of heap memory in bytes that can be used for memory management.
`long` `getHeapMemoryTotal()` Returns the total amount of heap memory in bytes.
`long` `getHeapMemoryUsed()` Returns the current heap size that is used for object allocation.
`float` `getIdleTimePercentage()` Gets percentage of time this node is idling vs. executing jobs.
`long` `getLastDataVersion()` In-Memory Data Grid assigns incremental versions to all cache operations.
`long` `getLastUpdateTime()` Gets last update time of this node metrics.
`int` `getMaximumActiveJobs()` Gets maximum number of jobs that ever ran concurrently on this node.
`int` `getMaximumCancelledJobs()` Gets maximum number of cancelled jobs this node ever had running concurrently.
`long` `getMaximumJobExecuteTime()` Gets time it took to execute the longest job on the node.
`long` `getMaximumJobWaitTime()` Gets maximum time a job ever spent waiting in a queue to be executed.
`int` `getMaximumRejectedJobs()` Gets maximum number of jobs rejected at once during a single collision resolution operation.
`int` `getMaximumThreadCount()` Returns the maximum live thread count since the JVM started or peak was reset.
`int` `getMaximumWaitingJobs()` Gets maximum number of waiting jobs this node had.
`long` `getNodeStartTime()` Returns the start time of grid node in milliseconds.
`long` `getNonHeapMemoryCommitted()` Returns the amount of non-heap memory in bytes that is committed for the JVM to use.
`long` `getNonHeapMemoryInitialized()` Returns the amount of non-heap memory in bytes that the JVM initially requests from the operating system for memory management.
`long` `getNonHeapMemoryMaximum()` Returns the maximum amount of non-heap memory in bytes that can be used for memory management.
`long` `getNonHeapMemoryTotal()` Returns the total amount of non-heap memory in bytes that can be used for memory management.
`long` `getNonHeapMemoryUsed()` Returns the current non-heap memory size that is used by Java VM.
`int` `getOutboundMessagesQueueSize()` Gets outbound messages queue size.
`long` `getReceivedBytesCount()` Gets received bytes count.
`int` `getReceivedMessagesCount()` Gets received messages count.
`long` `getSentBytesCount()` Gets sent bytes count.
`int` `getSentMessagesCount()` Gets sent messages count.
`long` `getStartTime()` Returns the start time of the JVM in milliseconds.
`long` `getTopologyVersion()` Get current topology version.
`int` `getTotalBaselineNodes()` Get count of total baseline nodes.
`long` `getTotalBusyTime()` Gets total time this node spent executing jobs.
`int` `getTotalCancelledJobs()` Gets number of cancelled jobs since node startup.
`int` `getTotalClientNodes()` Get count of client nodes.
`int` `getTotalCpus()` Returns the number of CPUs available to the Java Virtual Machine.
`int` `getTotalExecutedJobs()` Gets total number of jobs handled by the node since node startup.
`int` `getTotalExecutedTasks()` Gets total number of tasks handled by the node.
`long` `getTotalIdleTime()` Gets total time this node spent idling (not executing any jobs).
`long` `getTotalJobsExecutionTime()` Gets total time all finished jobs takes to execute on the node since node startup.
`int` `getTotalNodes()` Gets total number of nodes.
`int` `getTotalRejectedJobs()` Gets total number of jobs this node rejects during collision resolution operations since node startup.
`int` `getTotalServerNodes()` Get count of server nodes.
`long` `getTotalStartedThreadCount()` Returns the total number of threads created and also started since the JVM started.
`long` `getUpTime()` Returns the uptime of the JVM in milliseconds.
`Set<UUID>` `nodeIdsForAttribute(String attrName, String attrVal, boolean includeSrvs, boolean includeClients)` Get node IDs with the given attribute value.
`String` `toString()`

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

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

### Constructor Detail

#### ClusterMetricsMXBeanImpl

    public ClusterMetricsMXBeanImpl(ClusterGroup cluster)

Parameters:
  `cluster` - Cluster group to manage.

### Method Detail

#### getTotalCpus

    public int getTotalCpus()

Returns the number of CPUs available to the Java Virtual Machine. This method is equivalent to the `Runtime.availableProcessors()` method.

Note that this value may change during successive invocations of the virtual machine.

Specified by:
  `getTotalCpus` in interface `ClusterMetrics`
Specified by:
  `getTotalCpus` in interface `ClusterMetricsMXBean`
Returns:
  The number of processors available to the virtual machine, never smaller than one.

#### getAverageActiveJobs

    public float getAverageActiveJobs()

Gets average number of active jobs concurrently executing on the node.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageActiveJobs` in interface `ClusterMetrics`
Specified by:
  `getAverageActiveJobs` in interface `ClusterMetricsMXBean`
Returns:
  Average number of active jobs.

#### getAverageCancelledJobs

    public float getAverageCancelledJobs()

Gets average number of cancelled jobs this node ever had running concurrently.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageCancelledJobs` in interface `ClusterMetrics`
Specified by:
  `getAverageCancelledJobs` in interface `ClusterMetricsMXBean`
Returns:
  Average number of cancelled jobs.

#### getAverageJobExecuteTime

    public double getAverageJobExecuteTime()

Gets average time a job takes to execute on the node.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageJobExecuteTime` in interface `ClusterMetrics`
Specified by:
  `getAverageJobExecuteTime` in interface `ClusterMetricsMXBean`
Returns:
  Average job execution time.

#### getAverageJobWaitTime

    public double getAverageJobWaitTime()

Gets average time jobs spend waiting in the queue to be executed.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageJobWaitTime` in interface `ClusterMetrics`
Specified by:
  `getAverageJobWaitTime` in interface `ClusterMetricsMXBean`
Returns:
  Average job wait time.

#### getAverageRejectedJobs

    public float getAverageRejectedJobs()

Gets average number of jobs this node rejects during collision resolution operations.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of grid configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageRejectedJobs` in interface `ClusterMetrics`
Specified by:
  `getAverageRejectedJobs` in interface `ClusterMetricsMXBean`
Returns:
  Average number of jobs this node rejects during collision resolution operations.

#### getAverageWaitingJobs

    public float getAverageWaitingJobs()

Gets average number of waiting jobs this node had queued.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageWaitingJobs` in interface `ClusterMetrics`
Specified by:
  `getAverageWaitingJobs` in interface `ClusterMetricsMXBean`
Returns:
  Average number of waiting jobs.

#### getBusyTimePercentage

    public float getBusyTimePercentage()

Gets percentage of time this node is busy executing jobs vs. idling.

Specified by:
  `getBusyTimePercentage` in interface `ClusterMetrics`
Specified by:
  `getBusyTimePercentage` in interface `ClusterMetricsMXBean`
Returns:
  Percentage of time this node is busy (value is less than or equal to `1` and greater than or equal to `0`)

#### getCurrentActiveJobs

    public int getCurrentActiveJobs()

Gets number of currently active jobs concurrently executing on the node.

Specified by:
  `getCurrentActiveJobs` in interface `ClusterMetrics`
Specified by:
  `getCurrentActiveJobs` in interface `ClusterMetricsMXBean`
Returns:
  Number of currently active jobs concurrently executing on the node.

#### getCurrentCancelledJobs

    public int getCurrentCancelledJobs()

Gets number of cancelled jobs that are still running. Just like regular java threads, jobs will receive cancel notification, but it's ultimately up to the job itself to gracefully exit.

Specified by:
  `getCurrentCancelledJobs` in interface `ClusterMetrics`
Specified by:
  `getCurrentCancelledJobs` in interface `ClusterMetricsMXBean`
Returns:
  Number of cancelled jobs that are still running.

#### getCurrentIdleTime

    public long getCurrentIdleTime()

Gets time this node spend idling since executing last job.

Specified by:
  `getCurrentIdleTime` in interface `ClusterMetrics`
Specified by:
  `getCurrentIdleTime` in interface `ClusterMetricsMXBean`
Returns:
  Time this node spend idling since executing last job.

#### getCurrentJobExecuteTime

    public long getCurrentJobExecuteTime()

Gets longest time a current job has been executing for.

Specified by:
  `getCurrentJobExecuteTime` in interface `ClusterMetrics`
Specified by:
  `getCurrentJobExecuteTime` in interface `ClusterMetricsMXBean`
Returns:
  Longest time a current job has been executing for.

#### getCurrentJobWaitTime

    public long getCurrentJobWaitTime()

Gets current time an oldest jobs has spent waiting to be executed.

Specified by:
  `getCurrentJobWaitTime` in interface `ClusterMetrics`
Specified by:
  `getCurrentJobWaitTime` in interface `ClusterMetricsMXBean`
Returns:
  Current wait time of oldest job.

#### getCurrentRejectedJobs

    public int getCurrentRejectedJobs()

Gets number of jobs rejected after more recent collision resolution operation.

Specified by:
  `getCurrentRejectedJobs` in interface `ClusterMetrics`
Specified by:
  `getCurrentRejectedJobs` in interface `ClusterMetricsMXBean`
Returns:
  Number of jobs rejected after more recent collision resolution operation.

#### getCurrentWaitingJobs

    public int getCurrentWaitingJobs()

Gets number of queued jobs currently waiting to be executed.

Specified by:
  `getCurrentWaitingJobs` in interface `ClusterMetrics`
Specified by:
  `getCurrentWaitingJobs` in interface `ClusterMetricsMXBean`
Returns:
  Number of queued jobs currently waiting to be executed.

#### getTotalExecutedTasks

    public int getTotalExecutedTasks()

Gets total number of tasks handled by the node.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getTotalExecutedTasks` in interface `ClusterMetrics`
Specified by:
  `getTotalExecutedTasks` in interface `ClusterMetricsMXBean`
Returns:
  Total number of jobs handled by the node.

#### getCurrentDaemonThreadCount

    public int getCurrentDaemonThreadCount()

Returns the current number of live daemon threads.

Specified by:
  `getCurrentDaemonThreadCount` in interface `ClusterMetrics`
Specified by:
  `getCurrentDaemonThreadCount` in interface `ClusterMetricsMXBean`
Returns:
  Current number of live daemon threads.

#### getHeapMemoryCommitted

    public long getHeapMemoryCommitted()

Returns the amount of heap memory in bytes that is committed for the JVM to use. This amount of memory is guaranteed for the JVM to use. The heap consists of one or more memory pools. This value is the sum of `committed` heap memory values of all heap memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getHeapMemoryCommitted` in interface `ClusterMetrics`
Specified by:
  `getHeapMemoryCommitted` in interface `ClusterMetricsMXBean`
Returns:
  The amount of committed memory in bytes.

#### getHeapMemoryInitialized

    public long getHeapMemoryInitialized()

Returns the amount of heap memory in bytes that the JVM initially requests from the operating system for memory management. This method returns `-1` if the initial memory size is undefined.

This value represents a setting of the heap memory for Java VM and is not a sum of all initial heap values for all memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getHeapMemoryInitialized` in interface `ClusterMetrics`
Specified by:
  `getHeapMemoryInitialized` in interface `ClusterMetricsMXBean`
Returns:
  The initial size of memory in bytes; `-1` if undefined.

#### getHeapMemoryMaximum

    public long getHeapMemoryMaximum()

Returns the maximum amount of heap memory in bytes that can be used for memory management. This method returns `-1` if the maximum memory size is undefined.

This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size.

This value represents a setting of the heap memory for Java VM and is not a sum of all initial heap values for all memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getHeapMemoryMaximum` in interface `ClusterMetrics`
Specified by:
  `getHeapMemoryMaximum` in interface `ClusterMetricsMXBean`
Returns:
  The maximum amount of memory in bytes; `-1` if undefined.

#### getHeapMemoryTotal

    public long getHeapMemoryTotal()

Returns the total amount of heap memory in bytes. This method returns `-1` if the total memory size is undefined.

This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size.

This value represents a setting of the heap memory for Java VM and is not a sum of all initial heap values for all memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getHeapMemoryTotal` in interface `ClusterMetrics`
Specified by:
  `getHeapMemoryTotal` in interface `ClusterMetricsMXBean`
Returns:
  The total amount of memory in bytes; `-1` if undefined.

#### getHeapMemoryUsed

    public long getHeapMemoryUsed()

Returns the current heap size that is used for object allocation. The heap consists of one or more memory pools. This value is the sum of `used` heap memory values of all heap memory pools.

The amount of used memory in the returned is the amount of memory occupied by both live objects and garbage objects that have not been collected, if any.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getHeapMemoryUsed` in interface `ClusterMetrics`
Specified by:
  `getHeapMemoryUsed` in interface `ClusterMetricsMXBean`
Returns:
  Amount of heap memory used.

#### getIdleTimePercentage

    public float getIdleTimePercentage()

Gets percentage of time this node is idling vs. executing jobs.

Specified by:
  `getIdleTimePercentage` in interface `ClusterMetrics`
Specified by:
  `getIdleTimePercentage` in interface `ClusterMetricsMXBean`
Returns:
  Percentage of time this node is idle (value is less than or equal to `1` and greater than or equal to `0`)

#### getLastUpdateTime

    public long getLastUpdateTime()

Gets last update time of this node metrics.

Specified by:
  `getLastUpdateTime` in interface `ClusterMetrics`
Specified by:
  `getLastUpdateTime` in interface `ClusterMetricsMXBean`
Returns:
  Last update time.

#### getMaximumActiveJobs

    public int getMaximumActiveJobs()

Gets maximum number of jobs that ever ran concurrently on this node. Note that this different from `ClusterMetrics.getTotalExecutedJobs()` metric and only reflects maximum number of jobs that ran at the same time.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getMaximumActiveJobs` in interface `ClusterMetrics`
Specified by:
  `getMaximumActiveJobs` in interface `ClusterMetricsMXBean`
Returns:
  Maximum number of jobs that ever ran concurrently on this node.

#### getMaximumCancelledJobs

    public int getMaximumCancelledJobs()

Gets maximum number of cancelled jobs this node ever had running concurrently.

Specified by:
  `getMaximumCancelledJobs` in interface `ClusterMetrics`
Specified by:
  `getMaximumCancelledJobs` in interface `ClusterMetricsMXBean`
Returns:
  Maximum number of cancelled jobs.

#### getMaximumJobExecuteTime

    public long getMaximumJobExecuteTime()

Gets time it took to execute the longest job on the node.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getMaximumJobExecuteTime` in interface `ClusterMetrics`
Specified by:
  `getMaximumJobExecuteTime` in interface `ClusterMetricsMXBean`
Returns:
  Time it took to execute the longest job on the node.

#### getMaximumJobWaitTime

    public long getMaximumJobWaitTime()

Gets maximum time a job ever spent waiting in a queue to be executed.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getMaximumJobWaitTime` in interface `ClusterMetrics`
Specified by:
  `getMaximumJobWaitTime` in interface `ClusterMetricsMXBean`
Returns:
  Maximum waiting time.

#### getMaximumRejectedJobs

    public int getMaximumRejectedJobs()

Gets maximum number of jobs rejected at once during a single collision resolution operation.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getMaximumRejectedJobs` in interface `ClusterMetrics`
Specified by:
  `getMaximumRejectedJobs` in interface `ClusterMetricsMXBean`
Returns:
  Maximum number of jobs rejected at once.

#### getMaximumWaitingJobs

    public int getMaximumWaitingJobs()

Gets maximum number of waiting jobs this node had.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getMaximumWaitingJobs` in interface `ClusterMetrics`
Specified by:
  `getMaximumWaitingJobs` in interface `ClusterMetricsMXBean`
Returns:
  Maximum number of waiting jobs.

#### getNonHeapMemoryCommitted

    public long getNonHeapMemoryCommitted()

Returns the amount of non-heap memory in bytes that is committed for the JVM to use. This amount of memory is guaranteed for the JVM to use. The non-heap memory consists of one or more memory pools. This value is the sum of `committed` non-heap memory values of all non-heap memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getNonHeapMemoryCommitted` in interface `ClusterMetrics`
Specified by:
  `getNonHeapMemoryCommitted` in interface `ClusterMetricsMXBean`
Returns:
  The amount of committed memory in bytes.

#### getNonHeapMemoryInitialized

    public long getNonHeapMemoryInitialized()

Returns the amount of non-heap memory in bytes that the JVM initially requests from the operating system for memory management. This method returns `-1` if the initial memory size is undefined.

This value represents a setting of non-heap memory for Java VM and is not a sum of all initial heap values for all memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getNonHeapMemoryInitialized` in interface `ClusterMetrics`
Specified by:
  `getNonHeapMemoryInitialized` in interface `ClusterMetricsMXBean`
Returns:
  The initial size of memory in bytes; `-1` if undefined.

#### getNonHeapMemoryMaximum

    public long getNonHeapMemoryMaximum()

Returns the maximum amount of non-heap memory in bytes that can be used for memory management. This method returns `-1` if the maximum memory size is undefined.

This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size.

This value represents a setting of the non-heap memory for Java VM and is not a sum of all initial non-heap values for all memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getNonHeapMemoryMaximum` in interface `ClusterMetrics`
Specified by:
  `getNonHeapMemoryMaximum` in interface `ClusterMetricsMXBean`
Returns:
  The maximum amount of memory in bytes; `-1` if undefined.

#### getNonHeapMemoryTotal

    public long getNonHeapMemoryTotal()

Returns the total amount of non-heap memory in bytes that can be used for memory management. This method returns `-1` if the total memory size is undefined.

This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size.

This value represents a setting of the non-heap memory for Java VM and is not a sum of all initial non-heap values for all memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getNonHeapMemoryTotal` in interface `ClusterMetrics`
Specified by:
  `getNonHeapMemoryTotal` in interface `ClusterMetricsMXBean`
Returns:
  The total amount of memory in bytes; `-1` if undefined.

#### getNonHeapMemoryUsed

    public long getNonHeapMemoryUsed()

Returns the current non-heap memory size that is used by Java VM. The non-heap memory consists of one or more memory pools. This value is the sum of `used` non-heap memory values of all non-heap memory pools.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getNonHeapMemoryUsed` in interface `ClusterMetrics`
Specified by:
  `getNonHeapMemoryUsed` in interface `ClusterMetricsMXBean`
Returns:
  Amount of none-heap memory used.

#### getMaximumThreadCount

    public int getMaximumThreadCount()

Returns the maximum live thread count since the JVM started or peak was reset.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getMaximumThreadCount` in interface `ClusterMetrics`
Specified by:
  `getMaximumThreadCount` in interface `ClusterMetricsMXBean`
Returns:
  The peak live thread count.

#### getStartTime

    public long getStartTime()

Returns the start time of the JVM in milliseconds. This method returns the approximate time when the Java virtual machine started.

Specified by:
  `getStartTime` in interface `ClusterMetrics`
Specified by:
  `getStartTime` in interface `ClusterMetricsMXBean`
Returns:
  Start time of the JVM in milliseconds.

#### getNodeStartTime

    public long getNodeStartTime()

Returns the start time of grid node in milliseconds. There can be several grid nodes started in one JVM, so JVM start time will be the same for all of them, but node start time will be different.

Specified by:
  `getNodeStartTime` in interface `ClusterMetrics`
Specified by:
  `getNodeStartTime` in interface `ClusterMetricsMXBean`
Returns:
  Start time of the grid node in milliseconds.

#### getCurrentCpuLoad

    public double getCurrentCpuLoad()

Returns the CPU usage usage in `[0, 1]` range. The exact way how this number is calculated depends on SPI implementation.

If the CPU usage is not available, a negative value is returned.

This method is designed to provide a hint about the system load and may be queried frequently. The load average may be unavailable on some platform where it is expensive to implement this method.

Specified by:
  `getCurrentCpuLoad` in interface `ClusterMetrics`
Specified by:
  `getCurrentCpuLoad` in interface `ClusterMetricsMXBean`
Returns:
  The estimated CPU usage in `[0, 1]` range. Negative value if not available.

#### getAverageCpuLoad

    public double getAverageCpuLoad()

Gets average of CPU load values over all metrics kept in the history.

Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings:

- `IgniteConfiguration.getMetricsExpireTime()`
- `IgniteConfiguration.getMetricsHistorySize()`

Specified by:
  `getAverageCpuLoad` in interface `ClusterMetrics`
Specified by:
  `getAverageCpuLoad` in interface `ClusterMetricsMXBean`
Returns:
  Average of CPU load value in `[0, 1]` range over all metrics kept in the history.

#### getCurrentGcCpuLoad

    public double getCurrentGcCpuLoad()

Returns average time spent in CG since the last update.

Specified by:
  `getCurrentGcCpuLoad` in interface `ClusterMetrics`
Specified by:
  `getCurrentGcCpuLoad` in interface `ClusterMetricsMXBean`
Returns:
  Average time spent in CG since the last update.

#### getCurrentThreadCount

    public int getCurrentThreadCount()

Returns the current number of live threads including both daemon and non-daemon threads.

Specified by:
  `getCurrentThreadCount` in interface `ClusterMetrics`
Specified by:
  `getCurrentThreadCount` in interface `ClusterMetricsMXBean`
Returns:
  Current number of live threads.

#### getTotalBusyTime

    public long getTotalBusyTime()

Gets total time this node spent executing jobs.

Specified by:
  `getTotalBusyTime` in interface `ClusterMetrics`
Specified by:
  `getTotalBusyTime` in interface `ClusterMetricsMXBean`
Returns:
  Total time this node spent executing jobs.

#### getTotalCancelledJobs

    public int getTotalCancelledJobs()

Gets number of cancelled jobs since node startup.

Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life.

Specified by:
  `getTotalCancelledJobs` in interface `ClusterMetrics`
Specified by:
  `getTotalCancelledJobs` in interface `ClusterMetricsMXBean`
Returns:
  Total number of cancelled jobs since node startup.

#### getTotalExecutedJobs

    public int getTotalExecutedJobs()

Gets total number of jobs handled by the node since node startup.

Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life.

Specified by:
  `getTotalExecutedJobs` in interface `ClusterMetrics`
Specified by:
  `getTotalExecutedJobs` in interface `ClusterMetricsMXBean`
Returns:
  Total number of jobs handled by the node since node startup.

#### getTotalJobsExecutionTime

    public long getTotalJobsExecutionTime()

Gets total time all finished jobs takes to execute on the node since node startup.

Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life.

Specified by:
  `getTotalJobsExecutionTime` in interface `ClusterMetrics`
Specified by:
  `getTotalJobsExecutionTime` in interface `ClusterMetricsMXBean`
Returns:
  Total jobs execution time.

#### getTotalIdleTime

    public long getTotalIdleTime()

Gets total time this node spent idling (not executing any jobs).

Specified by:
  `getTotalIdleTime` in interface `ClusterMetrics`
Specified by:
  `getTotalIdleTime` in interface `ClusterMetricsMXBean`
Returns:
  Gets total time this node spent idling.

#### getTotalRejectedJobs

    public int getTotalRejectedJobs()

Gets total number of jobs this node rejects during collision resolution operations since node startup.

Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life.

Specified by:
  `getTotalRejectedJobs` in interface `ClusterMetrics`
Specified by:
  `getTotalRejectedJobs` in interface `ClusterMetricsMXBean`
Returns:
  Total number of jobs this node rejects during collision resolution operations since node startup.

#### getTotalStartedThreadCount

    public long getTotalStartedThreadCount()

Returns the total number of threads created and also started since the JVM started.

Note: this is not an aggregated metric and it's calculated from the time of the node's startup.

Specified by:
  `getTotalStartedThreadCount` in interface `ClusterMetrics`
Specified by:
  `getTotalStartedThreadCount` in interface `ClusterMetricsMXBean`
Returns:
  The total number of threads started.

#### getUpTime

    public long getUpTime()

Returns the uptime of the JVM in milliseconds.

Specified by:
  `getUpTime` in interface `ClusterMetrics`
Specified by:
  `getUpTime` in interface `ClusterMetricsMXBean`
Returns:
  Uptime of the JVM in milliseconds.

#### getLastDataVersion

    public long getLastDataVersion()

In-Memory Data Grid assigns incremental versions to all cache operations. This method provides the latest data version on the node.

Specified by:
  `getLastDataVersion` in interface `ClusterMetrics`
Specified by:
  `getLastDataVersion` in interface `ClusterMetricsMXBean`
Returns:
  Last data version.

#### getSentMessagesCount

    public int getSentMessagesCount()

Gets sent messages count.

Specified by:
  `getSentMessagesCount` in interface `ClusterMetrics`
Specified by:
  `getSentMessagesCount` in interface `ClusterMetricsMXBean`
Returns:
  Sent messages count.

#### getSentBytesCount

    public long getSentBytesCount()

Gets sent bytes count.

Specified by:
  `getSentBytesCount` in interface `ClusterMetrics`
Specified by:
  `getSentBytesCount` in interface `ClusterMetricsMXBean`
Returns:
  Sent bytes count.

#### getReceivedMessagesCount

    public int getReceivedMessagesCount()

Gets received messages count.

Specified by:
  `getReceivedMessagesCount` in interface `ClusterMetrics`
Specified by:
  `getReceivedMessagesCount` in interface `ClusterMetricsMXBean`
Returns:
  Received messages count.

#### getReceivedBytesCount

    public long getReceivedBytesCount()

Gets received bytes count.

Specified by:
  `getReceivedBytesCount` in interface `ClusterMetrics`
Specified by:
  `getReceivedBytesCount` in interface `ClusterMetricsMXBean`
Returns:
  Received bytes count.

#### getOutboundMessagesQueueSize

    public int getOutboundMessagesQueueSize()

Gets outbound messages queue size.

Specified by:
  `getOutboundMessagesQueueSize` in interface `ClusterMetrics`
Specified by:
  `getOutboundMessagesQueueSize` in interface `ClusterMetricsMXBean`
Returns:
  Outbound messages queue size.

#### getTotalNodes

    public int getTotalNodes()

Gets total number of nodes.

Specified by:
  `getTotalNodes` in interface `ClusterMetrics`
Specified by:
  `getTotalNodes` in interface `ClusterMetricsMXBean`
Returns:
  Total number of nodes.

#### getCurrentPmeDuration

    public long getCurrentPmeDuration()

Gets execution duration for current partition map exchange in milliseconds.

Specified by:
  `getCurrentPmeDuration` in interface `ClusterMetrics`
Specified by:
  `getCurrentPmeDuration` in interface `ClusterMetricsMXBean`
Returns:
  Gets execution duration for current partition map exchange in milliseconds. `0` if there is no running PME.

#### getTotalBaselineNodes

    public int getTotalBaselineNodes()

Get count of total baseline nodes.

Specified by:
  `getTotalBaselineNodes` in interface `ClusterMetricsMXBean`
Returns:
  Count of total baseline nodes.

#### getActiveBaselineNodes

    public int getActiveBaselineNodes()

Get count of active baseline nodes.

Specified by:
  `getActiveBaselineNodes` in interface `ClusterMetricsMXBean`
Returns:
  Count of active baseline nodes.

#### getTotalServerNodes

    public int getTotalServerNodes()

Get count of server nodes.

Specified by:
  `getTotalServerNodes` in interface `ClusterMetricsMXBean`
Returns:
  Count of server nodes.

#### getTotalClientNodes

    public int getTotalClientNodes()

Get count of client nodes.

Specified by:
  `getTotalClientNodes` in interface `ClusterMetricsMXBean`
Returns:
  Count of client nodes.

#### getTopologyVersion

    public long getTopologyVersion()

Get current topology version.

Specified by:
  `getTopologyVersion` in interface `ClusterMetricsMXBean`
Returns:
  Current topology version.

#### attributeNames

    public Set<String> attributeNames()

Get distinct attribute names for given nodes projection.

Specified by:
  `attributeNames` in interface `ClusterMetricsMXBean`

#### attributeValues

    public Set<String> attributeValues(String attrName)

Get distinct attribute values for given nodes projection.

Specified by:
  `attributeValues` in interface `ClusterMetricsMXBean`
Parameters:
  `attrName` - Attribute name.

#### nodeIdsForAttribute

    public Set<UUID> nodeIdsForAttribute(String attrName,
                                         String attrVal,
                                         boolean includeSrvs,
                                         boolean includeClients)

Get node IDs with the given attribute value.

Specified by:
  `nodeIdsForAttribute` in interface `ClusterMetricsMXBean`
Parameters:
  `attrName` - Attribute name.
  `attrVal` - Attribute value.
  `includeSrvs` - Include server nodes.
  `includeClients` - Include client nodes.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.1
Release Date | : May 21 2020