Class Pooled<A extends Pooled<A>>

  • Direct Known Subclasses:
    Connection

    public class Pooled<A extends Pooled<A>>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Pooled()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      A lease()
      Takes a lease on the pooled object.
      boolean release()
      Releases the pooled object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Pooled

        public 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), else null
      • release

        public boolean release()
        Releases the pooled object. If this was the last outstanding lease, release() returns true.
        Returns:
        true if this was the last outstanding lease. Else false