Package io.pravega.common.util
Class ResourcePool.CloseableResource<T>
- java.lang.Object
-
- io.pravega.common.util.ResourcePool.CloseableResource<T>
-
- Type Parameters:
T- Type of underlying resource
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- ResourcePool<T>
public static class ResourcePool.CloseableResource<T> extends java.lang.Object implements java.lang.AutoCloseableA closeable resource wrapper class which returns the resource back to the pool automatically once it is closed. Its close method is idempotent and can be invoked multiple times without returning the resource more than once.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()TgetResource()voidinvalidate()
-
-
-
Method Detail
-
getResource
public T getResource()
-
invalidate
public void invalidate()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-