Package org.kie.api.runtime
Interface KieSessionsPool
-
- All Known Subinterfaces:
KieContainerSessionsPool
public interface KieSessionsPool
A pool of session created from a KieContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KieSession
newKieSession()
Obtain aKieSession
from this pool using the default session configuration.KieSession
newKieSession(KieSessionConfiguration conf)
Obtain aKieSession
from this pool using using the given session configuration.StatelessKieSession
newStatelessKieSession()
Obtain aStatelessKieSession
from this pool using the default session configuration.StatelessKieSession
newStatelessKieSession(KieSessionConfiguration conf)
Obtain aStatelessKieSession
from this pool using using the given session configuration.void
shutdown()
Shutdown this pool and clean up all the resources
-
-
-
Method Detail
-
newKieSession
KieSession newKieSession()
Obtain aKieSession
from 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 aKieSession
from 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 aStatelessKieSession
from this pool using the default session configuration. You do not need to call @{link #dispose()} on this. Note that, what is pooled here is notStatelessKieSession
but theKieSession
that it internally wraps, so calling multiple timesCommandExecutor.execute(Command)
()} (or one of its overload) will make thisStatelessKieSession
to get aKieSession
from the pool instead of creating a new one.- Returns:
- created
StatelessKieSession
-
newStatelessKieSession
StatelessKieSession newStatelessKieSession(KieSessionConfiguration conf)
Obtain aStatelessKieSession
from 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 notStatelessKieSession
but theKieSession
that it internally wraps, so calling multiple timesCommandExecutor.execute(Command)
()} (or one of its overload) will make thisStatelessKieSession
to get aKieSession
from the pool instead of creating a new one.- Returns:
- created
StatelessKieSession
-
shutdown
void shutdown()
Shutdown this pool and clean up all the resources
-
-