Class Resender

java.lang.Object
com.yahoo.messagebus.routing.Resender

public class Resender extends Object
The resender handles scheduling and execution of sending instances of RoutingNode. An instance of this class is owned by MessageBus. Because this class does not have any internal thread, it depends on message bus to keep polling it whenever it has time.
Author:
Simon Thoresen Hult
  • Constructor Details

    • Resender

      public Resender(RetryPolicy retryPolicy)
      Constructs a new resender.
      Parameters:
      retryPolicy - The retry policy to use.
  • Method Details

    • canRetry

      public boolean canRetry(int errorCode)
      Returns whether or not the current RetryPolicy supports resending a Reply that contains an error with the given error code.
      Parameters:
      errorCode - The code to check.
      Returns:
      True if the message can be resent.
    • resendScheduled

      public void resendScheduled()
      Invokes RoutingNode.send() on all routing nodes that are applicable for sending at the current time.
    • destroy

      public void destroy()
      Discards all the routing nodes currently scheduled for resending.