org.opensolaris.os.dtrace
Class ProgramInfo

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

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

Information about a Program including stability and matching probe count.

Immutable. Supports persistence using XMLEncoder.

See Also:
Consumer.getProgramInfo(Program program), Consumer.enable(Program program), Serialized Form

Constructor Summary
ProgramInfo(InterfaceAttributes minProbeAttr, InterfaceAttributes minStatementAttr, int matchingProbes)
          Creates a ProgamInfo instance with the given properties.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified object with this program information for equality.
 int getMatchingProbeCount()
          Gets the number of DTrace probes that match the probe descriptions in a compiled Program.
 InterfaceAttributes getMinimumProbeAttributes()
          Gets the minimum stability levels of the probe descriptions used in a compiled Program.
 InterfaceAttributes getMinimumStatementAttributes()
          Gets the minimum stability levels of the action statements including D variables used in a compiled Program.
 int hashCode()
          Overridden to ensure that equal ProgramInfo instances have equal hashcodes.
 java.lang.String toString()
          Gets a string representation of this ProgramInfo useful for logging and not intended for display.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProgramInfo

public ProgramInfo(InterfaceAttributes minProbeAttr,
                   InterfaceAttributes minStatementAttr,
                   int matchingProbes)
Creates a ProgamInfo instance with the given properties. Supports XML persistence.

Parameters:
minProbeAttr - minimum stability levels of the program probe descriptions
minStatementAttr - minimum stability levels of the program action statements (including D variables)
matchingProbes - non-negative count of probes matching the program probe description
Throws:
java.lang.NullPointerException - if minProbeAttr or minStatementAttr is null
java.lang.IllegalArgumentException - if matchingProbes is negative
Method Detail

getMinimumProbeAttributes

public InterfaceAttributes getMinimumProbeAttributes()
Gets the minimum stability levels of the probe descriptions used in a compiled Program.

Returns:
non-null interface attributes describing the minimum stability of the probe descriptions in a D program

getMinimumStatementAttributes

public InterfaceAttributes getMinimumStatementAttributes()
Gets the minimum stability levels of the action statements including D variables used in a compiled Program.

Returns:
non-null interface attributes describing the minimum stability of the action statements (including D variables) in a D program

getMatchingProbeCount

public int getMatchingProbeCount()
Gets the number of DTrace probes that match the probe descriptions in a compiled Program. This count may be very high for programs that use ProbeDescription wildcarding (field omission) and globbing (pattern matching syntax).

Returns:
non-negative count of probes on the system matching the program descriptions in a compiled D program

equals

public boolean equals(java.lang.Object o)
Compares the specified object with this program information for equality. Defines equality as having the same information, including stability attributes and matching probe counts. Different D programs may have equal program information.

Overrides:
equals in class java.lang.Object
Returns:
true if and only if the specified object is also a ProgramInfo instance and has all the same information as this instance

hashCode

public int hashCode()
Overridden to ensure that equal ProgramInfo instances have equal hashcodes.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Gets a string representation of this ProgramInfo useful for logging and 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