|
ModeShape Distribution 3.0.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.RepositoryStatistics
@ThreadSafe public class RepositoryStatistics
A component that records statistics for a variety of repository metrics, and makes the statistics available for a variety of windows. The value metrics currently include:
active sessions - the number of sessions that are open during the window;active queries - the number of queries that were executing during the window;workspaces - the number of workspaces in existence during the window;listeners - the number of listeners registered during the window;session-scoped locks - the number of locks held by sessions during the
window;non-scoped locks - the number of non-scoped locks held during the window;
save operations - the number of Session save operations performed the window;changed nodes - the number of nodes that were created, updated, or deleted during
the window;session lifetime - the duration of the sessions closed during the window;query execution time - the duration of queries that finished during the
window;sequencer execution time - the duration of sequencing operations
completed during the window;history for a particular metric during a specified window, where the
window is comprised of the statistics (the average value, minimum value, maximum value, variance, standard
deviation, number of samples, and time interval of the statistics) for:
To use, simply instantiate and start it by supplying a
ScheduledExecutorService instance, which is used to create a periodic task that runs every 5 seconds to roll up
measured metrics into the various statistic windows. When completed, simply call stop() to have the object clean up
after itself.
| Nested Class Summary | |
|---|---|
static class |
RepositoryStatistics.DurationActivity
The RepositoryStatistics.MetricHistory specialization used for recording the statistics for activities with measured durations. |
protected static class |
RepositoryStatistics.DurationHistory
|
static class |
RepositoryStatistics.History
A history of a metric for a given window in time. |
protected static class |
RepositoryStatistics.MetricHistory
Abstract base class for the RepositoryStatistics.ValueHistory and RepositoryStatistics.DurationHistory classes. |
static class |
RepositoryStatistics.Statistics
The statistics for a sample of values. |
protected static class |
RepositoryStatistics.ValueHistory
The RepositoryStatistics.MetricHistory specialization used for recording the statistics for running values. |
| Field Summary | |
|---|---|
static long |
CAPTURE_INTERVAL_IN_SECONDS
The frequency at which the metric values are rolled into statistics. |
protected static long |
DURATION_OF_24_HOURS_WINDOW_IN_SECONDS
|
protected static long |
DURATION_OF_52_WEEKS_WINDOW_IN_SECONDS
|
protected static long |
DURATION_OF_60_MINUTES_WINDOW_IN_SECONDS
|
protected static long |
DURATION_OF_60_SECONDS_WINDOW_IN_SECONDS
|
protected static long |
DURATION_OF_7_DAYS_WINDOW_IN_SECONDS
|
static int |
MAXIMUM_LONG_RUNNING_QUERY_COUNT
The maximum number of longest-running queries to retain. |
static int |
MAXIMUM_LONG_RUNNING_SEQUENCING_COUNT
The maximum number of longest-running sequencing operations to retain. |
static int |
MAXIMUM_LONG_RUNNING_SESSION_COUNT
The maximum number of longest-running sessions to retain. |
| Method Summary | |
|---|---|
Set<DurationMetric> |
getAvailableDurationMetrics()
Get the DurationMetric enumerations that are available for use by the caller with RepositoryMonitor.getHistory(DurationMetric, Window). |
Set<ValueMetric> |
getAvailableValueMetrics()
Get the ValueMetric enumerations that are available for use by the caller with RepositoryMonitor.getHistory(ValueMetric, Window). |
Set<Window> |
getAvailableWindows()
Get the Window enumerations that are available for use by the caller with RepositoryMonitor.getHistory(DurationMetric, Window) and
RepositoryMonitor.getHistory(ValueMetric, Window). |
RepositoryStatistics.History |
getHistory(DurationMetric metric,
Window windowInTime)
Get the statics for the specified duration metric during the given window in time. |
RepositoryStatistics.History |
getHistory(ValueMetric metric,
Window windowInTime)
Get the statics for the specified value metric during the given window in time. |
RepositoryStatistics.DurationActivity[] |
getLongestRunning(DurationMetric metric)
Get the longest-running activities recorded for the specified metric. |
static RepositoryStatistics.Statistics |
statisticsFor(long value)
Utility method to construct the statistics for a series of values. |
static RepositoryStatistics.Statistics |
statisticsFor(long[] values)
Utility method to construct the statistics for a series of values. |
static RepositoryStatistics.Statistics |
statisticsFor(RepositoryStatistics.Statistics[] statistics)
Utility method to construct the composite statistics for a series of sampled statistics. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAXIMUM_LONG_RUNNING_QUERY_COUNT
public static final int MAXIMUM_LONG_RUNNING_SEQUENCING_COUNT
public static final int MAXIMUM_LONG_RUNNING_SESSION_COUNT
public static final long CAPTURE_INTERVAL_IN_SECONDS
protected static final long DURATION_OF_52_WEEKS_WINDOW_IN_SECONDS
protected static final long DURATION_OF_7_DAYS_WINDOW_IN_SECONDS
protected static final long DURATION_OF_24_HOURS_WINDOW_IN_SECONDS
protected static final long DURATION_OF_60_MINUTES_WINDOW_IN_SECONDS
protected static final long DURATION_OF_60_SECONDS_WINDOW_IN_SECONDS
| Method Detail |
|---|
public Set<DurationMetric> getAvailableDurationMetrics()
RepositoryMonitorRepositoryMonitor.getHistory(DurationMetric, Window).
getAvailableDurationMetrics in interface RepositoryMonitorRepositoryMonitor.getHistory(DurationMetric, Window),
RepositoryMonitor.getLongestRunning(DurationMetric)public Set<ValueMetric> getAvailableValueMetrics()
RepositoryMonitorRepositoryMonitor.getHistory(ValueMetric, Window).
getAvailableValueMetrics in interface RepositoryMonitorRepositoryMonitor.getHistory(ValueMetric, Window)public Set<Window> getAvailableWindows()
RepositoryMonitorRepositoryMonitor.getHistory(DurationMetric, Window) and
RepositoryMonitor.getHistory(ValueMetric, Window).
getAvailableWindows in interface RepositoryMonitorRepositoryMonitor.getHistory(DurationMetric, Window),
RepositoryMonitor.getHistory(ValueMetric, Window)
public RepositoryStatistics.History getHistory(ValueMetric metric,
Window windowInTime)
RepositoryMonitor
getHistory in interface RepositoryMonitormetric - the value metric; may not be nullwindowInTime - the window specifying which statistics are to be returned; may not be null
RepositoryMonitor.getAvailableValueMetrics(),
RepositoryMonitor.getAvailableWindows()
public RepositoryStatistics.History getHistory(DurationMetric metric,
Window windowInTime)
RepositoryMonitor
getHistory in interface RepositoryMonitormetric - the duration metric; may not be nullwindowInTime - the window specifying which statistics are to be returned; may not be null
RepositoryMonitor.getAvailableDurationMetrics(),
RepositoryMonitor.getAvailableWindows()public RepositoryStatistics.DurationActivity[] getLongestRunning(DurationMetric metric)
RepositoryMonitor
getLongestRunning in interface RepositoryMonitormetric - the duration metric; may not be null
RepositoryMonitor.getAvailableDurationMetrics()public static RepositoryStatistics.Statistics statisticsFor(long value)
value - the single value
public static RepositoryStatistics.Statistics statisticsFor(long[] values)
values - the values; the array reference may not be null but the array may be empty
public static RepositoryStatistics.Statistics statisticsFor(RepositoryStatistics.Statistics[] statistics)
statistics - the sample statistics that are to be combined; the array reference may not be null but the array may be
empty
|
ModeShape Distribution 3.0.0.CR1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||