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

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

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

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

 @Override
public ConnectionHandle pollConnection(){
 ConnectionHandle result = null;
 int partition = (int) (Thread.currentThread().getId() % this.pool.partitionCount);
 ConnectionPartition connectionPartition = this.pool.partitions[partition];
 
 result = connectionPartition.getFreeConnections().poll();
 if (result == null) {
  // we ran out of space on this partition, pick another free one
  for (int i=0; i < this.pool.partitionCount; i++){
   if (i == partition) {
    continue; // we already determined it's not here
   }
   result = this.pool.partitions[i].getFreeConnections().poll(); // try our luck with this partition
      if (result != null) {
    connectionPartition = this.pool.partitions[i]; // we found it here
    break;  // we found a connection
   }
  }
 }
   
 if (!connectionPartition.isUnableToCreateMoreTransactions()){ // unless we can't create any more connections...
  this.pool.maybeSignalForMoreConnections(connectionPartition);  // see if we need to create more
 }
   
 return result;
}
origin: org.apache.sentry/sentry-shaded-miscellaneous

postDestroyConnection(connectionHandle);
maybeSignalForMoreConnections(connectionPartition);
connectionHandle.clearStatementCaches(true);
return; // don't place back in queue - connection is broken or expired.
origin: org.wisdom-framework/wisdom-jdbc-datasources

postDestroyConnection(connectionHandle);
maybeSignalForMoreConnections(connectionPartition);
connectionHandle.clearStatementCaches(true);
return; // don't place back in queue - connection is broken or expired.
com.jolbox.bonecpBoneCPmaybeSignalForMoreConnections

Javadoc

Tests if this partition has hit a threshold and signal to the pool watch thread to create new connections

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,
  • obtainRawInternalConnection,
  • postDestroyConnection,
  • putConnectionBackInPartition,
  • registerUnregisterJMX,
  • unregisterDriver,
  • destroyConnection

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Top 12 Jupyter Notebook extensions
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