ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr
Class RepositoryStatistics.History

java.lang.Object
  extended by org.modeshape.jcr.RepositoryStatistics.History
All Implemented Interfaces:
History
Enclosing class:
RepositoryStatistics

@Immutable
public static final class RepositoryStatistics.History
extends Object
implements History

A history of a metric for a given window in time.

See Also:
RepositoryStatistics.getHistory(DurationMetric, Window), RepositoryStatistics.getHistory(ValueMetric, Window)

Constructor Summary
protected RepositoryStatistics.History(RepositoryStatistics.Statistics[] stats, DateTime endTime, Window window)
           
 
Method Summary
 DateTime getEndTime()
          Get the timestamp (including time zone information) at which this history window ends.
 DateTime getStartTime()
          Get the timestamp (including time zone information) at which this history window starts.
 RepositoryStatistics.Statistics[] getStats()
          Get the statistics for that make up the history.
 long getTotalDuration(TimeUnit unit)
          Get the total duration of this history window.
 Window getWindow()
          Get the kind of window.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryStatistics.History

protected RepositoryStatistics.History(RepositoryStatistics.Statistics[] stats,
                                       DateTime endTime,
                                       Window window)
Method Detail

getWindow

public Window getWindow()
Description copied from interface: History
Get the kind of window.

Specified by:
getWindow in interface History
Returns:
the window type; never null

getTotalDuration

public long getTotalDuration(TimeUnit unit)
Description copied from interface: History
Get the total duration of this history window.

Specified by:
getTotalDuration in interface History
Parameters:
unit - the desired time unit; if null, then TimeUnit.SECONDS is used
Returns:
the duration

getStartTime

public DateTime getStartTime()
Description copied from interface: History
Get the timestamp (including time zone information) at which this history window starts.

Specified by:
getStartTime in interface History
Returns:
the time at which this window starts

getEndTime

public DateTime getEndTime()
Description copied from interface: History
Get the timestamp (including time zone information) at which this history window ends.

Specified by:
getEndTime in interface History
Returns:
the time at which this window ends

getStats

public RepositoryStatistics.Statistics[] getStats()
Description copied from interface: History
Get the statistics for that make up the history.

Specified by:
getStats in interface History
Returns:
the statistics; never null, but the array may contain null if the window is longer than the lifetime of the repository

toString

public String toString()
Overrides:
toString in class Object

ModeShape Distribution 3.0.0.Beta4

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