Package com.palantir.common.pooling
Interface PoolingContainer<T>
-
- All Known Implementing Classes:
AbstractPoolingContainer
,ForwardingPoolingContainer
public interface PoolingContainer<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> V
runWithPooledResource(com.google.common.base.Function<T,V> f)
<V,K extends Exception>
VrunWithPooledResource(FunctionCheckedException<T,V,K> f)
void
shutdownPooling()
This method will discard pooled objects and cleanup any resources they are taking up.
-
-
-
Method Detail
-
runWithPooledResource
<V,K extends Exception> V runWithPooledResource(FunctionCheckedException<T,V,K> f) throws K extends Exception
- Throws:
K extends Exception
-
runWithPooledResource
<V> V runWithPooledResource(com.google.common.base.Function<T,V> f)
-
shutdownPooling
void shutdownPooling()
This method will discard pooled objects and cleanup any resources they are taking up. Further calls torunWithPooledResource(FunctionCheckedException)
after shutdown are undefined unless the implementor says otherwise.
-
-