org.apache.ignite

## Interface MemoryMetrics

All Known Subinterfaces:
  MemoryMetricsMXBean

All Known Implementing Classes:
  MemoryMetricsImpl, MemoryMetricsSnapshot

    public interface MemoryMetrics

This interface provides page memory related metrics of a specific Apache Ignite node. The overall page memory architecture is covered in `MemoryConfiguration`.

Since there are can be several memory regions configured with `MemoryPolicyConfiguration` on an individual Apache Ignite node, the metrics for every region will be collected and obtained separately.

There are two ways to get the metrics of an Apache Ignite node.

1. First, a collection of the metrics can be obtained through `Ignite.memoryMetrics()` method. Note that the method returns memory metrics snapshots rather than just in time memory state.
2. Second, all `MemoryMetrics` of a local Apache Ignite node are visible through JMX interface. Refer to `MemoryMetricsMXBean` for more details.

Memory metrics collection is not a free operation and might affect performance of an application. This is the reason why the metrics are turned off by default. To enable the collection you can use both `MemoryPolicyConfiguration.setMetricsEnabled(boolean)` configuration property or `MemoryMetricsMXBean.enableMetrics()` method of a respective JMX bean.

### Method Summary

Methods
`float` `getAllocationRate()` Gets pages allocation rate of a memory region.
`float` `getEvictionRate()` Gets eviction rate of a given memory region.
`float` `getLargeEntriesPagesPercentage()` Gets percentage of pages that are fully occupied by large entries that go beyond page size.
`String` `getName()` A name of a memory region the metrics are collected for.
`float` `getPagesFillFactor()` Gets the percentage of space that is still free and can be filled in.
`long` `getTotalAllocatedPages()` Gets a total number of allocated pages in a memory region.

### Method Detail

#### getName

    String getName()

A name of a memory region the metrics are collected for.

Returns:
  Name of the memory region.

#### getTotalAllocatedPages

    long getTotalAllocatedPages()

Gets a total number of allocated pages in a memory region.

Returns:
  Total number of allocated pages.

#### getAllocationRate

    float getAllocationRate()

Gets pages allocation rate of a memory region.

Returns:
  Number of allocated pages per second.

#### getEvictionRate

    float getEvictionRate()

Gets eviction rate of a given memory region.

Returns:
  Number of evicted pages per second.

#### getLargeEntriesPagesPercentage

    float getLargeEntriesPagesPercentage()

Gets percentage of pages that are fully occupied by large entries that go beyond page size. The large entities are split into fragments in a way so that each fragment can fit into a single page.

Returns:
  Percentage of pages fully occupied by large entities.

#### getPagesFillFactor

    float getPagesFillFactor()

Gets the percentage of space that is still free and can be filled in.

Returns:
  The percentage of space that is still free and can be filled in.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017