org.kie.api.runtime

## Interface KieSessionsPool

- All Known Subinterfaces:
    KieContainerSessionsPool

      public interface KieSessionsPool

  A pool of session created from a KieContainer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `KieSession` | `newKieSession()` Obtain a `KieSession` from this pool using the default session configuration.
    `KieSession` | `newKieSession(KieSessionConfiguration conf)` Obtain a `KieSession` from this pool using using the given session configuration.
    `StatelessKieSession` | `newStatelessKieSession()` Obtain a `StatelessKieSession` from this pool using the default session configuration.
    `StatelessKieSession` | `newStatelessKieSession(KieSessionConfiguration conf)` Obtain a `StatelessKieSession` from this pool using using the given session configuration.
    `void` | `shutdown()` Shutdown this pool and clean up all the resources

- - ### Method Detail

    - #### newKieSession

          KieSession newKieSession()

      Obtain a `KieSession` from this pool using the default session configuration. Calling `KieSession.dispose()` on this session when you are done will push it back into the pool.
      Returns:
        created `KieSession`

    - #### newKieSession

          KieSession newKieSession(KieSessionConfiguration conf)

      Obtain a `KieSession` from this pool using using the given session configuration. Calling `KieSession.dispose()` on this session when you are done will push it back into the pool.
      Returns:
        created `KieSession`

    - #### newStatelessKieSession

          StatelessKieSession newStatelessKieSession()

      Obtain a `StatelessKieSession` from this pool using the default session configuration. You do not need to call @{link #dispose()} on this. Note that, what is pooled here is not `StatelessKieSession` but the `KieSession` that it internally wraps, so calling multiple times `CommandExecutor.execute(Command)` ()} (or one of its overload) will make this `StatelessKieSession` to get a `KieSession` from the pool instead of creating a new one.
      Returns:
        created `StatelessKieSession`

    - #### newStatelessKieSession

          StatelessKieSession newStatelessKieSession(KieSessionConfiguration conf)

      Obtain a `StatelessKieSession` from this pool using using the given session configuration. You do not need to call @{link #dispose()} on this. Note that, what is pooled here is not `StatelessKieSession` but the `KieSession` that it internally wraps, so calling multiple times `CommandExecutor.execute(Command)` ()} (or one of its overload) will make this `StatelessKieSession` to get a `KieSession` from the pool instead of creating a new one.
      Returns:
        created `StatelessKieSession`

    - #### shutdown

          void shutdown()

      Shutdown this pool and clean up all the resources

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.