@Override public int hashCode() { int result = appName != null ? appName.hashCode() : 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (lastDirtyTimestamp != null ? lastDirtyTimestamp.hashCode() : 0); result = 31 * result + (overriddenStatus != null ? overriddenStatus.hashCode() : 0); result = 31 * result + (status != null ? status.hashCode() : 0); result = 31 * result + (instanceInfo != null ? instanceInfo.hashCode() : 0); result = 31 * result + (action != null ? action.hashCode() : 0); return result; }
logger.error("Cannot replicate information to {} for action {}", node.getServiceUrl(), action.name(), t);
/** * Replicates all eureka actions to peer eureka nodes except for replication * traffic to this node. * */ private void replicateToPeers(Action action, String appName, String id, InstanceInfo info /* optional */, InstanceStatus newStatus /* optional */, boolean isReplication) { Stopwatch tracer = action.getTimer().start(); try { if (isReplication) { numberOfReplicationsLastMin.increment(); } // If it is a replication already, do not replicate again as this will create a poison replication if (peerEurekaNodes == Collections.EMPTY_LIST || isReplication) { return; } for (final PeerEurekaNode node : peerEurekaNodes.getPeerEurekaNodes()) { // If the url represents this host, do not replicate to yourself. if (peerEurekaNodes.isThisMyUrl(node.getServiceUrl())) { continue; } replicateInstanceActionsToPeers(action, appName, id, info, newStatus, node); } } finally { tracer.stop(); } }
@Override public int hashCode() { int result = appName != null ? appName.hashCode() : 0; result = 31 * result + (id != null ? id.hashCode() : 0); result = 31 * result + (lastDirtyTimestamp != null ? lastDirtyTimestamp.hashCode() : 0); result = 31 * result + (overriddenStatus != null ? overriddenStatus.hashCode() : 0); result = 31 * result + (status != null ? status.hashCode() : 0); result = 31 * result + (instanceInfo != null ? instanceInfo.hashCode() : 0); result = 31 * result + (action != null ? action.hashCode() : 0); return result; }
logger.error("Cannot replicate information to {} for action {}", node.getServiceUrl(), action.name(), t);
/** * Replicates all eureka actions to peer eureka nodes except for replication * traffic to this node. * */ private void replicateToPeers(Action action, String appName, String id, InstanceInfo info /* optional */, InstanceStatus newStatus /* optional */, boolean isReplication) { Stopwatch tracer = action.getTimer().start(); try { if (isReplication) { numberOfReplicationsLastMin.increment(); } // If it is a replication already, do not replicate again as this will create a poison replication if (peerEurekaNodes == Collections.EMPTY_LIST || isReplication) { return; } for (final PeerEurekaNode node : peerEurekaNodes.getPeerEurekaNodes()) { // If the url represents this host, do not replicate to yourself. if (peerEurekaNodes.isThisMyUrl(node.getServiceUrl())) { continue; } replicateInstanceActionsToPeers(action, appName, id, info, newStatus, node); } } finally { tracer.stop(); } }