X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=singleton-service%2Fmdsal-singleton-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fsingleton%2Fcommon%2Fapi%2FClusterSingletonServiceProvider.java;h=531483d043880da2bdd44a731dbd7fd6b0974403;hb=62a591d105563555955efeeddb4f16af38529d57;hp=f1696c984a816ecec73878661a5600322bfbd772;hpb=52aeeb78230bf7cf219a4dd0e26c195e98246796;p=mdsal.git diff --git a/singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonServiceProvider.java b/singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonServiceProvider.java index f1696c984a..531483d043 100644 --- a/singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonServiceProvider.java +++ b/singleton-service/mdsal-singleton-common-api/src/main/java/org/opendaylight/mdsal/singleton/common/api/ClusterSingletonServiceProvider.java @@ -23,6 +23,13 @@ public interface ClusterSingletonServiceProvider extends AutoCloseable { /** * Method registers {@link ClusterSingletonService} to Provider. + * Method returns {@link java.lang.RuntimeException} 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 in {@link ClusterSingletonService}. + * RuntimeException implementation is a hotfix for an unwanted API contract changes in boron release only. * * @param service ClusterSingletonService instance * @return {@link AutoCloseable} registration