@Test public void testPreRegistrationLocalMemberIgnoredWhenNotPresent() { testSubject.resetLocalMembership(null); }
@EventListener @SuppressWarnings("UnusedParameters") public void resetLocalMembership(InstanceRegisteredEvent event) { registered = true; Optional<Member> startUpPhaseLocalMember = atomicConsistentHash.get().getMembers().stream() .filter(Member::local) .findFirst(); updateMemberships(); startUpPhaseLocalMember.ifPresent(m -> { if (logger.isDebugEnabled()) { logger.debug("Resetting local membership for [{}].", m); } atomicConsistentHash.updateAndGet(consistentHash -> consistentHash.without(m)); }); }
SpringCloudCommandRouter implements CommandRouter { @EventListener @SuppressWarnings("UnusedParameters") public void resetLocalMembership(InstanceRegisteredEvent event) { registered = true; Optional<Member> startUpPhaseLocalMember = atomicConsistentHash.get().getMembers().stream() .filter(Member::local) .findFirst(); updateMemberships(); startUpPhaseLocalMember.ifPresent(m -> { if (logger.isDebugEnabled()) { logger.debug("Resetting local membership for [{}].", m); } atomicConsistentHash.updateAndGet(consistentHash -> consistentHash.without(m)); }); } }
SpringCloudCommandRouter implements CommandRouter { @EventListener @SuppressWarnings("UnusedParameters") public void resetLocalMembership(InstanceRegisteredEvent event) { registered = true; Optional<Member> startUpPhaseLocalMember = atomicConsistentHash.get().getMembers().stream() .filter(Member::local) .findFirst(); updateMemberships(); startUpPhaseLocalMember.ifPresent(m -> { if (logger.isDebugEnabled()) { logger.debug("Resetting local membership for [{}].", m); } atomicConsistentHash.updateAndGet(consistentHash -> consistentHash.without(m)); }); } protected  SpringCloudCommandRouter(Builder builder); }
SpringCloudCommandRouter implements CommandRouter { @EventListener @SuppressWarnings("UnusedParameters") public void resetLocalMembership(InstanceRegisteredEvent event) { registered = true; Optional<Member> startUpPhaseLocalMember = atomicConsistentHash.get().getMembers().stream() .filter(Member::local) .findFirst(); updateMemberships(); startUpPhaseLocalMember.ifPresent(m -> { if (logger.isDebugEnabled()) { logger.debug("Resetting local membership for [{}].", m); } atomicConsistentHash.updateAndGet(consistentHash -> consistentHash.without(m)); }); } protected  SpringCloudCommandRouter(Builder builder); static Builder builder(); static boolean serviceInstanceMetadataContainsMessageRoutingInformation(ServiceInstance serviceInstance); @Override Optional<Member> findDestination(CommandMessage<?> commandMessage); @Override void updateMembership(int loadFactor, CommandMessageFilter commandFilter); @EventListener @SuppressWarnings("UnusedParameters") void resetLocalMembership(InstanceRegisteredEvent event); @EventListener @SuppressWarnings("UnusedParameters") void updateMemberships(HeartbeatEvent event); }
SpringCloudCommandRouter implements CommandRouter { @EventListener @SuppressWarnings("UnusedParameters") public void resetLocalMembership(InstanceRegisteredEvent event) { registered = true; Optional<Member> startUpPhaseLocalMember = atomicConsistentHash.get().getMembers().stream() .filter(Member::local) .findFirst(); updateMemberships(); startUpPhaseLocalMember.ifPresent(m -> { if (logger.isDebugEnabled()) { logger.debug("Resetting local membership for [{}].", m); } atomicConsistentHash.updateAndGet(consistentHash -> consistentHash.without(m)); }); } protected  SpringCloudCommandRouter(Builder builder); static Builder builder(); static boolean serviceInstanceMetadataContainsMessageRoutingInformation(ServiceInstance serviceInstance); @Override Optional<Member> findDestination(CommandMessage<?> commandMessage); @Override void updateMembership(int loadFactor, CommandMessageFilter commandFilter); @EventListener @SuppressWarnings("UnusedParameters") void resetLocalMembership(InstanceRegisteredEvent event); @EventListener @SuppressWarnings("UnusedParameters") void updateMemberships(HeartbeatEvent event);  }