Tabnine Logo
BoneCP.destroyConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
destroyConnection
method
in
com.jolbox.bonecp.BoneCP

Best Java code snippets using com.jolbox.bonecp.BoneCP.destroyConnection (Showing top 3 results out of 315)

origin: org.apache.sentry/sentry-shaded-miscellaneous

public void terminateAllConnections() {
  for (ConnectionHandle conn : this.threadFinalizableRefs.keySet()){
    this.pool.destroyConnection(conn);
  }
  this.threadFinalizableRefs.clear();
  
  this.fallbackStrategy.terminateAllConnections();
}
 
origin: org.apache.sentry/sentry-shaded-miscellaneous

/** Closes off all connections in all partitions. */
public void terminateAllConnections(){
  this.terminationLock.lock();
  try{
    // close off all connections.
    for (int i=0; i < this.pool.partitionCount; i++) {
      this.pool.partitions[i].setUnableToCreateMoreTransactions(false); // we can create new ones now, this is an optimization
      List<ConnectionHandle> clist = new LinkedList<ConnectionHandle>(); 
      this.pool.partitions[i].getFreeConnections().drainTo(clist);
      for (ConnectionHandle c: clist){
        this.pool.destroyConnection(c);
      }
    }
  } finally {
    this.terminationLock.unlock();
  }
}
origin: org.apache.sentry/sentry-shaded-miscellaneous

logger.error("Database access problem. Killing off this connection and all remaining connections in the connection pool. SQL State = " + state);
this.pool.connectionStrategy.terminateAllConnections();
this.pool.destroyConnection(this);
this.logicallyClosed.set(true);
alreadyDestroyed = true;
this.pool.destroyConnection(this);
this.logicallyClosed.set(true);
getOriginatingPartition().getPoolWatchThreadSignalQueue().offer(new Object()); // item being pushed is not important.
com.jolbox.bonecpBoneCPdestroyConnection

Javadoc

Physically close off the internal connection.

Popular methods of BoneCP

  • getConnection
  • shutdown
    Closes off this connection pool.
  • <init>
    Constructor.
  • getConfig
    Gets config object.
  • getTotalCreatedConnections
    Return total number of connections created in all partitions.
  • getTotalLeased
    Return total number of connections currently in use by an application
  • captureStackTrace
    Throw an exception to capture it so as to be able to print it out later on
  • closeStatement
  • getDbIsDown
    Returns the dbIsDown field.
  • getStatistics
    Returns a reference to the statistics class.
  • getTotalFree
    Return the number of free connections available to an application right away (excluding connections
  • internalReleaseConnection
    Release a connection by placing the connection back in the pool.
  • getTotalFree,
  • internalReleaseConnection,
  • isConnectionHandleAlive,
  • maybeSignalForMoreConnections,
  • obtainRawInternalConnection,
  • postDestroyConnection,
  • putConnectionBackInPartition,
  • registerUnregisterJMX,
  • unregisterDriver

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • 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
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Top PhpStorm plugins
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