Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.datasource.pool
Interface XPooledConnection

All Known Implementing Classes:
  AbstractXPooledConnection, AtomikosXAPooledConnection

    public interface XPooledConnection

A pooling-capable object wrapping a physical connection to an underlying resource.

Author:
  lorban

Method Summary
`boolean` | `canBeRecycledForCallingThread()` Can the connection be recycled (if not available) for the calling thread?
`Reapable` | `createConnectionProxy(HeuristicMessage hmsg)` Create a disposable connection object that acts a controller for the pooled connection.
`void` | `destroy()` Destroy the pooled connection by closing the underlying physical connection.
`long` | `getLastTimeAcquired()` Get the last time the connection was acquired.
`long` | `getLastTimeReleased()` Get the last time the connection was released, i.e.
`boolean` | `isAvailable()` Is the connection available to be taken out of the pool ?
`boolean` | `isErroneous()` Is the pooled connection broken ?
`void` | `reap()` Invalidates (i.e., forces close) of the current connection proxy This does not mean that the connection can be reused immediately: pending transactions may exist that need to terminate.
`void` | `registerXPooledConnectionEventListener(XPooledConnectionEventListener listener)`
`void` | `unregisterXPooledConnectionEventListener(XPooledConnectionEventListener listener)`

Method Detail

### isAvailable

    boolean isAvailable()

  Is the connection available to be taken out of the pool ?

  Returns:

### canBeRecycledForCallingThread

    boolean canBeRecycledForCallingThread()

  Can the connection be recycled (if not available) for the calling thread?

  Returns:

### destroy

    void destroy()

  Destroy the pooled connection by closing the underlying physical connection.

### reap

    void reap()

  Invalidates (i.e., forces close) of the current connection proxy This does not mean that the connection can be reused immediately: pending transactions may exist that need to terminate. In other words: this acts as a forced close on the proxy.

### getLastTimeAcquired

    long getLastTimeAcquired()

  Get the last time the connection was acquired.

  Returns:

### getLastTimeReleased

    long getLastTimeReleased()

  Get the last time the connection was released, i.e. the last time when it has become available.

  Returns:

### createConnectionProxy

    Reapable createConnectionProxy(HeuristicMessage hmsg)
                                   throws CreateConnectionException

  Create a disposable connection object that acts a controller for the pooled connection. What exactly a connection object is depends on the implementation.

  Parameters:
    `hmsg` - The heuristic message to show in the logs.
  Returns:
  Throws:
    `CreateConnectionException`

### isErroneous

    boolean isErroneous()

  Is the pooled connection broken ?

  Returns:

### registerXPooledConnectionEventListener

    void registerXPooledConnectionEventListener(XPooledConnectionEventListener listener)

### unregisterXPooledConnectionEventListener

    void unregisterXPooledConnectionEventListener(XPooledConnectionEventListener listener)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.