StubDurationTracker (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.statistics.impl, class: StubDurationTracker

Package org.apache.hadoop.fs.statistics.impl

# Class StubDurationTracker

java.lang.Object
org.apache.hadoop.fs.statistics.impl.StubDurationTracker

All Implemented Interfaces:
  `AutoCloseable`, `DurationTracker`

public final class StubDurationTracker extends Object implements DurationTracker
A simple stub duration tracker which can be issued in interfaces and other places where full duration tracking is not implemented.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final DurationTracker`
  `STUB_DURATION_TRACKER`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Duration`
  `asDuration()`
  Get the duration of an operation as a java Duration instance.
  `void`
  `close()`
  Finish tracking: update the statistics with the timings.
  `void`
  `failed()`
  The operation failed.

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

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

- ## Field Details

  - ### STUB_DURATION_TRACKER

    public static final DurationTracker STUB_DURATION_TRACKER

- ## Method Details

  - ### failed

    public void failed()
    Description copied from interface: `DurationTracker`
    The operation failed. Failure statistics will be updated.
    Specified by:
      `failed` in interface `DurationTracker`

  - ### close

    public void close()
    Description copied from interface: `DurationTracker`
    Finish tracking: update the statistics with the timings.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `DurationTracker`

  - ### asDuration

    public Duration asDuration()
    Description copied from interface: `DurationTracker`
    Get the duration of an operation as a java Duration instance. If the duration tracker hasn't completed, or its duration tracking doesn't actually measure duration, returns Duration.ZERO.
    Specified by:
      `asDuration` in interface `DurationTracker`
    Returns:
      a duration, value of ZERO until close().