public int getCurrentGenerationNumber(InetAddress endpoint) { return endpointStateMap.get(endpoint).getHeartBeatState().getGeneration(); }
public int getCurrentGenerationNumber(InetAddress endpoint) { return endpointStateMap.get(endpoint).getHeartBeatState().getGeneration(); }
public int getCurrentGenerationNumber(InetAddress endpoint) { return endpointStateMap.get(endpoint).getHeartBeatState().getGeneration(); }
public int getCurrentGenerationNumber(InetAddress endpoint) { return endpointStateMap.get(endpoint).getHeartBeatState().getGeneration(); }
private void applyNewStates(InetAddress addr, EndpointState localState, EndpointState remoteState) { // don't assert here, since if the node restarts the version will go back to zero int oldVersion = localState.getHeartBeatState().getHeartBeatVersion(); localState.setHeartBeatState(remoteState.getHeartBeatState()); if (logger.isTraceEnabled()) logger.trace("Updating heartbeat state version to {} from {} for {} ...", localState.getHeartBeatState().getHeartBeatVersion(), oldVersion, addr); Set<Entry<ApplicationState, VersionedValue>> remoteStates = remoteState.states(); assert remoteState.getHeartBeatState().getGeneration() == localState.getHeartBeatState().getGeneration(); localState.addApplicationStates(remoteStates); for (Entry<ApplicationState, VersionedValue> remoteEntry : remoteStates) doOnChangeNotifications(addr, remoteEntry.getKey(), remoteEntry.getValue()); }
private void applyNewStates(InetAddress addr, EndpointState localState, EndpointState remoteState) { // don't assert here, since if the node restarts the version will go back to zero int oldVersion = localState.getHeartBeatState().getHeartBeatVersion(); localState.setHeartBeatState(remoteState.getHeartBeatState()); if (logger.isTraceEnabled()) logger.trace("Updating heartbeat state version to {} from {} for {} ...", localState.getHeartBeatState().getHeartBeatVersion(), oldVersion, addr); Set<Entry<ApplicationState, VersionedValue>> remoteStates = remoteState.states(); assert remoteState.getHeartBeatState().getGeneration() == localState.getHeartBeatState().getGeneration(); localState.addApplicationStates(remoteStates); for (Entry<ApplicationState, VersionedValue> remoteEntry : remoteStates) doOnChangeNotifications(addr, remoteEntry.getKey(), remoteEntry.getValue()); }
private void applyNewStates(InetAddress addr, EndpointState localState, EndpointState remoteState) { // don't assert here, since if the node restarts the version will go back to zero int oldVersion = localState.getHeartBeatState().getHeartBeatVersion(); localState.setHeartBeatState(remoteState.getHeartBeatState()); if (logger.isTraceEnabled()) logger.trace("Updating heartbeat state version to " + localState.getHeartBeatState().getHeartBeatVersion() + " from " + oldVersion + " for " + addr + " ..."); Set<Entry<ApplicationState, VersionedValue>> remoteStates = remoteState.states(); assert remoteState.getHeartBeatState().getGeneration() == localState.getHeartBeatState().getGeneration(); localState.addApplicationStates(remoteStates); for (Entry<ApplicationState, VersionedValue> remoteEntry : remoteStates) doOnChangeNotifications(addr, remoteEntry.getKey(), remoteEntry.getValue()); }
private void applyNewStates(InetAddress addr, EndpointState localState, EndpointState remoteState) { // don't assert here, since if the node restarts the version will go back to zero int oldVersion = localState.getHeartBeatState().getHeartBeatVersion(); localState.setHeartBeatState(remoteState.getHeartBeatState()); if (logger.isTraceEnabled()) logger.trace("Updating heartbeat state version to {} from {} for {} ...", localState.getHeartBeatState().getHeartBeatVersion(), oldVersion, addr); Set<Entry<ApplicationState, VersionedValue>> remoteStates = remoteState.states(); assert remoteState.getHeartBeatState().getGeneration() == localState.getHeartBeatState().getGeneration(); localState.addApplicationStates(remoteStates); for (Entry<ApplicationState, VersionedValue> remoteEntry : remoteStates) doOnChangeNotifications(addr, remoteEntry.getKey(), remoteEntry.getValue()); }
/** * Return either: the greatest heartbeat or application state * * @param epState * @return */ int getMaxEndpointStateVersion(EndpointState epState) { int maxVersion = epState.getHeartBeatState().getHeartBeatVersion(); for (Map.Entry<ApplicationState, VersionedValue> state : epState.states()) maxVersion = Math.max(maxVersion, state.getValue().version); return maxVersion; }
/** * Return either: the greatest heartbeat or application state * * @param epState * @return */ int getMaxEndpointStateVersion(EndpointState epState) { int maxVersion = epState.getHeartBeatState().getHeartBeatVersion(); for (Map.Entry<ApplicationState, VersionedValue> state : epState.states()) maxVersion = Math.max(maxVersion, state.getValue().version); return maxVersion; }
/** * Return either: the greatest heartbeat or application state * * @param epState * @return */ int getMaxEndpointStateVersion(EndpointState epState) { int maxVersion = epState.getHeartBeatState().getHeartBeatVersion(); for (Map.Entry<ApplicationState, VersionedValue> state : epState.states()) maxVersion = Math.max(maxVersion, state.getValue().version); return maxVersion; }
public void forceNewerGeneration() { EndpointState epstate = endpointStateMap.get(FBUtilities.getBroadcastAddress()); epstate.getHeartBeatState().forceNewerGenerationUnsafe(); }
/** * Return either: the greatest heartbeat or application state * * @param epState * @return */ int getMaxEndpointStateVersion(EndpointState epState) { int maxVersion = epState.getHeartBeatState().getHeartBeatVersion(); for (Map.Entry<ApplicationState, VersionedValue> state : epState.states()) maxVersion = Math.max(maxVersion, state.getValue().version); return maxVersion; }
public void forceNewerGeneration() { EndpointState epstate = endpointStateMap.get(FBUtilities.getBroadcastAddress()); epstate.getHeartBeatState().forceNewerGenerationUnsafe(); }
public void forceNewerGeneration() { EndpointState epstate = endpointStateMap.get(FBUtilities.getBroadcastAddress()); epstate.getHeartBeatState().forceNewerGenerationUnsafe(); }
public void forceNewerGeneration() { EndpointState epstate = endpointStateMap.get(FBUtilities.getBroadcastAddress()); epstate.getHeartBeatState().forceNewerGenerationUnsafe(); }
/** * determine which endpoint started up earlier */ public int compareEndpointStartup(InetAddress addr1, InetAddress addr2) { EndpointState ep1 = getEndpointStateForEndpoint(addr1); EndpointState ep2 = getEndpointStateForEndpoint(addr2); assert ep1 != null && ep2 != null; return ep1.getHeartBeatState().getGeneration() - ep2.getHeartBeatState().getGeneration(); }
/** * determine which endpoint started up earlier */ public int compareEndpointStartup(InetAddress addr1, InetAddress addr2) { EndpointState ep1 = getEndpointStateForEndpoint(addr1); EndpointState ep2 = getEndpointStateForEndpoint(addr2); assert ep1 != null && ep2 != null; return ep1.getHeartBeatState().getGeneration() - ep2.getHeartBeatState().getGeneration(); }
/** * determine which endpoint started up earlier */ public int compareEndpointStartup(InetAddress addr1, InetAddress addr2) { EndpointState ep1 = getEndpointStateForEndpoint(addr1); EndpointState ep2 = getEndpointStateForEndpoint(addr2); assert ep1 != null && ep2 != null; return ep1.getHeartBeatState().getGeneration() - ep2.getHeartBeatState().getGeneration(); }
/** * determine which endpoint started up earlier */ public int compareEndpointStartup(InetAddress addr1, InetAddress addr2) { EndpointState ep1 = getEndpointStateForEndpoint(addr1); EndpointState ep2 = getEndpointStateForEndpoint(addr2); assert ep1 != null && ep2 != null; return ep1.getHeartBeatState().getGeneration() - ep2.getHeartBeatState().getGeneration(); }