@VisibleForTesting public void realMarkAlive(final InetAddress addr, final EndpointState localState) { if (logger.isTraceEnabled()) logger.trace("marking as alive {}", addr); localState.markAlive(); localState.updateTimestamp(); // prevents doStatusCheck from racing us and evicting if it was down > aVeryLongTime liveEndpoints.add(addr); unreachableEndpoints.remove(addr); expireTimeEndpointMap.remove(addr); logger.debug("removing expire time for endpoint : {}", addr); logger.info("InetAddress {} is now UP", addr); for (IEndpointStateChangeSubscriber subscriber : subscribers) subscriber.onAlive(addr, localState); if (logger.isTraceEnabled()) logger.trace("Notified {}", subscribers); }
@VisibleForTesting public void realMarkAlive(final InetAddress addr, final EndpointState localState) { if (logger.isTraceEnabled()) logger.trace("marking as alive {}", addr); localState.markAlive(); localState.updateTimestamp(); // prevents doStatusCheck from racing us and evicting if it was down > aVeryLongTime liveEndpoints.add(addr); unreachableEndpoints.remove(addr); expireTimeEndpointMap.remove(addr); logger.debug("removing expire time for endpoint : {}", addr); logger.info("InetAddress {} is now UP", addr); for (IEndpointStateChangeSubscriber subscriber : subscribers) subscriber.onAlive(addr, localState); if (logger.isTraceEnabled()) logger.trace("Notified {}", subscribers); }
@VisibleForTesting public void realMarkAlive(final InetAddress addr, final EndpointState localState) { if (logger.isTraceEnabled()) logger.trace("marking as alive {}", addr); localState.markAlive(); localState.updateTimestamp(); // prevents doStatusCheck from racing us and evicting if it was down > aVeryLongTime liveEndpoints.add(addr); unreachableEndpoints.remove(addr); expireTimeEndpointMap.remove(addr); logger.debug("removing expire time for endpoint : {}", addr); logger.info("InetAddress {} is now UP", addr); for (IEndpointStateChangeSubscriber subscriber : subscribers) subscriber.onAlive(addr, localState); if (logger.isTraceEnabled()) logger.trace("Notified {}", subscribers); }
@VisibleForTesting public void realMarkAlive(final InetAddress addr, final EndpointState localState) { if (logger.isTraceEnabled()) logger.trace("marking as alive {}", addr); localState.markAlive(); localState.updateTimestamp(); // prevents doStatusCheck from racing us and evicting if it was down > aVeryLongTime liveEndpoints.add(addr); unreachableEndpoints.remove(addr); expireTimeEndpointMap.remove(addr); logger.debug("removing expire time for endpoint : " + addr); logger.info("InetAddress {} is now UP", addr); for (IEndpointStateChangeSubscriber subscriber : subscribers) subscriber.onAlive(addr, localState); if (logger.isTraceEnabled()) logger.trace("Notified " + subscribers); }
public void maybeInitializeLocalState(int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState localState = new EndpointState(hbState); localState.markAlive(); endpointStateMap.putIfAbsent(FBUtilities.getBroadcastAddress(), localState); }
public void maybeInitializeLocalState(int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState localState = new EndpointState(hbState); localState.markAlive(); endpointStateMap.putIfAbsent(FBUtilities.getBroadcastAddress(), localState); }
@VisibleForTesting public void initializeNodeUnsafe(InetAddress addr, UUID uuid, int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState newState = new EndpointState(hbState); newState.markAlive(); EndpointState oldState = endpointStateMap.putIfAbsent(addr, newState); EndpointState localState = oldState == null ? newState : oldState; // always add the version state Map<ApplicationState, VersionedValue> states = new EnumMap<>(ApplicationState.class); states.put(ApplicationState.NET_VERSION, StorageService.instance.valueFactory.networkVersion()); states.put(ApplicationState.HOST_ID, StorageService.instance.valueFactory.hostId(uuid)); localState.addApplicationStates(states); }
public void maybeInitializeLocalState(int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState localState = new EndpointState(hbState); localState.markAlive(); endpointStateMap.putIfAbsent(FBUtilities.getBroadcastAddress(), localState); }
@VisibleForTesting public void initializeNodeUnsafe(InetAddress addr, UUID uuid, int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState newState = new EndpointState(hbState); newState.markAlive(); EndpointState oldState = endpointStateMap.putIfAbsent(addr, newState); EndpointState localState = oldState == null ? newState : oldState; // always add the version state Map<ApplicationState, VersionedValue> states = new EnumMap<>(ApplicationState.class); states.put(ApplicationState.NET_VERSION, StorageService.instance.valueFactory.networkVersion()); states.put(ApplicationState.HOST_ID, StorageService.instance.valueFactory.hostId(uuid)); localState.addApplicationStates(states); }
public void maybeInitializeLocalState(int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState localState = new EndpointState(hbState); localState.markAlive(); endpointStateMap.putIfAbsent(FBUtilities.getBroadcastAddress(), localState); }
@VisibleForTesting public void initializeNodeUnsafe(InetAddress addr, UUID uuid, int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState newState = new EndpointState(hbState); newState.markAlive(); EndpointState oldState = endpointStateMap.putIfAbsent(addr, newState); EndpointState localState = oldState == null ? newState : oldState; // always add the version state Map<ApplicationState, VersionedValue> states = new EnumMap<>(ApplicationState.class); states.put(ApplicationState.NET_VERSION, StorageService.instance.valueFactory.networkVersion()); states.put(ApplicationState.HOST_ID, StorageService.instance.valueFactory.hostId(uuid)); localState.addApplicationStates(states); }
@VisibleForTesting public void initializeNodeUnsafe(InetAddress addr, UUID uuid, int generationNbr) { HeartBeatState hbState = new HeartBeatState(generationNbr); EndpointState newState = new EndpointState(hbState); newState.markAlive(); EndpointState oldState = endpointStateMap.putIfAbsent(addr, newState); EndpointState localState = oldState == null ? newState : oldState; // always add the version state Map<ApplicationState, VersionedValue> states = new EnumMap<>(ApplicationState.class); states.put(ApplicationState.NET_VERSION, StorageService.instance.valueFactory.networkVersion()); states.put(ApplicationState.HOST_ID, StorageService.instance.valueFactory.hostId(uuid)); localState.addApplicationStates(states); }