@Test public void testIsCandidateRegistered() throws CandidateAlreadyRegisteredException { DistributedEntityOwnershipService service = DistributedEntityOwnershipService.start(dataStore.getActorUtils(), EntityOwnerSelectionStrategyConfig.newBuilder().build()); final DOMEntity test = new DOMEntity("test-type", "test"); assertFalse(service.isCandidateRegistered(test)); service.registerCandidate(test); assertTrue(service.isCandidateRegistered(test)); service.close(); }
@Override public boolean isCandidateRegistered(final DOMEntity entity) { return registeredEntities.get(entity) != null; }
DistributedEntityOwnershipService implements DOMEntityOwnershipService, AutoCloseable { @Override public boolean isCandidateRegistered(final DOMEntity entity) { return registeredEntities.get(entity) != null; } }
DistributedEntityOwnershipService implements DOMEntityOwnershipService, AutoCloseable { @Override public boolean isCandidateRegistered(final DOMEntity entity) { return registeredEntities.get(entity) != null; } DistributedEntityOwnershipService(final ActorUtils context); }
DistributedEntityOwnershipService implements DOMEntityOwnershipService, AutoCloseable { @Override public boolean isCandidateRegistered(final DOMEntity entity) { return registeredEntities.get(entity) != null; } DistributedEntityOwnershipService(final ActorUtils context); static DistributedEntityOwnershipService start(final ActorUtils context,
            final EntityOwnerSelectionStrategyConfig strategyConfig); @Override DOMEntityOwnershipCandidateRegistration registerCandidate(final DOMEntity entity); @Override DOMEntityOwnershipListenerRegistration registerListener(final String entityType,
            final DOMEntityOwnershipListener listener); @Override Optional<EntityOwnershipState> getOwnershipState(final DOMEntity forEntity); @Override boolean isCandidateRegistered(final DOMEntity entity); @Override void close(); }
DistributedEntityOwnershipService implements DOMEntityOwnershipService, AutoCloseable { @Override public boolean isCandidateRegistered(final DOMEntity entity) { return registeredEntities.get(entity) != null; } DistributedEntityOwnershipService(final ActorUtils context); static DistributedEntityOwnershipService start(final ActorUtils context,
            final EntityOwnerSelectionStrategyConfig strategyConfig); @Override DOMEntityOwnershipCandidateRegistration registerCandidate(final DOMEntity entity); @Override DOMEntityOwnershipListenerRegistration registerListener(final String entityType,
            final DOMEntityOwnershipListener listener); @Override Optional<EntityOwnershipState> getOwnershipState(final DOMEntity forEntity); @Override boolean isCandidateRegistered(final DOMEntity entity); @Override void close();  }