Class ManagedChannelImpl.ExecutorHolder

  • All Implemented Interfaces:
    java.util.concurrent.Executor
    Enclosing class:
    ManagedChannelImpl

    static final class ManagedChannelImpl.ExecutorHolder
    extends java.lang.Object
    implements java.util.concurrent.Executor
    Lazily request for Executor from an executor pool. Also act as an Executor directly to simply run a cmd
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.Executor executor  
      private ObjectPool<? extends java.util.concurrent.Executor> pool  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecutorHolder​(ObjectPool<? extends java.util.concurrent.Executor> executorPool)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(java.lang.Runnable command)  
      (package private) java.util.concurrent.Executor getExecutor()  
      (package private) void release()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pool

        private final ObjectPool<? extends java.util.concurrent.Executor> pool
      • executor

        private java.util.concurrent.Executor executor
    • Constructor Detail

      • ExecutorHolder

        ExecutorHolder​(ObjectPool<? extends java.util.concurrent.Executor> executorPool)
    • Method Detail

      • getExecutor

        java.util.concurrent.Executor getExecutor()
      • release

        void release()
      • execute

        public void execute​(java.lang.Runnable command)
        Specified by:
        execute in interface java.util.concurrent.Executor