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

## oracle.ifs.core.runtime
Class LibrarySessionPool

    java.lang.Object
      oracle.ifs.core.runtime.LibrarySessionPool

    public class LibrarySessionPool

extends java.lang.Object

A LibrarySessionPool pools LibrarySessions for use within Nodes and Servers.

(Published)

Field Summary
`static int` | `MAXIMUM_POOL_SIZE_DEFAULT` The default pool size.

Constructor Summary
`LibrarySessionPool()` Constructs a LibrarySessionPool.
`LibrarySessionPool(int maxPoolSize)` Constructs a LibrarySessionPool.
`LibrarySessionPool(int maxPoolSize, java.lang.String serviceName, java.lang.String appName, SystemUserCredential cred)` Constructs a LibrarySessionPool.

Method Summary
`LibrarySession` | `acquireSession()` Acquires a session from the session pool.
`void` | `activatePool()` Activates the session pool.
`protected LibrarySession` | `constructSession()` Constructs a new LibrarySession.
`void` | `deactivatePool()` De-activates the session pool, by disconnecting all sessions.
`protected void` | `disposeService()` Disposes the LibraryService that this instance is associated with.
`java.lang.String` | `getApplicationName()` Gets the application name.
`int` | `getMaximumPoolSize()` Gets the maximum pool size setting.
`java.lang.String` | `getServiceName()` Gets the service name.
`int` | `getSessionConnectCount()` Gets the number of sessions that have been connected.
`int` | `getSessionDisconnectCount()` Gets the number of sessions that have been disconnected.
`void` | `releaseSession(LibrarySession session)` Releases a session back to the session pool.
`void` | `setApplicationName(java.lang.String appName)` Sets the application name.
`void` | `setMaximumPoolSize(int maxPoolSize)` Updates the maximum session count.
`void` | `setServiceName(java.lang.String serviceName)` Sets the service name.
`protected void` | `setSessionProperties(LibrarySession session)` Sets up a newly created LibrarySession.
`void` | `setSystemUserCredential(SystemUserCredential cred)` Sets the system user credential

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAXIMUM_POOL_SIZE_DEFAULT

    public static final int MAXIMUM_POOL_SIZE_DEFAULT

  Description copied from class: `LibrarySessionPool`
  The default pool size.

  See Also:
    Constant Field Values

Constructor Detail

### LibrarySessionPool

    public LibrarySessionPool()

  Constructs a LibrarySessionPool.

### LibrarySessionPool

    public LibrarySessionPool(int maxPoolSize)

  Constructs a LibrarySessionPool.

  Parameters:
    `maxPoolSize` - the maximum pool size

### LibrarySessionPool

    public LibrarySessionPool(int maxPoolSize,
                              java.lang.String serviceName,
                              java.lang.String appName,
                              SystemUserCredential cred)

  Constructs a LibrarySessionPool.

  Parameters:
    `maxPoolSize` - the maximum number pool size
    `serviceName` - the service name
    `appName` - the application name (for DB connection metadata)
    `cred` - the system user credentials

Method Detail

### setMaximumPoolSize

    public void setMaximumPoolSize(int maxPoolSize)

  Description copied from class: `LibrarySessionPool`
  Updates the maximum session count.

  Parameters:
    `maxPoolSize` - the maximum pool size

### setServiceName

    public void setServiceName(java.lang.String serviceName)

  Description copied from class: `LibrarySessionPool`
  Sets the service name.

  Parameters:
    `serviceName` - the service name

### setApplicationName

    public void setApplicationName(java.lang.String appName)

  Description copied from class: `LibrarySessionPool`
  Sets the application name.

  Parameters:
    `appName` - the application name to associate with the session

### setSystemUserCredential

    public void setSystemUserCredential(SystemUserCredential cred)

  Description copied from class: `LibrarySessionPool`
  Sets the system user credential

  Parameters:
    `cred` - the system user credential

### getMaximumPoolSize

    public int getMaximumPoolSize()

  Description copied from class: `LibrarySessionPool`
  Gets the maximum pool size setting.

  Returns:
    the maximum number of sessions that can be pooled

### getServiceName

    public java.lang.String getServiceName()

  Description copied from class: `LibrarySessionPool`
  Gets the service name.

  Returns:
    the service name

### getApplicationName

    public java.lang.String getApplicationName()

  Description copied from class: `LibrarySessionPool`
  Gets the application name.

  Returns:
    the application name to associate with the session

### getSessionConnectCount

    public int getSessionConnectCount()

  Description copied from class: `LibrarySessionPool`
  Gets the number of sessions that have been connected.

  Returns:
    the number of sessions that have been connected.

### getSessionDisconnectCount

    public int getSessionDisconnectCount()

  Description copied from class: `LibrarySessionPool`
  Gets the number of sessions that have been disconnected.

  NOTE: this only counts the number of sessions that were disconnected via calling `disconnectSession` on this class. Any sessions that are disconnected externally are not counted.

  Returns:
    the number of sessions that have been disconnected.

### activatePool

    public void activatePool()

  Description copied from class: `LibrarySessionPool`
  Activates the session pool.

### deactivatePool

    public void deactivatePool()
                        throws IfsException

  Description copied from class: `LibrarySessionPool`
  De-activates the session pool, by disconnecting all sessions.

  Throws:
    `IfsException` - if the operation fails

### acquireSession

    public LibrarySession acquireSession()
                                  throws IfsException

  Description copied from class: `LibrarySessionPool`
  Acquires a session from the session pool.

  Returns:
    a session
  Throws:
    `IfsException` - if the operation fails

### releaseSession

    public void releaseSession(LibrarySession session)

  Description copied from class: `LibrarySessionPool`
  Releases a session back to the session pool.

  Parameters:
    `session` - session to put back in the pool

### constructSession

    protected LibrarySession constructSession()
                                       throws IfsException

  Description copied from class: `LibrarySessionPool`
  Constructs a new LibrarySession.

  Returns:
    the newly created session
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### setSessionProperties

    protected void setSessionProperties(LibrarySession session)
                                 throws IfsException

  Description copied from class: `LibrarySessionPool`
  Sets up a newly created LibrarySession.

  Parameters:
    `session` - the newly created session
  Throws:
    `IfsException` - if the operation fails
  (Unpublished)

### disposeService

    protected void disposeService()
                           throws IfsException

  Description copied from class: `LibrarySessionPool`
  Disposes the LibraryService that this instance is associated with.

  Obviously this is a harsh action, and should only be called by other runtime components (e.g. Node) when indicated.

  Throws:
    `IfsException` - if the operation fails
  (Published)

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