Class StaticDelayGenerator

java.lang.Object
io.aeron.driver.StaticDelayGenerator
All Implemented Interfaces:
FeedbackDelayGenerator

public final class StaticDelayGenerator extends Object implements FeedbackDelayGenerator
Delay generator that simply returns a constant value for the delay and the retry delay.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StaticDelayGenerator(long delayNs)
    Create a delayInNs generator that uses the specified delayNs for both initial and retry delays.
    StaticDelayGenerator(long delayNs, boolean immediateFeedback)
    Deprecated.
    The shouldImmediatelyFeedback method has been removed from the interface so the immediatelyFeedback parameter is ignored.
    StaticDelayGenerator(long delayNs, long retryDelayNs)
    Create a delayInNs generator that uses the specified delayNs.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Generate a new delay value on initial request.
    long
    Generate a new delay value on a retried request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • StaticDelayGenerator

      public StaticDelayGenerator(long delayNs, long retryDelayNs)
      Create a delayInNs generator that uses the specified delayNs.
      Parameters:
      delayNs - initial delay (nanoseconds)
      retryDelayNs - delay for retry (nanoseconds)
    • StaticDelayGenerator

      public StaticDelayGenerator(long delayNs)
      Create a delayInNs generator that uses the specified delayNs for both initial and retry delays.
      Parameters:
      delayNs - delay (nanoseconds)
    • StaticDelayGenerator

      @Deprecated public StaticDelayGenerator(long delayNs, boolean immediateFeedback)
      Deprecated.
      The shouldImmediatelyFeedback method has been removed from the interface so the immediatelyFeedback parameter is ignored. You can emulate the old behaviour with:
           new StaticDelayGenerator(0, MILLISECONDS.toNanos(10));
       
      If used for unicast delays, then this is not recommended and a short delay like the default Configuration.NAK_UNICAST_DELAY_DEFAULT_NS should be used.
      Deprecated constructor.
      Parameters:
      delayNs - delay (nanoseconds)
      immediateFeedback - immediately feedback (unused)
  • Method Details