Codota Logo
StackObjectPool.assertOpen
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
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
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • JList (javax.swing)
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