org.jboss.jca.core.connectionmanager.pool.api

## Interface Pool

- All Superinterfaces:
    org.jboss.jca.core.api.connectionmanager.pool.Pool
  All Known Subinterfaces:
    PrefillPool
  All Known Implementing Classes:
    AbstractPrefillPool, OnePool, PoolBySubject

      public interface Pool
      extends org.jboss.jca.core.api.connectionmanager.pool.Pool

  A pool.
  Author:
    Gurkan Erdogdu, David Jencks, Jesper Pedersen

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancelShutdown()` Cancel shutdown
    `void` | `emptyManagedConnectionPool(ManagedConnectionPool pool)` Remove the matching managed connection pool if the pool is empty
    `ConnectionListener` | `findConnectionListener(javax.resource.spi.ManagedConnection mc)` Find a connection listener
    `ConnectionListener` | `findConnectionListener(javax.resource.spi.ManagedConnection mc, java.lang.Object connection)` Find a connection listener
    `Capacity` | `getCapacity()` Get the capacity policy
    `ConnectionListener` | `getConnection(javax.transaction.Transaction trackByTransaction, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)` Get a connection
    `PoolStatisticsImpl` | `getInternalStatistics()` Get internal statistics
    `Semaphore` | `getLock()` Get the lock
    `CoreLogger` | `getLogger()` Get the logger
    `javax.resource.spi.ManagedConnectionFactory` | `getManagedConnectionFactory()` Retrieve the managed connection factory for this pool.
    `boolean` | `hasConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)` Has an existing connection
    `boolean` | `isFIFO()` Is the pool a FIFO or FILO pool
    `boolean` | `isFull()` Is the pool full
    `boolean` | `isIdle()` Is the pool idle
    `boolean` | `isInterleaving()` Get the interleaving flag
    `boolean` | `isSharable()` Is sharable
    `boolean` | `isShutdown()` Is shutdown
    `void` | `prepareShutdown()` Prepare Shutdown
    `void` | `returnConnection(ConnectionListener cl, boolean kill)` Return a connection
    `void` | `setCapacity(Capacity c)` Set the capacity policy
    `void` | `setConnectionManager(ConnectionManager cm)` Set the connection manager
    `void` | `setInterleaving(boolean v)` Set the interleaving flag
    `void` | `setName(java.lang.String poolName)` Sets pool name.
    `void` | `shutdown()` Shutdown the pool

    - ### Methods inherited from interface org.jboss.jca.core.api.connectionmanager.pool.Pool

      `dumpQueuedThreads, flush, flush, flush, getName, getStatistics, testConnection, testConnection`

- - ### Method Detail

    - #### setName

          void setName(java.lang.String poolName)

      Sets pool name.
      Parameters:
        `poolName` - pool name

    - #### isSharable

          boolean isSharable()

      Is sharable
      Returns:
        The value

    - #### getManagedConnectionFactory

          javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()

      Retrieve the managed connection factory for this pool.
      Returns:
        the managed connection factory

    - #### setConnectionManager

          void setConnectionManager(ConnectionManager cm)

      Set the connection manager
      Parameters:
        `cm` - the connection manager

    - #### getLock

          Semaphore getLock()

      Get the lock
      Returns:
        The value

    - #### getCapacity

          Capacity getCapacity()

      Get the capacity policy
      Returns:
        The value

    - #### isFIFO

          boolean isFIFO()

      Is the pool a FIFO or FILO pool
      Returns:
        True if FIFO

    - #### setCapacity

          void setCapacity(Capacity c)

      Set the capacity policy
      Parameters:
        `c` - The value

    - #### isInterleaving

          boolean isInterleaving()

      Get the interleaving flag
      Returns:
        The value

    - #### setInterleaving

          void setInterleaving(boolean v)

      Set the interleaving flag
      Parameters:
        `v` - The value

    - #### isIdle

          boolean isIdle()

      Is the pool idle
      Returns:
        True if idle, otherwise false

    - #### isFull

          boolean isFull()

      Is the pool full
      Returns:
        True if full, otherwise false

    - #### getInternalStatistics

          PoolStatisticsImpl getInternalStatistics()

      Get internal statistics
      Returns:
        The value

    - #### getConnection

          ConnectionListener getConnection(javax.transaction.Transaction trackByTransaction,
                                           javax.security.auth.Subject subject,
                                           javax.resource.spi.ConnectionRequestInfo cri)
                                    throws javax.resource.ResourceException

      Get a connection
      Parameters:
        `trackByTransaction` - for transaction stickiness
        `subject` - the subject for connection
        `cri` - the connection request information
      Returns:
        a connection event listener wrapping the connection
      Throws:
        `javax.resource.ResourceException` - for any error

    - #### findConnectionListener

          ConnectionListener findConnectionListener(javax.resource.spi.ManagedConnection mc)

      Find a connection listener
      Parameters:
        `mc` - The managed connection
      Returns:
        The connection listener

    - #### findConnectionListener

          ConnectionListener findConnectionListener(javax.resource.spi.ManagedConnection mc,
                                                    java.lang.Object connection)

      Find a connection listener
      Parameters:
        `mc` - The managed connection
        `connection` - The connection
      Returns:
        The connection listener

    - #### returnConnection

          void returnConnection(ConnectionListener cl,
                                boolean kill)
                         throws javax.resource.ResourceException

      Return a connection
      Parameters:
        `cl` - the connection event listener wrapping the connection
        `kill` - whether to destroy the managed connection
      Throws:
        `javax.resource.ResourceException` - for any error

    - #### hasConnection

          boolean hasConnection(javax.security.auth.Subject subject,
                                javax.resource.spi.ConnectionRequestInfo cri)

      Has an existing connection
      Parameters:
        `subject` - the subject for connection
        `cri` - the connection request information
      Returns:
        `true` if there is an existing connection enlisted, otherwise `false`

    - #### isShutdown

          boolean isShutdown()

      Is shutdown
      Returns:
        The value

    - #### shutdown

          void shutdown()

      Shutdown the pool

    - #### prepareShutdown

          void prepareShutdown()

      Prepare Shutdown

    - #### cancelShutdown

          boolean cancelShutdown()

      Cancel shutdown
      Returns:
        True if the shutdown was canceled; false otherwise

    - #### emptyManagedConnectionPool

          void emptyManagedConnectionPool(ManagedConnectionPool pool)

      Remove the matching managed connection pool if the pool is empty
      Parameters:
        `pool` - The pool

    - #### getLogger

          CoreLogger getLogger()

      Get the logger
      Returns:
        The value

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)