Class AffinityPool

  • All Implemented Interfaces:
    java.util.concurrent.Executor, java.util.concurrent.ExecutorService

    public class AffinityPool
    extends java.util.concurrent.AbstractExecutorService
    An ExecutorService implementation which pins actor to particular threads and guaranteed that an actor's Mailbox will e run on the thread it used it used to run. In situations where we see a lot of cache ping pong, this might lead to significant performance improvements.


    • Constructor Detail

      • AffinityPool

        public AffinityPool​(java.lang.String id,
                            int parallelism,
                            int affinityGroupSize,
                            java.util.concurrent.ThreadFactory threadFactory,
                            int idleCpuLevel,
                            QueueSelector queueSelector,
                            RejectionHandler rejectionHandler)
    • Method Detail

      • Uninitialized

        public static final int Uninitialized()
      • Initializing

        public static final int Initializing()
      • Running

        public static final int Running()
      • ShuttingDown

        public static final int ShuttingDown()
      • ShutDown

        public static final int ShutDown()
      • Terminated

        public static final int Terminated()
      • Initial

        public static final int Initial()
      • Spinning

        public static final int Spinning()
      • Yielding

        public static final int Yielding()
      • Parking

        public static final int Parking()
      • execute

        public void execute​(java.lang.Runnable command)
      • awaitTermination

        public boolean awaitTermination​(long timeout,
                                        java.util.concurrent.TimeUnit unit)
      • shutdownNow

        public java.util.List<java.lang.Runnable> shutdownNow()
      • shutdown

        public void shutdown()
      • isShutdown

        public boolean isShutdown()
      • isTerminated

        public boolean isTerminated()
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object