@Test public void initializationClusterSingletonServiceGroupTest() throws CandidateAlreadyRegisteredException { singletonServiceGroup.initialize(); verify(mockEosService).registerCandidate(MAIN_ENTITY); }
@Override void initialize() throws CandidateAlreadyRegisteredException { verify(tryLock()); try { checkState(!initialized, "Singleton group %s was already initilized", identifier); LOG.debug("Initializing service group {} with services {}", identifier, members); synchronized (this) { serviceEntityState = EntityState.REGISTERED; serviceEntityReg = entityOwnershipService.registerCandidate(serviceEntity); initialized = true; } } finally { unlock(); } }
ClusterSingletonServiceGroupImpl extends ClusterSingletonServiceGroup<P, E, C> { @Override void initialize() throws CandidateAlreadyRegisteredException { verify(tryLock()); try { checkState(!initialized, "Singleton group %s was already initilized", identifier); LOG.debug("Initializing service group {} with services {}", identifier, members); synchronized (this) { serviceEntityState = EntityState.REGISTERED; serviceEntityReg = entityOwnershipService.registerCandidate(serviceEntity); initialized = true; } } finally { unlock(); } } }
ClusterSingletonServiceGroupImpl extends ClusterSingletonServiceGroup<P, E, C> { @Override void initialize() throws CandidateAlreadyRegisteredException { verify(tryLock()); try { checkState(!initialized, "Singleton group %s was already initilized", identifier); LOG.debug("Initializing service group {} with services {}", identifier, members); synchronized (this) { serviceEntityState = EntityState.REGISTERED; serviceEntityReg = entityOwnershipService.registerCandidate(serviceEntity); initialized = true; } } finally { unlock(); } } ClusterSingletonServiceGroupImpl(final String identifier, final S entityOwnershipService, final E mainEntity,
            final E closeEntity, final Collection<ClusterSingletonServiceRegistration> services); @VisibleForTesting  ClusterSingletonServiceGroupImpl(final String identifier, final E mainEntity,
            final E closeEntity, final S entityOwnershipService); }
ClusterSingletonServiceGroupImpl extends ClusterSingletonServiceGroup<P, E, C> { @Override void initialize() throws CandidateAlreadyRegisteredException { verify(tryLock()); try { checkState(!initialized, "Singleton group %s was already initilized", identifier); LOG.debug("Initializing service group {} with services {}", identifier, members); synchronized (this) { serviceEntityState = EntityState.REGISTERED; serviceEntityReg = entityOwnershipService.registerCandidate(serviceEntity); initialized = true; } } finally { unlock(); } } ClusterSingletonServiceGroupImpl(final String identifier, final S entityOwnershipService, final E mainEntity,
            final E closeEntity, final Collection<ClusterSingletonServiceRegistration> services); @VisibleForTesting  ClusterSingletonServiceGroupImpl(final String identifier, final E mainEntity,
            final E closeEntity, final S entityOwnershipService); @Override String getIdentifier(); @Override String toString(); }
ClusterSingletonServiceGroupImpl extends ClusterSingletonServiceGroup<P, E, C> { @Override void initialize() throws CandidateAlreadyRegisteredException { verify(tryLock()); try { checkState(!initialized, "Singleton group %s was already initilized", identifier); LOG.debug("Initializing service group {} with services {}", identifier, members); synchronized (this) { serviceEntityState = EntityState.REGISTERED; serviceEntityReg = entityOwnershipService.registerCandidate(serviceEntity); initialized = true; } } finally { unlock(); } } ClusterSingletonServiceGroupImpl(final String identifier, final S entityOwnershipService, final E mainEntity,
            final E closeEntity, final Collection<ClusterSingletonServiceRegistration> services); @VisibleForTesting  ClusterSingletonServiceGroupImpl(final String identifier, final E mainEntity,
            final E closeEntity, final S entityOwnershipService); @Override String getIdentifier(); @Override String toString();  }