Skip navigation links


oracle.idm.util.progress.info
Class DurationInfo

java.lang.Object
  extended by oracle.idm.util.progress.info.DurationInfo

All Implemented Interfaces:
java.lang.Cloneable, XmlPrintable

public class DurationInfo
extends java.lang.Object
implements java.lang.Cloneable, XmlPrintable

DurationInfo represents information about the duration of the operation. For example, it may report that curently 50,0000 ms of total 100,000 ms of operation has been executed.


Field Summary
static long UNKNOWN
          UNKNOWN has a value of -1L and indicates unknown duration.

 

Constructor Summary
DurationInfo(long current)
          Creates DurationInfo.
DurationInfo(long current, long total)
          Creates DurationInfo.

 

Method Summary
 java.lang.Object clone()
          Clones DurationInfo.
 long getCurrent()
          Getter for the current property.
 long getTotal()
          Getter for the total property.
 void setCurrent(long current)
          Setter for the current property.
 void setTotal(long total)
          Setter for the total property.
 java.lang.String toString()
          Returns a string representation of DurationInfo.
 void xprint(XmlPrintWriter out)
          Prints durationInfo properties to the PrintWriter as an XML element.

 

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

 

Field Detail

UNKNOWN

public static final long UNKNOWN
UNKNOWN has a value of -1L and indicates unknown duration.
See Also:
Constant Field Values

Constructor Detail

DurationInfo

public DurationInfo(long current,
                    long total)
Creates DurationInfo.
Parameters:
current - Current duration of operation executed so far, in milliseconds.
total - Total duration of operation expected to be executed, in milliseconds.

DurationInfo

public DurationInfo(long current)
Creates DurationInfo.
Parameters:
current - Current duration of operation executed so far, in milliseconds.

Method Detail

clone

public java.lang.Object clone()
Clones DurationInfo.
Overrides:
clone in class java.lang.Object

getCurrent

public long getCurrent()
Getter for the current property. Value of UNKNOWN indicates unknown current duration.
Returns:
Current duration of operation executed so far, in milliseconds.

setCurrent

public void setCurrent(long current)
Setter for the current property. Use value of UNKNOWN to indicate unknown current duration.
Parameters:
current - Current duration of operation executed so far, in milliseconds.

getTotal

public long getTotal()
Getter for the total property. Value of UNKNOWN indicates unknown total duration.
Returns:
Total duration of operation expected to be executed, in milliseconds.

setTotal

public void setTotal(long total)
Setter for the total property. Use value of UNKNOWN to indicate unknown total duration.
Parameters:
total - Total duration of operation expected to be executed, in milliseconds.

xprint

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

toString

public java.lang.String toString()
Returns a string representation of DurationInfo.
Overrides:
toString in class java.lang.Object

Skip navigation links