congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GenericObjectPool.getMinIdle
Code IndexAdd Tabnine to your IDE (free)

How to use
getMinIdle
method
in
org.apache.commons.pool.impl.GenericObjectPool

Best Java code snippets using org.apache.commons.pool.impl.GenericObjectPool.getMinIdle (Showing top 11 results out of 315)

origin: commons-pool/commons-pool

/**
 * This returns the number of objects to create during the pool
 * sustain cycle. This will ensure that the minimum number of idle
 * instances is maintained without going past the maxActive value.
 *
 * @param incrementInternal - Should the count of objects currently under
 *                            some form of internal processing be
 *                            incremented?
 * @return The number of objects to be created
 */
private synchronized int calculateDeficit(boolean incrementInternal) {
  int objectDeficit = getMinIdle() - getNumIdle();
  if (_maxActive > 0) {
    int growLimit = Math.max(0,
        getMaxActive() - getNumActive() - getNumIdle() - _numInternalProcessing);
    objectDeficit = Math.min(objectDeficit, growLimit);
  }
  if (incrementInternal && objectDeficit >0) {
    _numInternalProcessing++;
  }
  return objectDeficit;
}
origin: commons-pool/commons-pool

} else if ((getSoftMinEvictableIdleTimeMillis() > 0) &&
    (idleTimeMilis > getSoftMinEvictableIdleTimeMillis()) &&
    ((getNumIdle() + 1)> getMinIdle())) { // +1 accounts for object we are processing
  removeObject = true;
origin: ontopia/ontopia

public void writeReport(java.io.Writer out) throws java.io.IOException {
 final String BR = "<br>\n";
 out.write("Active connections: " + pool.getNumActive() + " (max: " + pool.getMaxActive() + ")<br>\n");
 out.write("Idle connections: " + pool.getNumIdle() + " (min: " + pool.getMinIdle() + " max: " + pool.getMaxIdle() + ")<br>\n");
 out.write("Connections created: " + pcfactory.objectsCreated + BR);
 out.write("Connections destroyed: " + pcfactory.objectsDestroyed + BR);
 out.write("Connections validated: " + pcfactory.objectsValidated + BR);
 out.write("Connections activated: " + pcfactory.objectsActivated + BR);
 out.write("Connections passivated: " + pcfactory.objectsPassivated + BR);
}
origin: org.apache.commons/pool

/**
 * This returns the number of objects to create during the pool
 * sustain cycle. This will ensure that the minimum number of idle
 * instances is maintained without going past the maxActive value.
 *
 * @param incrementInternal - Should the count of objects currently under
 *                            some form of internal processing be
 *                            incremented?
 * @return The number of objects to be created
 */
private synchronized int calculateDeficit(boolean incrementInternal) {
  int objectDeficit = getMinIdle() - getNumIdle();
  if (_maxActive > 0) {
    int growLimit = Math.max(0,
        getMaxActive() - getNumActive() - getNumIdle() - _numInternalProcessing);
    objectDeficit = Math.min(objectDeficit, growLimit);
  }
  if (incrementInternal && objectDeficit >0) {
    _numInternalProcessing++;
  }
  return objectDeficit;
}
origin: org.apache.commons/com.springsource.org.apache.commons.pool

/**
 * This returns the number of objects to create during the pool
 * sustain cycle. This will ensure that the minimum number of idle
 * instances is maintained without going past the maxActive value.
 *
 * @param incrementInternal - Should the count of objects currently under
 *                            some form of internal processing be
 *                            incremented?
 * @return The number of objects to be created
 */
private synchronized int calculateDeficit(boolean incrementInternal) {
  int objectDeficit = getMinIdle() - getNumIdle();
  if (_maxActive > 0) {
    int growLimit = Math.max(0,
        getMaxActive() - getNumActive() - getNumIdle() - _numInternalProcessing);
    objectDeficit = Math.min(objectDeficit, growLimit);
  }
  if (incrementInternal && objectDeficit >0) {
    _numInternalProcessing++;
  }
  return objectDeficit;
}
origin: org.apache.openjpa/openjpa-all

/**
 * This returns the number of objects to create during the pool
 * sustain cycle. This will ensure that the minimum number of idle
 * instances is maintained without going past the maxActive value.
 *
 * @param incrementInternal - Should the count of objects currently under
 *                            some form of internal processing be
 *                            incremented?
 * @return The number of objects to be created
 */
private synchronized int calculateDeficit(boolean incrementInternal) {
  int objectDeficit = getMinIdle() - getNumIdle();
  if (_maxActive > 0) {
    int growLimit = Math.max(0,
        getMaxActive() - getNumActive() - getNumIdle() - _numInternalProcessing);
    objectDeficit = Math.min(objectDeficit, growLimit);
  }
  if (incrementInternal && objectDeficit >0) {
    _numInternalProcessing++;
  }
  return objectDeficit;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-pool

/**
 * This returns the number of objects to create during the pool
 * sustain cycle. This will ensure that the minimum number of idle
 * instances is maintained without going past the maxActive value.
 *
 * @param incrementInternal - Should the count of objects currently under
 *                            some form of internal processing be
 *                            incremented?
 * @return The number of objects to be created
 */
private synchronized int calculateDeficit(boolean incrementInternal) {
  int objectDeficit = getMinIdle() - getNumIdle();
  if (_maxActive > 0) {
    int growLimit = Math.max(0,
        getMaxActive() - getNumActive() - getNumIdle() - _numInternalProcessing);
    objectDeficit = Math.min(objectDeficit, growLimit);
  }
  if (incrementInternal && objectDeficit >0) {
    _numInternalProcessing++;
  }
  return objectDeficit;
}
origin: org.apache.openjpa/openjpa-all

} else if ((getSoftMinEvictableIdleTimeMillis() > 0) &&
    (idleTimeMilis > getSoftMinEvictableIdleTimeMillis()) &&
    ((getNumIdle() + 1)> getMinIdle())) { // +1 accounts for object we are processing
  removeObject = true;
origin: org.apache.commons/pool

} else if ((getSoftMinEvictableIdleTimeMillis() > 0) &&
    (idleTimeMilis > getSoftMinEvictableIdleTimeMillis()) &&
    ((getNumIdle() + 1)> getMinIdle())) { // +1 accounts for object we are processing
  removeObject = true;
origin: org.apache.commons/com.springsource.org.apache.commons.pool

} else if ((getSoftMinEvictableIdleTimeMillis() > 0) &&
    (idleTimeMilis > getSoftMinEvictableIdleTimeMillis()) &&
    ((getNumIdle() + 1)> getMinIdle())) { // +1 accounts for object we are processing
  removeObject = true;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-pool

} else if ((getSoftMinEvictableIdleTimeMillis() > 0) &&
    (idleTimeMilis > getSoftMinEvictableIdleTimeMillis()) &&
    ((getNumIdle() + 1)> getMinIdle())) { // +1 accounts for object we are processing
  removeObject = true;
org.apache.commons.pool.implGenericObjectPoolgetMinIdle

Javadoc

Returns the minimum number of objects allowed in the pool before the evictor thread (if active) spawns new objects. (Note no objects are created when: numActive + numIdle >= maxActive)

Popular methods of GenericObjectPool

  • <init>
    Create a new GenericObjectPool using the specified values.
  • returnObject
    Returns an object instance to the pool. If #getMaxIdle() is set to a positive value and the number
  • borrowObject
    Borrows an object from the pool. If there is an idle instance available in the pool, then either th
  • setMaxActive
    Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or
  • close
    Closes the pool. Once the pool is closed, #borrowObject()will fail with IllegalStateException, but #
  • setMaxIdle
    Sets the cap on the number of "idle" instances in the pool. If maxIdle is set too low on heavily loa
  • setMinIdle
    Sets the minimum number of objects allowed in the pool before the evictor thread (if active) spawns
  • setTimeBetweenEvictionRunsMillis
    Sets the number of milliseconds to sleep between runs of the idle object evictor thread. When non-po
  • setMinEvictableIdleTimeMillis
    Sets the minimum amount of time an object may sit idle in the pool before it is eligible for evictio
  • setMaxWait
    Sets the maximum amount of time (in milliseconds) the #borrowObject method should block before throw
  • setTestOnBorrow
    When true, objects will be PoolableObjectFactory#validateObjectbefore being returned by the #borrowO
  • setWhenExhaustedAction
    Sets the action to take when the #borrowObject method is invoked when the pool is exhausted (the max
  • setTestOnBorrow,
  • setWhenExhaustedAction,
  • getNumActive,
  • getNumIdle,
  • setTestWhileIdle,
  • setNumTestsPerEvictionRun,
  • setTestOnReturn,
  • invalidateObject,
  • clear,
  • addObject

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Collectors (java.util.stream)
  • JButton (javax.swing)
  • JTable (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now