Package org.wildfly.clustering.singleton
Interface Singleton
- All Known Subinterfaces:
SingletonService,SingletonService<T>,SingletonServiceController<T>
public interface Singleton
Encapsulates an object that can be provided by multiple cluster members, but is only active on one member a time.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptiondefault NodeDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UsegetSingletonState()instead.Returns a snapshot of the state of this singleton.default booleanDeprecated, for removal: This API element is subject to removal in a future version.UsegetSingletonState()instead.
-
Method Details
-
isPrimary
Deprecated, for removal: This API element is subject to removal in a future version.UsegetSingletonState()instead.Indicates whether this node is the primary provider of the singleton.- Returns:
- true, if this node is the primary node, false if it is a backup node.
-
getPrimaryProvider
Deprecated, for removal: This API element is subject to removal in a future version.UsegetSingletonState()instead.Returns the current primary provider of the singleton.- Returns:
- a cluster member
-
getProviders
Deprecated, for removal: This API element is subject to removal in a future version.UsegetSingletonState()instead.Returns the providers on which the given singleton is available.- Returns:
- a set of cluster members
-
getSingletonState
SingletonState getSingletonState()Returns a snapshot of the state of this singleton.- Returns:
- a snapshot of the state of this singleton.
-
getSingletonState()instead.