@Override public long getClusterTime() { return clusterClock.getClusterTime(); }
@Override public long getClusterTime() { return clusterClock.getClusterTime(); }
/** Reset all heartbeats to the current cluster time. Called when system clock jump is detected. */ private void resetHeartbeats() { QuorumServiceImpl quorumService = nodeEngine.getQuorumService(); long now = clusterClock.getClusterTime(); for (MemberImpl member : clusterService.getMemberImpls()) { heartbeatFailureDetector.heartbeat(member, now); quorumService.onHeartbeat(member, now); } }
/** Reset all heartbeats to the current cluster time. Called when system clock jump is detected. */ private void resetHeartbeats() { QuorumServiceImpl quorumService = nodeEngine.getQuorumService(); long now = clusterClock.getClusterTime(); for (MemberImpl member : clusterService.getMemberImpls()) { heartbeatFailureDetector.heartbeat(member, now); quorumService.onHeartbeat(member, now); } }
/** Send a {@link HeartbeatOp} to the {@code target} * @param target target Member */ private void sendHeartbeat(Member target) { if (target == null) { return; } try { MembersViewMetadata membersViewMetadata = clusterService.getMembershipManager().createLocalMembersViewMetadata(); Operation op = new HeartbeatOp(membersViewMetadata, target.getUuid(), clusterClock.getClusterTime()); op.setCallerUuid(clusterService.getThisUuid()); node.nodeEngine.getOperationService().send(op, target.getAddress()); } catch (Exception e) { if (logger.isFineEnabled()) { logger.fine(format("Error while sending heartbeat -> %s[%s]", e.getClass().getName(), e.getMessage())); } } }
/** Send a {@link HeartbeatOp} to the {@code target} * @param target target Member */ private void sendHeartbeat(Member target) { if (target == null) { return; } try { MembersViewMetadata membersViewMetadata = clusterService.getMembershipManager().createLocalMembersViewMetadata(); Operation op = new HeartbeatOp(membersViewMetadata, target.getUuid(), clusterClock.getClusterTime()); op.setCallerUuid(clusterService.getThisUuid()); node.nodeEngine.getOperationService().send(op, target.getAddress()); } catch (Exception e) { if (logger.isFineEnabled()) { logger.fine(format("Error while sending heartbeat -> %s[%s]", e.getClass().getName(), e.getMessage())); } } }
/** * Send heartbeats and calculate clock drift. This method is expected to be called periodically because it calculates * the clock drift based on the expected and actual invocation period. */ void heartbeat() { if (!clusterService.isJoined()) { return; } checkClockDrift(heartbeatIntervalMillis); final long clusterTime = clusterClock.getClusterTime(); if (clusterService.isMaster()) { heartbeatWhenMaster(clusterTime); } else { heartbeatWhenSlave(clusterTime); } }
/** * Send heartbeats and calculate clock drift. This method is expected to be called periodically because it calculates * the clock drift based on the expected and actual invocation period. */ void heartbeat() { if (!clusterService.isJoined()) { return; } checkClockDrift(heartbeatIntervalMillis); final long clusterTime = clusterClock.getClusterTime(); if (clusterService.isMaster()) { heartbeatWhenMaster(clusterTime); } else { heartbeatWhenSlave(clusterTime); } }
return; long clusterTime = clusterClock.getClusterTime(); if (logger.isFineEnabled()) { logger.fine(format("Received heartbeat from %s (now: %s, timestamp: %s)", clusterClock.setMasterTime(timestamp); heartbeatFailureDetector.heartbeat(member, clusterClock.getClusterTime());
return; long clusterTime = clusterClock.getClusterTime(); if (logger.isFineEnabled()) { logger.fine(format("Received heartbeat from %s (now: %s, timestamp: %s)", clusterClock.setMasterTime(timestamp); heartbeatFailureDetector.heartbeat(member, clusterClock.getClusterTime());
long time = clusterClock.getClusterTime();
long time = clusterClock.getClusterTime();
clusterClock.getClusterTime(), clusterService.getClusterId(), clusterClock.getClusterStartTime(), clusterStateManager.getState(), clusterService.getClusterVersion(), partitionRuntimeState);
clusterClock.getClusterTime(), clusterService.getClusterId(), clusterClock.getClusterStartTime(), clusterStateManager.getState(), clusterService.getClusterVersion(), partitionRuntimeState);