Tabnine Logo
StackObjectPool.assertOpen
Code IndexAdd Tabnine to your IDE (free)

How to use
assertOpen
method
in
org.apache.commons.pool.impl.StackObjectPool

Best Java code snippets using org.apache.commons.pool.impl.StackObjectPool.assertOpen (Showing top 15 results out of 315)

origin: commons-pool/commons-pool

/**
 * Sets the {@link PoolableObjectFactory factory} this pool uses
 * to create new instances. Trying to change
 * the <code>factory</code> while there are borrowed objects will
 * throw an {@link IllegalStateException}.
 *
 * @param factory the {@link PoolableObjectFactory} used to create new instances.
 * @throws IllegalStateException when the factory cannot be set at this time
 * @deprecated to be removed in pool 2.0
 */
@Deprecated
@Override
public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException {
  assertOpen();
  if(0 < getNumActive()) {
    throw new IllegalStateException("Objects are already active");
  } else {
    clear();
    _factory = factory;
  }
}
origin: commons-pool/commons-pool

assertOpen();
if (_factory == null) {
  throw new IllegalStateException("Cannot add objects without a factory.");
origin: commons-pool/commons-pool

assertOpen();
T obj = null;
boolean newlyCreated = false;
origin: org.apache.openjpa/openjpa-all

/**
 * Sets the {@link PoolableObjectFactory factory} this pool uses
 * to create new instances. Trying to change
 * the <code>factory</code> while there are borrowed objects will
 * throw an {@link IllegalStateException}.
 *
 * @param factory the {@link PoolableObjectFactory} used to create new instances.
 * @throws IllegalStateException when the factory cannot be set at this time
 * @deprecated to be removed in pool 2.0
 */
@Deprecated
@Override
public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException {
  assertOpen();
  if(0 < getNumActive()) {
    throw new IllegalStateException("Objects are already active");
  } else {
    clear();
    _factory = factory;
  }
}
origin: org.apache.commons/pool

/**
 * Sets the {@link PoolableObjectFactory factory} this pool uses
 * to create new instances. Trying to change
 * the <code>factory</code> while there are borrowed objects will
 * throw an {@link IllegalStateException}.
 *
 * @param factory the {@link PoolableObjectFactory} used to create new instances.
 * @throws IllegalStateException when the factory cannot be set at this time
 * @deprecated to be removed in pool 2.0
 */
@Deprecated
@Override
public synchronized void setFactory(PoolableObjectFactory<T> factory) throws IllegalStateException {
  assertOpen();
  if(0 < getNumActive()) {
    throw new IllegalStateException("Objects are already active");
  } else {
    clear();
    _factory = factory;
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-pool

/**
 * Sets the {@link PoolableObjectFactory factory} this pool uses
 * to create new instances. Trying to change
 * the <code>factory</code> while there are borrowed objects will
 * throw an {@link IllegalStateException}.
 *
 * @param factory the {@link PoolableObjectFactory} used to create new instances.
 * @throws IllegalStateException when the factory cannot be set at this time
 */
public synchronized void setFactory(PoolableObjectFactory factory) throws IllegalStateException {
  assertOpen();
  if(0 < getNumActive()) {
    throw new IllegalStateException("Objects are already active");
  } else {
    clear();
    _factory = factory;
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.pool

/**
 * Sets the {@link PoolableObjectFactory factory} this pool uses
 * to create new instances. Trying to change
 * the <code>factory</code> while there are borrowed objects will
 * throw an {@link IllegalStateException}.
 *
 * @param factory the {@link PoolableObjectFactory} used to create new instances.
 * @throws IllegalStateException when the factory cannot be set at this time
 */
public synchronized void setFactory(PoolableObjectFactory factory) throws IllegalStateException {
  assertOpen();
  if(0 < getNumActive()) {
    throw new IllegalStateException("Objects are already active");
  } else {
    clear();
    _factory = factory;
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.pool

assertOpen();
if (_factory == null) {
  throw new IllegalStateException("Cannot add objects without a factory.");
origin: org.apache.commons/com.springsource.org.apache.commons.pool

public synchronized Object borrowObject() throws Exception {
  assertOpen();
  Object obj = null;
  boolean newlyCreated = false;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-pool

public synchronized Object borrowObject() throws Exception {
  assertOpen();
  Object obj = null;
  boolean newlyCreated = false;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-pool

assertOpen();
if (_factory == null) {
  throw new IllegalStateException("Cannot add objects without a factory.");
origin: org.apache.commons/pool

assertOpen();
if (_factory == null) {
  throw new IllegalStateException("Cannot add objects without a factory.");
origin: org.apache.openjpa/openjpa-all

assertOpen();
if (_factory == null) {
  throw new IllegalStateException("Cannot add objects without a factory.");
origin: org.apache.commons/pool

assertOpen();
T obj = null;
boolean newlyCreated = false;
origin: org.apache.openjpa/openjpa-all

assertOpen();
T obj = null;
boolean newlyCreated = false;
org.apache.commons.pool.implStackObjectPoolassertOpen

Popular methods of StackObjectPool

  • <init>
    Create a new SimpleObjectPool using the specified factory to create new instances, capping the numbe
  • clear
    Clears any objects sitting idle in the pool.
  • getNumActive
    Return the number of instances currently borrowed from this pool.
  • isClosed

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for WebStorm
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