Class ObjectPool.Lease<T>

java.lang.Object
org.cryptomator.cryptolib.common.ObjectPool.Lease<T>
Type Parameters:
T - Type of the leased instance
All Implemented Interfaces:
AutoCloseable, Supplier<T>
Enclosing class:
ObjectPool<T>

public static class ObjectPool.Lease<T> extends Object implements AutoCloseable, Supplier<T>
A holder for resource leased from an ObjectPool. This is basically an autocloseable Supplier that is intended to be used via try-with-resource blocks.