Class 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 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()