Codota Logo
GenericObjectPool.close
Code IndexAdd Codota to your IDE (free)

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

Best Java code snippets using org.apache.commons.pool.impl.GenericObjectPool.close (Showing top 20 results out of 342)

  • Common ways to obtain GenericObjectPool
private void myMethod () {
GenericObjectPool g =
  • Codota Iconnew GenericObjectPool()
  • Codota Iconnew GenericObjectPool(null)
  • Codota IconPoolableObjectFactory factory;new GenericObjectPool(factory)
  • Smart code suggestions by Codota
}
origin: apache/flume

@Override
public void close() {
 try {
  connectionPool.close();
 } catch (Exception ex) {
  throw new JdbcChannelException("Unable to close connection pool", ex);
origin: weibocom/motan

pool.close();
origin: geotools/geotools

public void close() {
  if (pool != null) {
    try {
      pool.close();
      pool = null;
      LOGGER.fine("SDE connection pool closed. ");
    } catch (Exception e) {
      LOGGER.log(Level.WARNING, "Closing pool: " + e.getMessage(), e);
    }
  }
}
origin: banq/jdonframework

public void close() {
  pool.clear();
  try {
    pool.close();
  } catch (Exception e) {
  }
}
origin: deegree/deegree3

/**
 * @throws Exception
 */
public void destroy()
            throws Exception {
  pool.close();
}
origin: alexo/wro4j

 /**
  * Close the object pool to avoid the memory leak.
  *
  * @throws Exception
  *           if the close operation failed.
  */
 public void destroy() throws Exception {
  LOG.debug("closing objectPool");
  objectPool.close();
 }
}
origin: ro.isdc.wro4j/wro4j-extensions

 /**
  * Close the object pool to avoid the memory leak.
  *
  * @throws Exception
  *           if the close operation failed.
  */
 public void destroy() throws Exception {
  LOG.debug("closing objectPool");
  objectPool.close();
 }
}
origin: org.netpreserve.openwayback/openwayback-core

public void close() {
  if (goPool != null) {
    try {
      goPool.close();
    } catch (Exception e) {
      LOGGER.warning("REDISCONN: CLOSE: " + e);
    }
  }
}

origin: NationalSecurityAgency/datawave

@Override
public synchronized void close() throws IOException {
  
  isOpen = false;
  // let the currently running scanners go
  try {
    scannerPool.close();
  } catch (Exception e) {
    throw new IOException(e);
  }
  
}

origin: org.apache.metamodel/MetaModel-jdbc

@Override
public void close() {
  logger.debug("Closing compiled JDBC query: {}", _sql);
  try {
    _pool.close();
  } catch (Exception e) {
    throw handleError(e, "close pool of leases");
  } finally {
    _closed = true;
  }
}
origin: com.baidu.beidou/navi-pbrpc

/**
 * 销毁对象池
 */
public void destroy() {
  try {
    internalPool.close();
  } catch (Exception e) {
    throw new PbrpcException("Could not destroy the pool", e);
  }
}
origin: neoremind/navi-pbrpc

/**
 * 销毁对象池
 */
public void destroy() {
  try {
    internalPool.close();
  } catch (Exception e) {
    throw new PbrpcException("Could not destroy the pool", e);
  }
}
origin: ontopia/ontopia

 @Override
public void close() {
 // Release generic pool
 try {
  pool.close();
 } catch (Exception e) {
  throw new OntopiaRuntimeException("Problems occurred when closing DBCP connection pool.", e);
 }
}
origin: openstack/monasca-common

 /**
  * Shut down this factory.
  */
 public void shutdown() {
  try {
   pool.close();
  } catch (Exception e) {
   throw new AuthConnectionException("Failed to close client pool", e);
  }
 }
}
origin: org.apache.openejb.patch/openjpa-kernel

public void close() {
  // Close the pool of sockets to this peer. This
  // will close all sockets in the pool.
  try {
    _socketPool.close();
  } catch (Exception e) {
    if (log.isWarnEnabled()) {
      log.warn(s_loc.get("tcp-close-pool-error"), e);
    }
  }
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
public void close() throws IOException {
 try {
  super.close();
 } catch (IOException ioe) {
  throw ioe;
 } catch (Exception e) {
  throw new FijiIOException(e);
 }
 mFactory.mFactoryDelegate.getTable().release();
}
origin: org.apache.openejb.patch/openjpa

public void close() {
  // Close the pool of sockets to this peer. This
  // will close all sockets in the pool.
  try {
    _socketPool.close();
  } catch (Exception e) {
    if (log.isWarnEnabled()) {
      log.warn(s_loc.get("tcp-close-pool-error"), e);
    }
  }
}
origin: org.apache.openjpa/openjpa-all

public void close() {
  // Close the pool of sockets to this peer. This
  // will close all sockets in the pool.
  try {
    _socketPool.close();
  } catch (Exception e) {
    if (log.isWarnEnabled()) {
      log.warn(s_loc.get("tcp-close-pool-error"), e);
    }
  }
}
origin: org.apache.openjpa/openjpa-kernel

public void close() {
  // Close the pool of sockets to this peer. This
  // will close all sockets in the pool.
  try {
    _socketPool.close();
  } catch (Exception e) {
    if (log.isWarnEnabled()) {
      log.warn(s_loc.get("tcp-close-pool-error"), e);
    }
  }
}
origin: org.apache.tapestry/com.springsource.org.apache.tapestry

public void registryDidShutdown()
{
  try
  {
    _contextPool.clear();
    _contextPool.close();
    OgnlRuntime.clearCache();
    Introspector.flushCaches();
    
  } catch (Exception et) {
    // ignore
  }
}
org.apache.commons.pool.implGenericObjectPoolclose

Javadoc

Closes the pool. Once the pool is closed, #borrowObject()will fail with IllegalStateException, but #returnObject(Object) and #invalidateObject(Object) will continue to work. This method does not #clear() the pool. The method is idempotent - that is, it is OK to call it on a closed pool.

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
  • 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
  • getNumActive
    Return the number of instances currently borrowed from this pool.
  • setWhenExhaustedAction,
  • getNumActive,
  • getNumIdle,
  • setTestWhileIdle,
  • setNumTestsPerEvictionRun,
  • setTestOnReturn,
  • invalidateObject,
  • clear,
  • addObject

Popular in Java

  • Making http requests using okhttp
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now