Package com.tangosol.net
Interface SessionProvider.Context
- All Known Implementing Classes:
SessionProvider.DefaultContext
- Enclosing interface:
SessionProvider
public static interface SessionProvider.Context
A context used by providers.
-
Method Summary
Modifier and TypeMethodDescriptioncomplete()Complete this context without a session.Complete this context.default SessionProvider.ContextcreateSession(SessionConfiguration configuration) Returns theSessionProvider.Contextfrom calling the defaultdefaultProvider()SessionProvider.createSession(SessionConfiguration, Coherence.Mode, Iterable)method to create a session.Returns the default session provider that may be used to delegate to for session creation.Iterable<? extends EventInterceptor<?>> Returns zero or moreEventInterceptorinstances to add to the session.getMode()Returns the mode thatCoherenceis running in.default StringReturn any prefix to prepend to the scope name of the session.Return theSessioncreated by the provider, ornullif no session could be created.booleanReturntrueif the context contains a non-nullSessioninstance.booleanReturntrueif this context has been completed.
-
Method Details
-
getMode
Coherence.Mode getMode()Returns the mode thatCoherenceis running in.- Returns:
- the mode that
Coherenceis running in
-
complete
Complete this context.- Parameters:
session- theSessioncreated by the provider.- Returns:
- a completed
SessionProvider.Contextcontaining theSession
-
complete
SessionProvider.Context complete()Complete this context without a session.This will cause the root provider to return a
nullsession without trying any further providers in its chain.- Returns:
- a completed empty
SessionProvider.Context
-
isComplete
boolean isComplete()Returntrueif this context has been completed.- Returns:
trueif this context has been completed
-
hasSession
boolean hasSession()Returntrueif the context contains a non-nullSessioninstance.- Returns:
trueif the context contains a non-nullSessioninstance
-
getSession
Session getSession()Return theSessioncreated by the provider, ornullif no session could be created.- Returns:
- the
Sessioncreated by the provider ornullif no session could be created
-
defaultProvider
SessionProvider defaultProvider()Returns the default session provider that may be used to delegate to for session creation.- Returns:
- the default session provider
-
getInterceptors
Iterable<? extends EventInterceptor<?>> getInterceptors()Returns zero or moreEventInterceptorinstances to add to the session.- Returns:
- zero or more
EventInterceptorinstances to add to the session
-
createSession
Returns theSessionProvider.Contextfrom calling the defaultdefaultProvider()SessionProvider.createSession(SessionConfiguration, Coherence.Mode, Iterable)method to create a session.- Parameters:
configuration- the session configuration to use- Returns:
- the
SessionProvider.Contextreturned by the default provider
-
getScopePrefix
Return any prefix to prepend to the scope name of the session.- Returns:
- any prefix to prepend to the scope name of the session
-