Interface TcpTimeouts

All Known Implementing Classes:
TcpTimeoutsImpl

public interface TcpTimeouts
This interface defines the ability to wait for a configurable time, applying an exponential backoff to increase the time. The maximum single wait time can be bounded, as well as the maximum total wait time.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Factory used to create TcpTimeouts instances.
    static interface 
    Interface used to represent a series of timeout values using exponential backoff.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TcpTimeouts.Factory
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return the backoff factor, which is the percentage multiplier used to compute the next timeout in the Waiter.advance method.
    int
    Return the initial time to wait on the first getTime or sleepTime call on a new Waiter instance.
    int
    Get the maximum time a single sleepTime or getTime can taoke or return in an instance of Waiter.
    int
    Get the maximum total time a Waiter can exist before isExpired returns true.
    Return a Waiter that can be used for computing a series of timeouts.
  • Field Details

  • Method Details

    • get_initial_time_to_wait

      int get_initial_time_to_wait()
      Return the initial time to wait on the first getTime or sleepTime call on a new Waiter instance.
      Returns:
      time in milliseconds
    • get_max_time_to_wait

      int get_max_time_to_wait()
      Get the maximum total time a Waiter can exist before isExpired returns true. -1 if not used for this TcpTimeouts instances.
      Returns:
      time in milliseconds
    • get_max_single_wait_time

      int get_max_single_wait_time()
      Get the maximum time a single sleepTime or getTime can taoke or return in an instance of Waiter. -1 if not used.
      Returns:
      time in milliseconds
    • get_backoff_factor

      int get_backoff_factor()
      Return the backoff factor, which is the percentage multiplier used to compute the next timeout in the Waiter.advance method.
      Returns:
      percentage multiplier
    • waiter

      Return a Waiter that can be used for computing a series of timeouts.
      Returns:
      Waiter for timeouts