org.opensolaris.os.dtrace
Class ExitRecord

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

public final class ExitRecord
extends java.lang.Object
implements Record, java.io.Serializable

A record indicating that the DTrace exit() action is about to stop the source Consumer. The exit status is whatever value was passed to the exit() action in the D program.

Immutable. Supports persistence using XMLEncoder.

See Also:
Serialized Form

Constructor Summary
ExitRecord(int exitStatus)
          Creates an exit record with the given status.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified object with this ExitRecord for equality.
 int getStatus()
          Gets the exit status of a DTrace Consumer.
 int hashCode()
          Overridden to ensure that equal instances have equal hash codes.
 java.lang.String toString()
          Gets a string representation of the exit status.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExitRecord

public ExitRecord(int exitStatus)
Creates an exit record with the given status.

Parameters:
exitStatus - value passed to the D exit() action
Method Detail

getStatus

public int getStatus()
Gets the exit status of a DTrace Consumer.

Returns:
the value passed to the D exit() action

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this ExitRecord for equality. Returns true if and only if the specified object is also an ExitRecord and both records have the same status.

Overrides:
equals in class java.lang.Object
Returns:
true if and only if the specified object is also an ExitRecord and both records have the same status

hashCode

public int hashCode()
Overridden to ensure that equal instances have equal hash codes.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Gets a string representation of the exit status.

Overrides:
toString in class java.lang.Object
Returns:
the string form of getStatus() returned by Integer.toString(int i)