Package com.wavefront.agent.queueing
Class TaskSizeEstimator
- java.lang.Object
-
- com.wavefront.agent.queueing.TaskSizeEstimator
-
public class TaskSizeEstimator extends Object
Calculates approximate task sizes to estimate how quickly we would run out of disk space if we are no longer able to send data to the server endpoint (i.e. network outage).- Author:
- [email protected].
-
-
Constructor Summary
Constructors Constructor Description TaskSizeEstimator(String handle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Long
getBytesPerMinute()
Calculates the bytes per minute buffer usage rate.<T extends DataSubmissionTask<T>>
voidscheduleTaskForSizing(T task)
Submit a candidate task to be sized.void
shutdown()
-
-
-
Constructor Detail
-
TaskSizeEstimator
public TaskSizeEstimator(String handle)
- Parameters:
handle
- metric pipeline handle (usually port number).
-
-
Method Detail
-
scheduleTaskForSizing
public <T extends DataSubmissionTask<T>> void scheduleTaskForSizing(T task)
Submit a candidate task to be sized. The task may or may not be accepted, depending on the rate limiter- Parameters:
task
- task to be sized.
-
getBytesPerMinute
@Nullable public Long getBytesPerMinute()
Calculates the bytes per minute buffer usage rate. Needs at- Returns:
- bytes per minute for requests submissions. Null if no data is available yet (needs at least
-
shutdown
public void shutdown()
-
-