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
@Namedannotation representing the name of the scope being initialized, and can optionally be annotated with@ConfigUriannotation if a non-default configuration resource should be used.If annotated with the
@Scopeannotation 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 StringgetName()Return the name of theSession.default intgetPriority()Returns the priority for this configuration.default StringgetScopeName()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:SessionConfigurationReturn the name of theSession.If not specifically set the
Coherence.DEFAULT_NAMEwill be used.A session name must be unique.
- Specified by:
getNamein interfaceSessionConfiguration- Returns:
- the name of the
Session
-
getScopeName
default String getScopeName()
Description copied from interface:SessionConfigurationReturn the scope name of theSession.If not specifically set, the name will default to the
SessionConfiguration.getName()value. If theSessionConfiguration.getName()isCoherence.DEFAULT_NAMEno scope will be used.- Specified by:
getScopeNamein interfaceSessionConfiguration- Returns:
- the scope name of the
Session
-
getPriority
default int getPriority()
Description copied from interface:SessionConfigurationReturns 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:
getPriorityin interfaceSessionConfiguration- Returns:
- the priority for this configuration
-
getConfigUri
default Optional<String> getConfigUri()
Description copied from interface:SessionConfigurationReturn the optional configuration file URI for a session that wraps aConfigurableCacheFactory.- Specified by:
getConfigUriin interfaceSessionConfiguration- Returns:
- the optional configuration file URI for a session that
wraps a
ConfigurableCacheFactory
-
-