org.opensolaris.os.dtrace
Class Drop

java.lang.Object
  extended by org.opensolaris.os.dtrace.Drop
All Implemented Interfaces:
java.io.Serializable

public final class Drop
extends java.lang.Object
implements java.io.Serializable

Detail about one or more records dropped by DTrace (not reported to ConsumerListener.dataReceived()) due to inadequte buffer space.

Immutable. Supports persistence using XMLEncoder.

See Also:
ConsumerListener.dataDropped(DropEvent e), Serialized Form

Nested Class Summary
static class Drop.Kind
          Indicates what kind of buffer space experienced the data drop (such as principal buffer or aggregation buffer) and possibly a reason.
 
Constructor Summary
Drop(int dropCPU, java.lang.String dropKindName, long dropCount, long totalDrops, java.lang.String defaultDropMessage)
          Creates a Drop instance with the given CPU, drop kind, drop counts, and default message.
 
Method Summary
 long getCount()
          Gets the number of drops reported by this Drop instance.
 int getCPU()
          Gets the CPU where the drops occurred.
 java.lang.String getDefaultMessage()
          Gets the message provided by DTrace.
 Drop.Kind getKind()
          Gets the kind of drop for all drops included in getCount().
 long getTotal()
          Gets the total number of drops since the source Consumer started running.
 java.lang.String toString()
          Gets a string representation of this drop instance, not intended for display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Drop

public Drop(int dropCPU,
            java.lang.String dropKindName,
            long dropCount,
            long totalDrops,
            java.lang.String defaultDropMessage)
Creates a Drop instance with the given CPU, drop kind, drop counts, and default message. Supports XML persistence.

Parameters:
dropCPU - cpu where drops occurred
dropKindName - name of enumeration value indicating the kind of buffer space where the drop occurred and possibly a reason
dropCount - number of drops
totalDrops - total number of drops since the source Consumer started running
defaultDropMessage - drop message provided by DTrace
Throws:
java.lang.IllegalArgumentException - if there is no Drop.Kind value with the given name or if dropCount or totalDrops is negative
java.lang.NullPointerException - if the given Drop.Kind name or default message is null
Method Detail

getCPU

public int getCPU()
Gets the CPU where the drops occurred.

Returns:
non-negative CPU ID, or a negative number if the CPU is unknown

getKind

public Drop.Kind getKind()
Gets the kind of drop for all drops included in getCount().

Returns:
non-null drop kind

getCount

public long getCount()
Gets the number of drops reported by this Drop instance.

Returns:
non-negative drop count

getTotal

public long getTotal()
Gets the total number of drops since the source Consumer started running.

Returns:
non-negative drop total since tracing started

getDefaultMessage

public java.lang.String getDefaultMessage()
Gets the message provided by DTrace.

Returns:
non-null message provided by DTrace

toString

public java.lang.String toString()
Gets a string representation of this drop instance, not intended for display. The exact details of the representation are unspecified and subject to change, but the following format may be regarded as typical:

 class-name[property1 = value1, property2 = value2]
 

Overrides:
toString in class java.lang.Object