Skip navigation links


oracle.idm.connection.info
Class PredicateInfo

java.lang.Object
  extended by oracle.idm.connection.info.PredicateInfo

All Implemented Interfaces:
java.lang.Cloneable, XmlPrintable
Direct Known Subclasses:
Connection.BusyInfo, Connection.IdleInfo, Connection.OperationInfo, ConnectionPool.Monitor.BusyInfo, ConnectionPool.Monitor.IdleInfo

public abstract class PredicateInfo
extends java.lang.Object
implements java.lang.Cloneable, XmlPrintable

This class contains the common properties of predication occurrences.


Field Summary
static long DEFAULT_TIMEOUT
          The default timeout is UNKNOWN.
protected  java.lang.String tag
          Tag used to print the predicate info properties as an XML element.
protected  java.lang.String tagPredicated
          Tag used to print the predicated property as an XML alement attribute.
static long UNKNOWN
          This field specifies unknown long value setting, such as unknown time stamp.

 

Constructor Summary
protected PredicateInfo()
          Constructor for predicate info.

 

Method Summary
 java.lang.Object clone()
          Clones predicate info.
 int getCount()
          Returns the predication count.
 long getDuration()
          Returns the duration since the last predication, or UNKNOWN.
 Record getRecord()
          Returns the recorded predication metrics.
protected  long getTimeout()
          Returns the amount of time allowed following the predication.
 long getTimeStamp()
          Returns the last predication time stamp, or UNKNOWN.
protected  boolean hasTimedout()
          Always throws UnimplementedOperationException, needs to be override by subclasses which implement the timeout property support.
protected  boolean hasTimedout(long timeout)
          Returns true if the amount of time allowed following the predication has been exceeded.
protected  boolean isPredicated()
          Returns true if currently predicated, false otherwise.
protected  void recordBeginning()
          Records the beginning of predication.
protected  void recordEnding()
          Records the ending of predication.
protected  void resetTimeout()
          Resets the amount of time allowed following the predication to DEFAULT_TIMEOUT.
protected  void setTimeout(long timeout)
          Sets the amount of time allowed following the predication.
 void xprint(XmlPrintWriter out)
          Prints predicate info properties to the PrintWriter as an XML element.
protected  void xprintBody(XmlPrintWriter out)
          This method prints the predicate info XML tag body.

 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

UNKNOWN

public static final long UNKNOWN
This field specifies unknown long value setting, such as unknown time stamp.
See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
The default timeout is UNKNOWN.
See Also:
Constant Field Values

tag

protected java.lang.String tag
Tag used to print the predicate info properties as an XML element.

tagPredicated

protected java.lang.String tagPredicated
Tag used to print the predicated property as an XML alement attribute.

Constructor Detail

PredicateInfo

protected PredicateInfo()
Constructor for predicate info.

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones predicate info.
Overrides:
clone in class java.lang.Object
Returns:
cloned predicate info
Throws:
java.lang.CloneNotSupportedException

isPredicated

protected boolean isPredicated()
Returns true if currently predicated, false otherwise.
Returns:
true if predicated, false otherwise

getCount

public int getCount()
Returns the predication count.
Returns:
int representing the predication count.

getTimeStamp

public long getTimeStamp()
Returns the last predication time stamp, or UNKNOWN.
Returns:
long representing the last predication time stamp

getDuration

public long getDuration()
Returns the duration since the last predication, or UNKNOWN.
Returns:
long representing the duration since the last predication

getTimeout

protected long getTimeout()
Returns the amount of time allowed following the predication.
Returns:
long representing the predication timeout

setTimeout

protected void setTimeout(long timeout)
Sets the amount of time allowed following the predication.

resetTimeout

protected void resetTimeout()
Resets the amount of time allowed following the predication to DEFAULT_TIMEOUT.

hasTimedout

protected boolean hasTimedout(long timeout)
Returns true if the amount of time allowed following the predication has been exceeded.
Returns:
true if timeout has been exceded, false otherwise

hasTimedout

protected boolean hasTimedout()
Always throws UnimplementedOperationException, needs to be override by subclasses which implement the timeout property support.

getRecord

public Record getRecord()
Returns the recorded predication metrics.
Returns:
Record representing predication metrics

recordBeginning

protected void recordBeginning()
Records the beginning of predication.

recordEnding

protected void recordEnding()
Records the ending of predication.

xprint

public void xprint(XmlPrintWriter out)
Prints predicate info properties to the PrintWriter as an XML element.
Specified by:
xprint in interface XmlPrintable
Parameters:
out - PrintWriter for printing predicate info propeties.

xprintBody

protected void xprintBody(XmlPrintWriter out)
This method prints the predicate info XML tag body.

Skip navigation links