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.
  • Field Details

  • 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