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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SessionProvider.Context
complete()
Complete this context without a session.SessionProvider.Context
complete(Session 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.SessionProvider
defaultProvider()
Returns the default session provider that may be used to delegate to for session creation.Iterable<? extends EventInterceptor<?>>
getInterceptors()
Returns zero or moreEventInterceptor
instances to add to the session.Coherence.Mode
getMode()
Returns the mode thatCoherence
is running in.default String
getScopePrefix()
Return any prefix to prepend to the scope name of the session.Session
getSession()
Return theSession
created by the provider, ornull
if no session could be created.boolean
hasSession()
Returntrue
if the context contains a non-nullSession
instance.boolean
isComplete()
Returntrue
if this context has been completed.
-
-
-
Method Detail
-
getMode
Coherence.Mode getMode()
Returns the mode thatCoherence
is running in.- Returns:
- the mode that
Coherence
is running in
-
complete
SessionProvider.Context complete(Session session)
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
default SessionProvider.Context createSession(SessionConfiguration configuration)
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
default String 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
-
-