Class OSGiClusterSingletonServiceProvider
java.lang.Object
org.opendaylight.mdsal.singleton.dom.impl.OSGiClusterSingletonServiceProvider
- All Implemented Interfaces:
AutoCloseable
,ClusterSingletonServiceProvider
@Beta
public final class OSGiClusterSingletonServiceProvider
extends Object
implements ClusterSingletonServiceProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Method registersClusterSingletonService
to Provider.
-
Constructor Details
-
OSGiClusterSingletonServiceProvider
public OSGiClusterSingletonServiceProvider()
-
-
Method Details
-
registerClusterSingletonService
public ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service) Description copied from interface:ClusterSingletonServiceProvider
Method registersClusterSingletonService
to Provider. Method returnsRuntimeException
for unexpected state, so be careful with implementation. Note: RuntimeException is implemented as a notification about some problems with registration and client has to implement some strategy for handling this issue. TODO: RuntimeException is not a transparent contract for handling unexpected state and it needs to be replaced with a specific documented Exception or it needs to add another contract definition for a client notification about the unexpected state reason inClusterSingletonService
. RuntimeException implementation is a hotfix for an unwanted API contract changes in boron release only.- Specified by:
registerClusterSingletonService
in interfaceClusterSingletonServiceProvider
- Parameters:
service
- ClusterSingletonService instance- Returns:
AutoCloseable
registration
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-