Class TLfnProgress

java.lang.Object
com.luciad.fusion.util.TLfnProgress

public class TLfnProgress extends Object
A snapshot of the progress of a process.
Since:
10.0
  • Field Details

    • UNKNOWN_START_TIME

      public static final long UNKNOWN_START_TIME
      Constant indicating the start time of a progress is unknown.
      See Also:
    • UNKNOWN_ELAPSED_TIME

      public static final long UNKNOWN_ELAPSED_TIME
      Constant indicating the elapsed time is unknown.
      See Also:
    • UNKNOWN_TIME_LEFT

      public static final long UNKNOWN_TIME_LEFT
      Constant indicating the remaining time of a progress is unknown.
      See Also:
    • UNKNOWN_VALUE

      public static final long UNKNOWN_VALUE
      Constant indicating the current value of a progress is unknown.
      See Also:
    • UNKNOWN_BOUND

      public static final long UNKNOWN_BOUND
      Constant indicating the upper bound of a progress is unknown.
      See Also:
    • UNKNOWN

      public static final TLfnProgress UNKNOWN
      A constant representing unknown progress. It is initialized with the following values:
      Since:
      11.0
  • Constructor Details

    • TLfnProgress

      @Deprecated public TLfnProgress(long aStartTime, long aValue, long aBound, long aTimeLeft)
      Constructs a new progress snapshot.
      Parameters:
      aStartTime - the time in milliseconds since epoch at which the progress started or UNKNOWN_START_TIME when not started
      aValue - the current progress or UNKNOWN_VALUE if unknown
      aBound - the upper bound of the progress or UNKNOWN_BOUND if unknown
      aTimeLeft - the estimated time left in milliseconds or UNKNOWN_TIME_LEFT when unknown
    • TLfnProgress

      public TLfnProgress(long aStartTime, long aValue, long aBound, long aTimeLeft, long aElapsedTime)
      Constructs a new progress snapshot.
      Parameters:
      aStartTime - the time in milliseconds since epoch at which the progress started or UNKNOWN_START_TIME if not started
      aValue - the current progress or UNKNOWN_VALUE if unknown
      aBound - the upper bound of the progress or UNKNOWN_BOUND if unknown
      aTimeLeft - the estimated time left in milliseconds or UNKNOWN_TIME_LEFT if unknown
      aElapsedTime - the elapsed time in milliseconds, or UNKNOWN_ELAPSED_TIME if unknown
  • Method Details

    • get

      public long get()
      Returns the current progress. This is a value in [0,getBound()], or UNKNOWN_VALUE if unknown.
      Returns:
      the current progress or UNKNOWN_VALUE if unknown
    • getBound

      public long getBound()
      Gets the upper bound of the progress.
      Returns:
      the upper bound of the progress or UNKNOWN_BOUND if unknown
    • getAsFraction

      public double getAsFraction()
      Gets the current progress as a fraction in [0,1].
      Returns:
      the current progress as a fraction or Double.NaN if unknown
    • getStartTime

      public long getStartTime()
      Returns the time (in milliseconds as defined by System.currentTimeMillis()) at which the progress started. If the job was stopped and restarted multiple times, the time of the last restart will be reflected.
      Returns:
      the time at which the progress started or UNKNOWN_START_TIME if not started
    • getElapsedTime

      public long getElapsedTime()
      Gets the total elapsed time in milliseconds. If the job has been stopped and restarted multiple times, the elapsed time will reflect the total runtime. The elapsed time survives job restarts and system restarts.
      Returns:
      the total elapsed time in milliseconds (runtime) or UNKNOWN_ELAPSED_TIME if unknown
    • getTimeLeft

      public long getTimeLeft()
      Returns the estimated time left (in milliseconds).
      Returns:
      the estimated time left in milliseconds or UNKNOWN_TIME_LEFT if unknown
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object aOther)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object