Package io.grpc.internal
Class SharedResourcePool<T>
java.lang.Object
io.grpc.internal.SharedResourcePool<T>
- All Implemented Interfaces:
ObjectPool<T>
An ObjectPool backed by a
SharedResourceHolder.Resource.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSharedResourcePool(SharedResourceHolder.Resource<T> resource) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> SharedResourcePool<T> forResource(SharedResourceHolder.Resource<T> resource) Get an object from the pool.returnObject(Object object) Return the object to the pool.
-
Field Details
-
resource
-
-
Constructor Details
-
Method Details
-
getObject
Description copied from interface:ObjectPoolGet an object from the pool.- Specified by:
getObjectin interfaceObjectPool<T>
-
returnObject
Description copied from interface:ObjectPoolReturn the object to the pool. The caller should not use the object beyond this point.- Specified by:
returnObjectin interfaceObjectPool<T>- Returns:
- always
null