}
@Override
+ @SuppressWarnings("checkstyle:IllegalCatch")
public void instantiateServiceInstance() {
LOG.debug("Instantiating flapping-singleton-service.");
try {
registration.close();
registration = null;
- } catch (final Exception e) {
+ } catch (Exception e) {
LOG.warn("There was a problem closing flapping singleton service.", e);
setInactive();
flapCount = -flapCount;
}
@Override
+ @SuppressWarnings("checkstyle:IllegalCatch")
public ListenableFuture<Void> closeServiceInstance() {
LOG.debug("Closing flapping-singleton-service, flapCount: {}", flapCount);
LOG.debug("Running re-registration");
try {
registration = singletonServiceProvider.registerClusterSingletonService(this);
- } catch (final Exception e) {
+ } catch (RuntimeException e) {
LOG.warn("There was a problem re-registering flapping singleton service.", e);
setInactive();
flapCount = -flapCount - 1;