Package org.kie.api.runtime
Interface KieSessionsPool
- All Known Subinterfaces:
KieContainerSessionsPool
public interface KieSessionsPool
A pool of session created from a KieContainer
-
Method Summary
Modifier and TypeMethodDescriptionObtain aKieSessionfrom this pool using the default session configuration.Obtain aKieSessionfrom this pool using using the given session configuration.Obtain aStatelessKieSessionfrom this pool using the default session configuration.Obtain aStatelessKieSessionfrom this pool using using the given session configuration.voidshutdown()Shutdown this pool and clean up all the resources
-
Method Details
-
newKieSession
KieSession newKieSession()Obtain aKieSessionfrom this pool using the default session configuration. CallingKieSession.dispose()on this session when you are done will push it back into the pool.- Returns:
- created
KieSession
-
newKieSession
Obtain aKieSessionfrom this pool using using the given session configuration. CallingKieSession.dispose()on this session when you are done will push it back into the pool.- Returns:
- created
KieSession
-
newStatelessKieSession
StatelessKieSession newStatelessKieSession()Obtain aStatelessKieSessionfrom this pool using the default session configuration. You do not need to call @{link #dispose()} on this. 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
-
newStatelessKieSession
Obtain aStatelessKieSessionfrom 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 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
-
shutdown
void shutdown()Shutdown this pool and clean up all the resources
-