public class ProportionalTimeEstimatorImpl extends Object implements TimeEstimator
TimeEstimator interface. Uses the Exponential
Moving Average equation to provide an estimate of the remaining upload time
of binary data. A correction factor is used for minimal overestimation.| Constructor and Description |
|---|
ProportionalTimeEstimatorImpl(long imageContainerSize)
Creates a new object of this class with a defined internal buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getUploadTimeLeft()
|
void |
start()
Starts the time counting.
|
void |
stop()
Stops the time counting and updates the internal time counter.
|
void |
stop(long uploadedBytes)
Stops the time counting and updates the internal updates the internal
time counter and counter of total number of transmitted bytes.
|
public ProportionalTimeEstimatorImpl(long imageContainerSize)
imageContainerSize - The total size in bytes of the data container for which upload
time is being estimated.public void start()
TimeEstimatorstart in interface TimeEstimatorTimeEstimator.start()public void stop()
TimeEstimatorstop in interface TimeEstimatorTimeEstimator.stop()public void stop(long uploadedBytes)
TimeEstimatorstop in interface TimeEstimatoruploadedBytes - Number of bytes uploaded in a single time frame that is being
sampled.TimeEstimator.stop(long)public long getUploadTimeLeft()
TimeEstimatorgetUploadTimeLeft in interface TimeEstimatorstop hasn't been called at least
once before calling this method.TimeEstimator.getUploadTimeLeft()
Version: 5.1.1-ice35-b43
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.