Package org.kie.api.runtime
Interface KieSessionsPool
- 
- All Known Subinterfaces:
 KieContainerSessionsPool
public interface KieSessionsPoolA pool of session created from a KieContainer 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KieSessionnewKieSession()Obtain aKieSessionfrom this pool using the default session configuration.KieSessionnewKieSession(KieSessionConfiguration conf)Obtain aKieSessionfrom this pool using using the given session configuration.StatelessKieSessionnewStatelessKieSession()Obtain aStatelessKieSessionfrom this pool using the default session configuration.StatelessKieSessionnewStatelessKieSession(KieSessionConfiguration conf)Obtain aStatelessKieSessionfrom this pool using using the given session configuration.voidshutdown()Shutdown this pool and clean up all the resources 
 - 
 
- 
- 
Method Detail
- 
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
KieSession newKieSession(KieSessionConfiguration conf)
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
StatelessKieSession newStatelessKieSession(KieSessionConfiguration conf)
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 
 - 
 
 -