Class AsyncExecutor<T>

java.lang.Object
org.jgroups.util.AsyncExecutor<T>
All Implemented Interfaces:
Lifecycle

public class AsyncExecutor<T> extends Object implements Lifecycle
Used to execute asynchronous tasks, e.g. async-send (https://issues.redhat.com/browse/JGRP-2603). Uses a blockng queue and a dequeuer thread, which passes removed tasks to the thread pool
Since:
5.3.5
  • Field Details

    • enabled

      protected boolean enabled
    • num_sends

      protected final LongAdder num_sends
    • num_rejected

      protected final LongAdder num_rejected
    • num_drops_on_full_thread_pool

      protected final LongAdder num_drops_on_full_thread_pool
    • num_sends_on_callers_thread

      protected final LongAdder num_sends_on_callers_thread
    • thread_pool

      protected ThreadPool thread_pool
    • executor

      protected Executor executor
  • Constructor Details

    • AsyncExecutor

      public AsyncExecutor()
    • AsyncExecutor

      public AsyncExecutor(ThreadPool p)
  • Method Details

    • enabled

      public boolean enabled()
    • enable

      public AsyncExecutor<T> enable(boolean b)
    • threadPool

      public ThreadPool threadPool()
    • threadPool

      public AsyncExecutor<T> threadPool(ThreadPool p)
    • numSends

      public long numSends()
    • numSendsOnCallersThread

      public long numSendsOnCallersThread()
    • numDropsOnFullThreadPool

      public long numDropsOnFullThreadPool()
    • numRejected

      public long numRejected()
    • resetStats

      public void resetStats()
    • execute

      public CompletableFuture<T> execute(Supplier<T> t, boolean can_be_dropped)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • exec

      protected Executor exec()