org.apache.ignite.internal.processors.igfs

## Class IgfsMetricsAdapter

- java.lang.Object
- - org.apache.ignite.internal.processors.igfs.IgfsMetricsAdapter

All Implemented Interfaces:
  Externalizable, Serializable, IgfsMetrics

    public class IgfsMetricsAdapter
    extends Object
    implements IgfsMetrics, Externalizable

IGFS metrics adapter.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`IgfsMetricsAdapter()` `Externalizable` support.
`IgfsMetricsAdapter(long locSpaceSize, long maxSpaceSize, long secondarySpaceSize, int dirsCnt, int filesCnt, int filesOpenedForRead, int filesOpenedForWrite, long blocksReadTotal, long blocksReadRmt, long blocksWrittenTotal, long blocksWrittenRmt, long bytesRead, long bytesReadTime, long bytesWritten, long bytesWriteTime)`

### Method Summary

Methods
`long` `blocksReadRemote()` Gets total remote blocks read.
`long` `blocksReadTotal()` Gets total blocks read, local and remote.
`long` `blocksWrittenRemote()` Gets total remote blocks written.
`long` `blocksWrittenTotal()` Gets total blocks written, local and remote.
`long` `bytesRead()` Gets total bytes read.
`long` `bytesReadTime()` Gets total bytes read time.
`long` `bytesWriteTime()` Gets total bytes write time.
`long` `bytesWritten()` Gets total bytes written.
`int` `directoriesCount()` Gets number of directories created in file system.
`int` `filesCount()` Gets number of files stored in file system.
`int` `filesOpenedForRead()` Gets number of files that are currently opened for reading.
`int` `filesOpenedForWrite()` Gets number of files that are currently opened for writing.
`long` `localSpaceSize()` Gets local used space in bytes.
`long` `maxSpaceSize()` Gets maximum amount of data that can be stored on local node.
`void` `readExternal(ObjectInput in)`
`long` `secondarySpaceSize()` Get used space in bytes used in the secondary file system.
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### IgfsMetricsAdapter

    public IgfsMetricsAdapter()

`Externalizable` support.

#### IgfsMetricsAdapter

    public IgfsMetricsAdapter(long locSpaceSize,
                      long maxSpaceSize,
                      long secondarySpaceSize,
                      int dirsCnt,
                      int filesCnt,
                      int filesOpenedForRead,
                      int filesOpenedForWrite,
                      long blocksReadTotal,
                      long blocksReadRmt,
                      long blocksWrittenTotal,
                      long blocksWrittenRmt,
                      long bytesRead,
                      long bytesReadTime,
                      long bytesWritten,
                      long bytesWriteTime)

Parameters:
  `locSpaceSize` - Used space on local node.
  `maxSpaceSize` - Maximum space size.
  `secondarySpaceSize` - Secondary space size.
  `dirsCnt` - Number of directories.
  `filesCnt` - Number of files.
  `filesOpenedForRead` - Number of files opened for read.
  `filesOpenedForWrite` - Number of files opened for write.
  `blocksReadTotal` - Total blocks read.
  `blocksReadRmt` - Total blocks read remotely.
  `blocksWrittenTotal` - Total blocks written.
  `blocksWrittenRmt` - Total blocks written remotely.
  `bytesRead` - Total bytes read.
  `bytesReadTime` - Total bytes read time.
  `bytesWritten` - Total bytes written.
  `bytesWriteTime` - Total bytes write time.

### Method Detail

#### localSpaceSize

    public long localSpaceSize()

Gets local used space in bytes. This is the sum of all file chunks stored on local node.

This is a local metric.

Specified by:
  `localSpaceSize` in interface `IgfsMetrics`
Returns:
  Node used space in bytes.

#### maxSpaceSize

    public long maxSpaceSize()

Gets maximum amount of data that can be stored on local node. This metrics is either equal to `FileSystemConfiguration.getMaxSpaceSize()`, or, if it is `0`, equal to `80%` of maximum heap size allocated for JVM.

Specified by:
  `maxSpaceSize` in interface `IgfsMetrics`
Returns:
  Maximum IGFS local space size.

#### secondarySpaceSize

    public long secondarySpaceSize()

Get used space in bytes used in the secondary file system.

This is a global metric.

Specified by:
  `secondarySpaceSize` in interface `IgfsMetrics`
Returns:
  Used space in the secondary file system or `0` in case no secondary file system is configured.

#### directoriesCount

    public int directoriesCount()

Gets number of directories created in file system.

This is a global metric.

Specified by:
  `directoriesCount` in interface `IgfsMetrics`
Returns:
  Number of directories.

#### filesCount

    public int filesCount()

Gets number of files stored in file system.

This is a global metric.

Specified by:
  `filesCount` in interface `IgfsMetrics`
Returns:
  Number of files.

#### filesOpenedForRead

    public int filesOpenedForRead()

Gets number of files that are currently opened for reading.

This is a local metric.

Specified by:
  `filesOpenedForRead` in interface `IgfsMetrics`
Returns:
  Number of opened files.

#### filesOpenedForWrite

    public int filesOpenedForWrite()

Gets number of files that are currently opened for writing.

This is a local metric.

Specified by:
  `filesOpenedForWrite` in interface `IgfsMetrics`
Returns:
  Number of opened files.

#### blocksReadTotal

    public long blocksReadTotal()

Gets total blocks read, local and remote.

This is a local metric.

Specified by:
  `blocksReadTotal` in interface `IgfsMetrics`
Returns:
  Total blocks read.

#### blocksReadRemote

    public long blocksReadRemote()

Gets total remote blocks read.

This is a local metric.

Specified by:
  `blocksReadRemote` in interface `IgfsMetrics`
Returns:
  Total blocks remote read.

#### blocksWrittenTotal

    public long blocksWrittenTotal()

Gets total blocks written, local and remote.

This is a local metric.

Specified by:
  `blocksWrittenTotal` in interface `IgfsMetrics`
Returns:
  Total blocks written.

#### blocksWrittenRemote

    public long blocksWrittenRemote()

Gets total remote blocks written.

This is a local metric.

Specified by:
  `blocksWrittenRemote` in interface `IgfsMetrics`
Returns:
  Total blocks written.

#### bytesRead

    public long bytesRead()

Gets total bytes read.

This is a local metric.

Specified by:
  `bytesRead` in interface `IgfsMetrics`
Returns:
  Total bytes read.

#### bytesReadTime

    public long bytesReadTime()

Gets total bytes read time.

This is a local metric.

Specified by:
  `bytesReadTime` in interface `IgfsMetrics`
Returns:
  Total bytes read time.

#### bytesWritten

    public long bytesWritten()

Gets total bytes written.

This is a local metric.

Specified by:
  `bytesWritten` in interface `IgfsMetrics`
Returns:
  Total bytes written.

#### bytesWriteTime

    public long bytesWriteTime()

Gets total bytes write time.

This is a local metric.

Specified by:
  `bytesWriteTime` in interface `IgfsMetrics`
Returns:
  Total bytes write time.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.1.0-incubating
Release Date | : May 20 2015