public class ProfilingStatus extends Object implements Comparable<ProfilingStatus>, Serializable
ProfilingStatus.Level
and number of
milliseconds beyond which to consider an operation to be slow.Modifier and Type | Class and Description |
---|---|
static class |
ProfilingStatus.Level
Level provides the set of available profiling levels provided by the
MongoDB server.
|
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_SLOW_MS
The default threshold (100L )for the number of milliseconds beyond
considering an operation slow.
|
static ProfilingStatus |
OFF
The off profiling state.
|
static ProfilingStatus |
ON
The all profiling state.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ProfilingStatus other) |
boolean |
equals(Object object) |
ProfilingStatus.Level |
getLevel()
Returns the profiling level to use.
|
long |
getSlowMillisThreshold()
Returns the number of milliseconds beyond which to consider an operation
to be slow.
|
int |
hashCode() |
static ProfilingStatus |
slow(int slowMillis)
Creates a profiling state to profile operations taking more than
slowMillis to complete. |
String |
toString() |
public static final long DEFAULT_SLOW_MS
public static final ProfilingStatus OFF
public static final ProfilingStatus ON
public static final ProfilingStatus slow(int slowMillis)
slowMillis
to complete.slowMillis
- The number of milliseconds beyond which to consider an
operation to be slow.public int compareTo(ProfilingStatus other)
Overridden to return an ordering based on the tuple ordering of (level, slowMs).
compareTo
in interface Comparable<ProfilingStatus>
public boolean equals(Object object)
Overridden to compare this object to the passed object.
public ProfilingStatus.Level getLevel()
public long getSlowMillisThreshold()
public int hashCode()
Overridden to generate a suitable hash of the objects state.
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.