org.modeshape.jcr.api.monitor

## Interface DurationActivity

- All Superinterfaces:
    Comparable<DurationActivity>
  All Known Implementing Classes:
    RepositoryStatistics.DurationActivityImpl

      public interface DurationActivity
      extends Comparable<DurationActivity>

  The immutable representation of activities with measureable durations.
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DurationActivity[]` | `NO_DURATION_RECORDS` An empty array.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getDuration(TimeUnit unit)` Get the duration of this activity.
    `Map<String,String>` | `getPayload()` Get the payload for this activity.

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Field Detail

    - #### NO_DURATION_RECORDS

          static final DurationActivity[] NO_DURATION_RECORDS

      An empty array.

  - ### Method Detail

    - #### getDuration

          long getDuration(TimeUnit unit)

      Get the duration of this activity.
      Parameters:
        `unit` - the desired time unit for the duration
      Returns:
        the duration in the specified time unit

    - #### getPayload

          Map<String,String> getPayload()

      Get the payload for this activity.
      Returns:
        the payload; may be null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.