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();
        }
    }
private void replicateToPeers ( Action action , String appName , String id , InstanceInfo info , InstanceStatus newStatus , boolean isReplication ) { Stopwatch tracer = action . getTimer ( ) . start ( ) ; try { if ( isReplication ) { numberOfReplicationsLastMin . increment ( ) ; } if ( peerEurekaNodes == Collections . EMPTY_LIST || isReplication ) { return ; } for ( final PeerEurekaNode node : peerEurekaNodes . getPeerEurekaNodes ( ) ) { if ( peerEurekaNodes . isThisMyUrl ( node . getServiceUrl ( ) ) ) { continue ; } replicateInstanceActionsToPeers ( action , appName , id , info , newStatus , node ) ; } } finally { tracer . stop ( ) ; } }
Replicates all eureka actions to peer eureka nodes except for replication
traffic to this node.