Package org.kie.api.runtime
Interface KieContainerSessionsPool
-
- All Superinterfaces:
KieSessionsPool
public interface KieContainerSessionsPool extends KieSessionsPool
A pool of session created from a KieContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KieSessionnewKieSession(String kSessionName)Obtain aKieSessionwith the given name from this pool.KieSessionnewKieSession(String kSessionName, KieSessionConfiguration conf)Obtain aKieSessionwith the given name and configuration from this pool.StatelessKieSessionnewStatelessKieSession(String kSessionName)Obtain aStatelessKieSessionwith the given name from this pool.StatelessKieSessionnewStatelessKieSession(String kSessionName, KieSessionConfiguration conf)Obtain aStatelessKieSessionwith the given name and configuration from this pool.-
Methods inherited from interface org.kie.api.runtime.KieSessionsPool
newKieSession, newKieSession, newStatelessKieSession, newStatelessKieSession, shutdown
-
-
-
-
Method Detail
-
newKieSession
KieSession newKieSession(String kSessionName)
Obtain aKieSessionwith the given name from this pool. CallingKieSession.dispose()on this session when you are done will push it back into the pool.- Returns:
- created
KieSession - Throws:
RuntimeException- if the KieContainer doesn't have any KieSession with the given name
-
newKieSession
KieSession newKieSession(String kSessionName, KieSessionConfiguration conf)
Obtain aKieSessionwith the given name and configuration from this pool. CallingKieSession.dispose()on this session when you are done will push it back into the pool.- Returns:
- created
KieSession - Throws:
RuntimeException- if the KieContainer doesn't have any KieSession with the given name
-
newStatelessKieSession
StatelessKieSession newStatelessKieSession(String kSessionName)
Obtain aStatelessKieSessionwith the given name from this pool. Note that, what is pooled here is notStatelessKieSessionbut theKieSessionthat it internally wraps, so calling multiple timesCommandExecutor.execute(Command)()} (or one of its overload) will make thisStatelessKieSessionto get aKieSessionfrom the pool instead of creating a new one.- Returns:
- created
StatelessKieSession - Throws:
RuntimeException- if this KieContainer doesn't have any StatelessKieSession with the given name
-
newStatelessKieSession
StatelessKieSession newStatelessKieSession(String kSessionName, KieSessionConfiguration conf)
Obtain aStatelessKieSessionwith the given name and configuration from this pool. Note that, what is pooled here is notStatelessKieSessionbut theKieSessionthat it internally wraps, so calling multiple timesCommandExecutor.execute(Command)()} (or one of its overload) will make thisStatelessKieSessionto get aKieSessionfrom the pool instead of creating a new one.- Returns:
- created
StatelessKieSession - Throws:
RuntimeException- if this KieContainer doesn't have any StatelessKieSession with the given name
-
-