Package io.grpc.internal
Class ManagedChannelImpl.ExecutorHolder
- java.lang.Object
-
- io.grpc.internal.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()
-
-
-
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)
-
-