Class ClusterSingletonServiceRegistrationHelper
- java.lang.Object
-
- org.opendaylight.protocol.bgp.rib.spi.util.ClusterSingletonServiceRegistrationHelper
-
public final class ClusterSingletonServiceRegistrationHelper extends Object
Utility class which provides helper functionality for ClusterSingletonService.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration
registerSingletonService(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider singletonProvider, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService clusterSingletonService)
This helper function wrapsClusterSingletonServiceProvider.registerClusterSingletonService(ClusterSingletonService)
in order to execute repeated registration attempts while catching RuntimeException.static org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration
registerSingletonService(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider singletonProvider, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService clusterSingletonService, int maxAttempts, int sleepTime)
This helper function wrapsClusterSingletonServiceProvider.registerClusterSingletonService(ClusterSingletonService)
in order to execute repeated registration attempts while catching RuntimeException.
-
-
-
Method Detail
-
registerSingletonService
public static org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration registerSingletonService(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider singletonProvider, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService clusterSingletonService, int maxAttempts, int sleepTime)
This helper function wrapsClusterSingletonServiceProvider.registerClusterSingletonService(ClusterSingletonService)
in order to execute repeated registration attempts while catching RuntimeException. If registration is not successful, RuntimeException is re-thrown.- Parameters:
singletonProvider
- Cluster Singleton Service ProviderclusterSingletonService
- Cluster Singleton ServicemaxAttempts
- Upper bound for registration retries count.sleepTime
- Sleep time between registration retries in milliseconds.- Returns:
- Registration
-
registerSingletonService
public static org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegistration registerSingletonService(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider singletonProvider, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService clusterSingletonService)
This helper function wrapsClusterSingletonServiceProvider.registerClusterSingletonService(ClusterSingletonService)
in order to execute repeated registration attempts while catching RuntimeException. If registration is not successful, RuntimeException is re-thrown. 10 registration attempts will be tried with 10 ms pause between each other.- Parameters:
singletonProvider
- Cluster Singleton Service ProviderclusterSingletonService
- Cluster Singleton Service- Returns:
- Registration
-
-