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.Context
createSession
(SessionConfiguration configuration) Returns theSessionProvider.Context
from 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 moreEventInterceptor
instances to add to the session.getMode()
Returns the mode thatCoherence
is running in.default String
Return any prefix to prepend to the scope name of the session.Return theSession
created by the provider, ornull
if no session could be created.boolean
Returntrue
if the context contains a non-nullSession
instance.boolean
Returntrue
if this context has been completed.
-
Method Details
-
getMode
Coherence.Mode getMode()Returns the mode thatCoherence
is running in.- Returns:
- the mode that
Coherence
is running in
-
complete
Complete this context.- Parameters:
session
- theSession
created by the provider.- Returns:
- a completed
SessionProvider.Context
containing theSession
-
complete
SessionProvider.Context complete()Complete this context without a session.This will cause the root provider to return a
null
session without trying any further providers in its chain.- Returns:
- a completed empty
SessionProvider.Context
-
isComplete
boolean isComplete()Returntrue
if this context has been completed.- Returns:
true
if this context has been completed
-
hasSession
boolean hasSession()Returntrue
if the context contains a non-nullSession
instance.- Returns:
true
if the context contains a non-nullSession
instance
-
getSession
Session getSession()Return theSession
created by the provider, ornull
if no session could be created.- Returns:
- the
Session
created by the provider ornull
if 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 moreEventInterceptor
instances to add to the session.- Returns:
- zero or more
EventInterceptor
instances to add to the session
-
createSession
Returns theSessionProvider.Context
from calling the defaultdefaultProvider()
SessionProvider.createSession(SessionConfiguration, Coherence.Mode, Iterable)
method to create a session.- Parameters:
configuration
- the session configuration to use- Returns:
- the
SessionProvider.Context
returned 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
-