Package com.hierynomus.smbj.common
Class Pooled<A extends Pooled<A>>
- java.lang.Object
-
- com.hierynomus.smbj.common.Pooled<A>
-
- Direct Known Subclasses:
Connection
public class Pooled<A extends Pooled<A>> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Pooled()
-
-
-
Method Detail
-
lease
public A lease()
Takes a lease on the pooled object.- Returns:
this
if the object is still valid (has at least 1 lease), elsenull
-
release
public boolean release()
Releases the pooled object. If this was the last outstanding lease,release()
returnstrue
.- Returns:
true
if this was the last outstanding lease. Elsefalse
-
-