Class Pooled<A extends Pooled<A>>
java.lang.Object
com.hierynomus.smbj.common.Pooled<A>
- Direct Known Subclasses:
Connection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerA newly createdPooledobject has 1 lease outstanding (the created object) -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
leases
A newly createdPooledobject has 1 lease outstanding (the created object)
-
-
Constructor Details
-
Pooled
public Pooled()
-
-
Method Details
-
lease
Takes a lease on the pooled object.- Returns:
thisif 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:
trueif this was the last outstanding lease. Elsefalse
-