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
.-
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.
-
Method Details
-
getObject
Description copied from interface:ObjectPool
Get an object from the pool.- Specified by:
getObject
in interfaceObjectPool<T>
-
returnObject
Description copied from interface:ObjectPool
Return the object to the pool. The caller should not use the object beyond this point.- Specified by:
returnObject
in interfaceObjectPool<T>
- Returns:
- always
null