Class IracExecutor

  • All Implemented Interfaces:
    Runnable, Function<Void,​CompletionStage<Void>>

    public class IracExecutor
    extends Object
    implements Function<Void,​CompletionStage<Void>>, Runnable
    Executes the "IRAC" sending task in a single thread.

    This executor makes sure no more than one task is running at the same time. Also, it avoids "queueing" multiple tasks by queuing at most one. This is possible because the task does the same thing: iterator over pending updates and send them to the remote site.

    In addition, it iteracts with the ExponentialBackOff to add delays in case of network failures.

    Since:
    12
    Author:
    Pedro Ruivo