Interface AsyncDataState
- All Known Implementing Classes:
MultiAsyncDataState,SimpleDataState
AsyncDataLink.
The minimum information implementations must provide is the estimated progress of the data providing process as a double value between 0.0 and 1.0 where 0.0 means that the process just started and 1.0 means that it has been completed or very close to being completed.
Instances of this interface must not be a view of the process, they must hold the static state of progress and should mean the exact same progress even if the data providing process has progressed some amount since it was requested.
Thread safety
Implementations of this interface are required to be immutable and therefore safe to be accessed from multiple threads concurrently.Synchronization transparency
Implementations of this interface are required to be synchronization transparent.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the estimated state of progress within the range [0.0, 1.0].
-
Method Details
-
getProgress
double getProgress()Returns the estimated state of progress within the range [0.0, 1.0].The progress value 0.0 means that the process just started and 1.0 means that it has been completed or very close to being completed.
Note that although this method should return a value within the range [0.0, 1.0], callers should expect any other possible double values (including NaNs) because it is easy to make rounding errors with floating point arithmetic. For values lower than 0.0, callers should assume 0.0 and for values greater than 1.0, they should assume 1.0.
- Returns:
- the estimated state of progress within the range [0.0, 1.0]. Note that callers should expect that this method may return values out of the designed range.
-