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

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

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

origin: org.batoo.jpa/batoo-jpa

/**
 * Returns the total leased connections.
 * 
 * @return total leased connections
 */
public int getTotalLeased() {
  return this.pool.value.getTotalLeased();
}
origin: org.apache.sentry/sentry-shaded-miscellaneous

public int getTotalLeased() {
  return this.pool.getTotalLeased();
}
origin: org.apache.sentry/sentry-shaded-miscellaneous

/**
 * Returns the total leased connections.
 *
 * @return total leased connections
 */
public int getTotalLeased() {
  return getPool() == null ? 0 : getPool().getTotalLeased();
}
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.bonecpBoneCPgetTotalLeased

Javadoc

Return total number of connections currently in use by an application

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.
  • 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.
  • 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

  • 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 plugins for Android Studio
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