Interface SessionInitializer
-
- All Superinterfaces:
Comparable<SessionConfiguration>
,SessionConfiguration
public interface SessionInitializer extends SessionConfiguration
An interface that should be implemented by custom Coherence scoped session configurations in order to enable their discovery and automatic initialization at startup.Each class implementing this interface must be annotated with
@Named
annotation representing the name of the scope being initialized, and can optionally be annotated with@ConfigUri
annotation if a non-default configuration resource should be used.If annotated with the
@Scope
annotation the scope value will be used for the session scope, otherwise the session name will also be used as the scope.- Since:
- 20.06
- Author:
- Aleks Seovic 2020.06.15
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.net.SessionConfiguration
SessionConfiguration.Builder, SessionConfiguration.ConfigurableCacheFactorySessionConfig
-
-
Field Summary
-
Fields inherited from interface com.tangosol.net.SessionConfiguration
DEFAULT_PRIORITY
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Optional<String>
getConfigUri()
Return the optional configuration file URI for a session that wraps aConfigurableCacheFactory
.default String
getName()
Return the name of theSession
.default int
getPriority()
Returns the priority for this configuration.default String
getScopeName()
Return the scope name of theSession
.-
Methods inherited from interface com.tangosol.net.SessionConfiguration
compareTo, getClassLoader, getInterceptors, getMode, getParameterResolver, isEnabled, sessionProvider
-
-
-
-
Method Detail
-
getName
default String getName()
Description copied from interface:SessionConfiguration
Return the name of theSession
.If not specifically set the
Coherence.DEFAULT_NAME
will be used.A session name must be unique.
- Specified by:
getName
in interfaceSessionConfiguration
- Returns:
- the name of the
Session
-
getScopeName
default String getScopeName()
Description copied from interface:SessionConfiguration
Return the scope name of theSession
.If not specifically set, the name will default to the
SessionConfiguration.getName()
value. If theSessionConfiguration.getName()
isCoherence.DEFAULT_NAME
no scope will be used.- Specified by:
getScopeName
in interfaceSessionConfiguration
- Returns:
- the scope name of the
Session
-
getPriority
default int getPriority()
Description copied from interface:SessionConfiguration
Returns the priority for this configuration.Sessions will be created in priority order, the highest priority first.
The default priority is zero (see
SessionConfiguration.DEFAULT_PRIORITY
).- Specified by:
getPriority
in interfaceSessionConfiguration
- Returns:
- the priority for this configuration
-
getConfigUri
default Optional<String> getConfigUri()
Description copied from interface:SessionConfiguration
Return the optional configuration file URI for a session that wraps aConfigurableCacheFactory
.- Specified by:
getConfigUri
in interfaceSessionConfiguration
- Returns:
- the optional configuration file URI for a session that
wraps a
ConfigurableCacheFactory
-
-