org.apache.ignite

## Class DataStorageMetricsAdapter

- java.lang.Object
- - org.apache.ignite.DataStorageMetricsAdapter

All Implemented Interfaces:
  PersistenceMetrics

    public class DataStorageMetricsAdapter
    extends Object
    implements PersistenceMetrics

Converter class from `DataStorageMetrics` to legacy `PersistenceMetrics`.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`long` `getLastCheckpointCopiedOnWritePagesNumber()` Gets the number of pages copied to a temporary checkpoint buffer during the last checkpoint.
`long` `getLastCheckpointDataPagesNumber()` Gets the number of data pages written during the last checkpoint.
`long` `getLastCheckpointFsyncDuration()` Gets the duration of the sync phase of the last checkpoint in milliseconds.
`long` `getLastCheckpointingDuration()` Gets the duration of the last checkpoint in milliseconds.
`long` `getLastCheckpointLockWaitDuration()` Gets the duration of last checkpoint lock wait in milliseconds.
`long` `getLastCheckpointMarkDuration()` Gets the duration of last checkpoint mark phase in milliseconds.
`long` `getLastCheckpointPagesWriteDuration()` Gets the duration of last checkpoint pages write phase in milliseconds.
`long` `getLastCheckpointTotalPagesNumber()` Gets the total number of pages written during the last checkpoint.
`int` `getWalArchiveSegments()` Gets the current number of WAL segments in the WAL archive.
`float` `getWalFsyncTimeAverage()` Gets the average WAL fsync duration in microseconds over the last time interval.
`float` `getWalLoggingRate()` Gets the average number of WAL records per second written during the last time interval.
`float` `getWalWritingRate()` Gets the average number of bytes per second written during the last time interval.
`static DataStorageMetricsAdapter` `valueOf(DataStorageMetrics delegate)`

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

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

### Method Detail

#### valueOf

    public static DataStorageMetricsAdapter valueOf(DataStorageMetrics delegate)

Parameters:
  `delegate` - DataStorageMetrics.
Returns:
  Wrapped `DataStorageMetrics` that implements `PersistenceMetrics`. Null value is not wrapped and returned as is.

#### getWalLoggingRate

    public float getWalLoggingRate()

Gets the average number of WAL records per second written during the last time interval.

The length of time interval is configured via `PersistentStoreConfiguration.setRateTimeInterval(long)` configurartion property. The number of subintervals is configured via `PersistentStoreConfiguration.setSubIntervals(int)` configuration property.

Specified by:
  `getWalLoggingRate` in interface `PersistenceMetrics`

#### getWalWritingRate

    public float getWalWritingRate()

Gets the average number of bytes per second written during the last time interval. The length of time interval is configured via `PersistentStoreConfiguration.setRateTimeInterval(long)` configurartion property. The number of subintervals is configured via `PersistentStoreConfiguration.setSubIntervals(int)` configuration property.

Specified by:
  `getWalWritingRate` in interface `PersistenceMetrics`

#### getWalArchiveSegments

    public int getWalArchiveSegments()

Gets the current number of WAL segments in the WAL archive.

Specified by:
  `getWalArchiveSegments` in interface `PersistenceMetrics`

#### getWalFsyncTimeAverage

    public float getWalFsyncTimeAverage()

Gets the average WAL fsync duration in microseconds over the last time interval.

The length of time interval is configured via `PersistentStoreConfiguration.setRateTimeInterval(long)` configurartion property. The number of subintervals is configured via `PersistentStoreConfiguration.setSubIntervals(int)` configuration property.

Specified by:
  `getWalFsyncTimeAverage` in interface `PersistenceMetrics`

#### getLastCheckpointingDuration

    public long getLastCheckpointingDuration()

Gets the duration of the last checkpoint in milliseconds.

Specified by:
  `getLastCheckpointingDuration` in interface `PersistenceMetrics`
Returns:
  Total checkpoint duration in milliseconds.

#### getLastCheckpointLockWaitDuration

    public long getLastCheckpointLockWaitDuration()

Gets the duration of last checkpoint lock wait in milliseconds.

Specified by:
  `getLastCheckpointLockWaitDuration` in interface `PersistenceMetrics`
Returns:
  Checkpoint lock wait time in milliseconds.

#### getLastCheckpointMarkDuration

    public long getLastCheckpointMarkDuration()

Gets the duration of last checkpoint mark phase in milliseconds.

Specified by:
  `getLastCheckpointMarkDuration` in interface `PersistenceMetrics`
Returns:
  Checkpoint mark duration in milliseconds.

#### getLastCheckpointPagesWriteDuration

    public long getLastCheckpointPagesWriteDuration()

Gets the duration of last checkpoint pages write phase in milliseconds.

Specified by:
  `getLastCheckpointPagesWriteDuration` in interface `PersistenceMetrics`
Returns:
  Checkpoint pages write phase in milliseconds.

#### getLastCheckpointFsyncDuration

    public long getLastCheckpointFsyncDuration()

Gets the duration of the sync phase of the last checkpoint in milliseconds.

Specified by:
  `getLastCheckpointFsyncDuration` in interface `PersistenceMetrics`
Returns:
  Checkpoint fsync time in milliseconds.

#### getLastCheckpointTotalPagesNumber

    public long getLastCheckpointTotalPagesNumber()

Gets the total number of pages written during the last checkpoint.

Specified by:
  `getLastCheckpointTotalPagesNumber` in interface `PersistenceMetrics`
Returns:
  Total number of pages written during the last checkpoint.

#### getLastCheckpointDataPagesNumber

    public long getLastCheckpointDataPagesNumber()

Gets the number of data pages written during the last checkpoint.

Specified by:
  `getLastCheckpointDataPagesNumber` in interface `PersistenceMetrics`
Returns:
  Total number of data pages written during the last checkpoint.

#### getLastCheckpointCopiedOnWritePagesNumber

    public long getLastCheckpointCopiedOnWritePagesNumber()

Gets the number of pages copied to a temporary checkpoint buffer during the last checkpoint.

Specified by:
  `getLastCheckpointCopiedOnWritePagesNumber` in interface `PersistenceMetrics`
Returns:
  Total number of pages copied to a temporary checkpoint buffer during the last checkpoint.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019