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

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

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

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

public int getTotalFree() {
  return this.pool.getTotalFree();
}
origin: stackoverflow.com

 /**
 * Get a status information of the JDBC connections.
 * 
 * @return The status information of the JDBC connections.
 */
public String getConnectionStatus() {
  String status = "unknown";
  if (dataSource instanceof BoneCPDataSource) {

    BoneCPDataSource bcpDataSource = (BoneCPDataSource) dataSource;
    BoneCP bcp = bcpDataSource.getPool();
    status = "JDBC connections: " + bcp.getTotalLeased()
      + " in use / " + bcp.getTotalFree()
      + " in pool / total created "
      + bcp.getTotalCreatedConnections();

  }
  return status;
}
com.jolbox.bonecpBoneCPgetTotalFree

Javadoc

Return the number of free connections available to an application right away (excluding connections that can be created dynamically)

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.
  • internalReleaseConnection
    Release a connection by placing the connection back in the pool.
  • isConnectionHandleAlive
    Sends a dummy statement to the server to keep the connection alive
  • internalReleaseConnection,
  • isConnectionHandleAlive,
  • maybeSignalForMoreConnections,
  • obtainRawInternalConnection,
  • postDestroyConnection,
  • putConnectionBackInPartition,
  • registerUnregisterJMX,
  • unregisterDriver,
  • destroyConnection

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • String (java.lang)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • From CI to AI: The AI layer in your organization
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