Package org.kie.api.runtime
Interface KieContainerSessionsPool
- All Superinterfaces:
KieSessionsPool
A pool of session created from a KieContainer
-
Method Summary
Modifier and TypeMethodDescriptionnewKieSession(String kSessionName) Obtain aKieSessionwith the given name from this pool.newKieSession(String kSessionName, KieSessionConfiguration conf) Obtain aKieSessionwith the given name and configuration from this pool.newStatelessKieSession(String kSessionName) Obtain aStatelessKieSessionwith the given name from this pool.newStatelessKieSession(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 Details
-
newKieSession
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
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
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
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
-