Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr
Class RepositoryStatistics.DurationActivity

    java.lang.Object
      org.modeshape.jcr.RepositoryStatistics.DurationActivity

All Implemented Interfaces:
  Comparable<DurationActivity>, DurationActivity

Enclosing class:
  RepositoryStatistics

    @Immutable
    public static final class RepositoryStatistics.DurationActivity

extends Object
implements DurationActivity

The `RepositoryStatistics.MetricHistory` specialization used for recording the statistics for activities with measured durations.

Field Summary
`protected long` | `duration`
`protected Map<String,String>` | `payload`
`protected TimeUnit` | `timeUnit`

Constructor Summary
`protected` | `RepositoryStatistics.DurationActivity(long duration, TimeUnit timeUnit, Map<String,String> payload)`

Method Summary
`int` | `compareTo(DurationActivity that)`
`long` | `getDuration(TimeUnit unit)` Get the duration of this activity.
`Map<String,String>` | `getPayload()` Get the payload for this activity.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### duration

    protected final long duration

### payload

    protected final Map<String,String> payload

### timeUnit

    protected final TimeUnit timeUnit

Constructor Detail

### RepositoryStatistics.DurationActivity

    protected RepositoryStatistics.DurationActivity(long duration,
                                                    TimeUnit timeUnit,
                                                    Map<String,String> payload)

Method Detail

### getDuration

    public long getDuration(TimeUnit unit)

  Description copied from interface: `DurationActivity`
  Get the duration of this activity.

  Specified by:
    `getDuration` in interface `DurationActivity`
  Parameters:
    `unit` - the desired time unit for the duration
  Returns:
    the duration in the specified time unit

### getPayload

    public Map<String,String> getPayload()

  Description copied from interface: `DurationActivity`
  Get the payload for this activity.

  Specified by:
    `getPayload` in interface `DurationActivity`
  Returns:
    the payload; may be null

### compareTo

    public int compareTo(DurationActivity that)

  Specified by:
    `compareTo` in interface `Comparable<DurationActivity>`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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