Return-Path: X-Original-To: apmail-commons-notifications-archive@minotaur.apache.org Delivered-To: apmail-commons-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8681B18830 for ; Sun, 31 May 2015 22:24:08 +0000 (UTC) Received: (qmail 53096 invoked by uid 500); 31 May 2015 22:24:08 -0000 Delivered-To: apmail-commons-notifications-archive@commons.apache.org Received: (qmail 53062 invoked by uid 500); 31 May 2015 22:24:08 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 52740 invoked by uid 99); 31 May 2015 22:24:08 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 May 2015 22:24:08 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 24F30AC026E for ; Sun, 31 May 2015 22:24:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r953350 [20/37] - in /websites/production/commons/content/proper/commons-pool: api-2.4.1/ api-2.4.1/org/ api-2.4.1/org/apache/ api-2.4.1/org/apache/commons/ api-2.4.1/org/apache/commons/pool2/ api-2.4.1/org/apache/commons/pool2/class-use/ a... Date: Sun, 31 May 2015 22:24:05 -0000 To: notifications@commons.apache.org From: psteitz@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150531222408.24F30AC026E@hades.apache.org> Added: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/PooledSoftReference.html ============================================================================== --- websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/PooledSoftReference.html (added) +++ websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/PooledSoftReference.html Sun May 31 22:24:03 2015 @@ -0,0 +1,400 @@ + + + + + + +PooledSoftReference (Apache Commons Pool 2.4.1 API) + + + + + + + + + + + +
+
org.apache.commons.pool2.impl
+

Class PooledSoftReference<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PooledSoftReference

        +
        public PooledSoftReference(SoftReference<T> reference)
        +
        Creates a new PooledSoftReference wrapping the provided reference.
        +
        +
        Parameters:
        +
        reference - SoftReference to be managed by the pool
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getObject

        +
        public T getObject()
        +
        Returns the object that the wrapped SoftReference refers to. +

        + Note that if the reference has been cleared, this method will return + null.

        +
        +
        Specified by:
        +
        getObject in interface PooledObject<T>
        +
        Overrides:
        +
        getObject in class DefaultPooledObject<T>
        +
        Returns:
        +
        Object referred to by the SoftReference
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getReference

        +
        public SoftReference<TgetReference()
        +
        Returns the SoftReference wrapped by this object.
        +
        +
        Returns:
        +
        underlying SoftReference
        +
        +
      • +
      + + + +
        +
      • +

        setReference

        +
        public void setReference(SoftReference<T> reference)
        +
        Sets the wrapped reference. + +

        This method exists to allow a new, non-registered reference to be + held by the pool to track objects that have been checked out of the pool. + The actual parameter should be a reference to the same + object that getObject() returns before calling this method.

        +
        +
        Parameters:
        +
        reference - new reference
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.

+ + Propchange: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/PooledSoftReference.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/SoftReferenceObjectPool.html ============================================================================== --- websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/SoftReferenceObjectPool.html (added) +++ websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/SoftReferenceObjectPool.html Sun May 31 22:24:03 2015 @@ -0,0 +1,582 @@ + + + + + + +SoftReferenceObjectPool (Apache Commons Pool 2.4.1 API) + + + + + + + + + + + +
+
org.apache.commons.pool2.impl
+

Class SoftReferenceObjectPool<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        borrowObject

        +
        public T borrowObject()
        +               throws Exception
        +
        Borrow an object from the pool. If there are no idle instances available + in the pool, the configured factory's + PooledObjectFactory.makeObject() method is invoked to create a + new instance. +

        + All instances are activated + and validated before being returned by this method. If validation fails or + an exception occurs activating or validating an idle instance, the + failing instance is destroyed and another instance is retrieved from the pool, validated and + activated. This process continues until either the pool is empty or an + instance passes validation. If the pool is empty on activation or it does + not contain any valid instances, the factory's makeObject + method is used to create a new instance. If the created instance either + raises an exception on activation or fails validation, + NoSuchElementException is thrown. Exceptions thrown by + MakeObject are propagated to the caller; but other than + ThreadDeath or VirtualMachineError, exceptions + generated by activation, validation or destroy methods are swallowed + silently.

        +
        +
        Specified by:
        +
        borrowObject in interface ObjectPool<T>
        +
        Specified by:
        +
        borrowObject in class BaseObjectPool<T>
        +
        Returns:
        +
        a valid, activated object instance
        +
        Throws:
        +
        NoSuchElementException - if a valid object cannot be provided
        +
        IllegalStateException - if invoked on a closed pool
        +
        Exception - if an exception occurs creating a new instance
        +
        +
      • +
      + + + + + +
        +
      • +

        returnObject

        +
        public void returnObject(T obj)
        +                  throws Exception
        +
        Returns an instance to the pool after successful validation and + passivation. The returning instance is destroyed if any of the following + are true: + + Exceptions passivating or destroying instances are silently swallowed. + Exceptions validating instances are propagated to the client.
        +
        +
        Specified by:
        +
        returnObject in interface ObjectPool<T>
        +
        Specified by:
        +
        returnObject in class BaseObjectPool<T>
        +
        Parameters:
        +
        obj - instance to return to the pool
        +
        Throws:
        +
        IllegalStateException - if an attempt is made to return an object to the pool that + is in any state other than allocated (i.e. borrowed). + Attempting to return an object more than once or attempting + to return an object that was never borrowed from the pool + will trigger this exception.
        +
        Exception - if an instance cannot be returned to the pool
        +
        +
      • +
      + + + + + +
        +
      • +

        invalidateObject

        +
        public void invalidateObject(T obj)
        +                      throws Exception
        +
        Invalidates an object from the pool. +

        + By contract, obj must have been obtained + using ObjectPool.borrowObject() or a related method as defined in an + implementation or sub-interface. +

        + This method should be used when an object that has been borrowed is + determined (due to an exception or other problem) to be invalid.

        +
        +
        Specified by:
        +
        invalidateObject in interface ObjectPool<T>
        +
        Specified by:
        +
        invalidateObject in class BaseObjectPool<T>
        +
        Parameters:
        +
        obj - a borrowed instance to be disposed.
        +
        Throws:
        +
        Exception - if the instance cannot be invalidated
        +
        +
      • +
      + + + +
        +
      • +

        addObject

        +
        public void addObject()
        +               throws Exception
        +
        Create an object, and place it into the pool. addObject() is useful for + "pre-loading" a pool with idle objects. +

        + Before being added to the pool, the newly created instance is + validated and + passivated. If + validation fails, the new instance is + destroyed. Exceptions + generated by the factory makeObject or + passivate are propagated to the caller. Exceptions + destroying instances are silently swallowed.

        +
        +
        Specified by:
        +
        addObject in interface ObjectPool<T>
        +
        Overrides:
        +
        addObject in class BaseObjectPool<T>
        +
        Throws:
        +
        IllegalStateException - if invoked on a closed pool
        +
        Exception - when the factory has a problem creating + or passivating an object.
        +
        +
      • +
      + + + +
        +
      • +

        getNumIdle

        +
        public int getNumIdle()
        +
        Returns an approximation not less than the of the number of idle + instances in the pool.
        +
        +
        Specified by:
        +
        getNumIdle in interface ObjectPool<T>
        +
        Overrides:
        +
        getNumIdle in class BaseObjectPool<T>
        +
        Returns:
        +
        estimated number of idle instances in the pool
        +
        +
      • +
      + + + + + + + + + + + + + + + + +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.

+ + Propchange: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/SoftReferenceObjectPool.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/AbandonedConfig.html ============================================================================== --- websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/AbandonedConfig.html (added) +++ websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/AbandonedConfig.html Sun May 31 22:24:03 2015 @@ -0,0 +1,186 @@ + + + + + + +Uses of Class org.apache.commons.pool2.impl.AbandonedConfig (Apache Commons Pool 2.4.1 API) + + + + + + + + + + +
+

Uses of Class
org.apache.commons.pool2.impl.AbandonedConfig

+
+
+ +
+ + + + +

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.

+ + Propchange: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/AbandonedConfig.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/BaseGenericObjectPool.html ============================================================================== --- websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/BaseGenericObjectPool.html (added) +++ websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/BaseGenericObjectPool.html Sun May 31 22:24:03 2015 @@ -0,0 +1,176 @@ + + + + + + +Uses of Class org.apache.commons.pool2.impl.BaseGenericObjectPool (Apache Commons Pool 2.4.1 API) + + + + + + + + + + +
+

Uses of Class
org.apache.commons.pool2.impl.BaseGenericObjectPool

+
+
+ +
+ + + + +

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.

+ + Propchange: websites/production/commons/content/proper/commons-pool/api-2.4.1/org/apache/commons/pool2/impl/class-use/BaseGenericObjectPool.html ------------------------------------------------------------------------------ svn:eol-style = native