Package org.apache.ignite.internal.processors.cache.query

## Class GridCacheQueryMetricsAdapter.QueryMetricsSnapshot

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.query.GridCacheQueryMetricsAdapter.QueryMetricsSnapshot

All Implemented Interfaces:
  `Externalizable`, `Serializable`, `QueryMetrics`

Enclosing class:
  GridCacheQueryMetricsAdapter

    public static class GridCacheQueryMetricsAdapter.QueryMetricsSnapshot
    extends Object
    implements QueryMetrics, Externalizable

Query metrics snapshot.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`QueryMetricsSnapshot()` Required by `Externalizable`.
`QueryMetricsSnapshot​(long minTime, long maxTime, double avgTime, int execs, int fails)`

### Method Summary

All Methods Instance Methods Concrete Methods
`double` `averageTime()` Gets average execution time of query.
`int` `executions()` Gets total number execution of query.
`int` `fails()` Gets total number of times a query execution failed.
`long` `maximumTime()` Gets maximum execution time of query.
`long` `minimumTime()` Gets minimum execution time of query.
`void` `readExternal​(ObjectInput in)`
`void` `writeExternal​(ObjectOutput out)`

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

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

### Constructor Detail

#### QueryMetricsSnapshot

    public QueryMetricsSnapshot()

Required by `Externalizable`.

#### QueryMetricsSnapshot

    public QueryMetricsSnapshot​(long minTime,
                                long maxTime,
                                double avgTime,
                                int execs,
                                int fails)

Parameters:
  `minTime` - Minimal query execution time.
  `maxTime` - Maximum query execution time.
  `avgTime` - Average query execution time.
  `execs` - Count of executed queries.
  `fails` - Count of failed queries.

### Method Detail

#### writeExternal

    public void writeExternal​(ObjectOutput out)
                       throws IOException

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

#### readExternal

    public void readExternal​(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

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

#### minimumTime

    public long minimumTime()

Gets minimum execution time of query.

Specified by:
  `minimumTime` in interface `QueryMetrics`
Returns:
  Minimum execution time of query.

#### maximumTime

    public long maximumTime()

Gets maximum execution time of query.

Specified by:
  `maximumTime` in interface `QueryMetrics`
Returns:
  Maximum execution time of query.

#### averageTime

    public double averageTime()

Gets average execution time of query.

Specified by:
  `averageTime` in interface `QueryMetrics`
Returns:
  Average execution time of query.

#### executions

    public int executions()

Gets total number execution of query.

Specified by:
  `executions` in interface `QueryMetrics`
Returns:
  Number of executions.

#### fails

    public int fails()

Gets total number of times a query execution failed.

Specified by:
  `fails` in interface `QueryMetrics`
Returns:
  Total number of times a query execution failed.