public final class ClusterSingletonServiceRegistrationHelper extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_REGISTRATION_ATTEMPTS |
static int |
SLEEP_TIME |
Modifier and Type | Method and 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) |
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 wraps
ClusterSingletonServiceProvider.registerClusterSingletonService(ClusterSingletonService) in order to
execute repeated registration attempts while catching RuntimeException. |
public static final int MAX_REGISTRATION_ATTEMPTS
public static final int SLEEP_TIME
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)
ClusterSingletonServiceProvider.registerClusterSingletonService(ClusterSingletonService)
in order to
execute repeated registration attempts while catching RuntimeException. If registration is not successful,
RuntimeException is re-thrown.singletonProvider
- clusterSingletonService
- maxAttempts
- Upper bound for registration retries count.sleepTime
- Sleep time between registration retries in milliseconds.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)
Copyright © 2018 OpenDaylight. All rights reserved.