org.jbpm.runtime.manager.impl.factory

## Class InMemorySessionFactory

- java.lang.Object
- - org.jbpm.runtime.manager.impl.factory.InMemorySessionFactory

- All Implemented Interfaces:
    org.kie.internal.runtime.manager.SessionFactory

      public class InMemorySessionFactory
      extends Object
      implements org.kie.internal.runtime.manager.SessionFactory

  SessionFactory implementation backed with an in-memory store of used sessions. This does not preserve state between server restarts or even `RuntimeManager` close. For that, the more permanent store `JPASessionFactory` should be used.
  See Also:
    `JPASessionFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InMemorySessionFactory(org.kie.api.runtime.manager.RuntimeEnvironment environment, String owner)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `org.kie.api.runtime.KieSession` | `findKieSessionById(Long sessionId)`
    `protected Map<Long,org.kie.api.runtime.KieSession>` | `getSessions()`
    `org.kie.api.runtime.KieSession` | `newKieSession()`
    `void` | `onDispose(Long sessionId)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InMemorySessionFactory

          public InMemorySessionFactory(org.kie.api.runtime.manager.RuntimeEnvironment environment,
                                        String owner)

  - ### Method Detail

    - #### newKieSession

          public org.kie.api.runtime.KieSession newKieSession()

      Specified by:
        `newKieSession` in interface `org.kie.internal.runtime.manager.SessionFactory`

    - #### findKieSessionById

          public org.kie.api.runtime.KieSession findKieSessionById(Long sessionId)

      Specified by:
        `findKieSessionById` in interface `org.kie.internal.runtime.manager.SessionFactory`

    - #### close

          public void close()

      Specified by:
        `close` in interface `org.kie.internal.runtime.manager.SessionFactory`

    - #### onDispose

          public void onDispose(Long sessionId)

      Specified by:
        `onDispose` in interface `org.kie.internal.runtime.manager.SessionFactory`

    - #### getSessions

          protected Map<Long,org.kie.api.runtime.KieSession> getSessions()

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