Package net.kuujo.copycat.internal.cluster

Examples of net.kuujo.copycat.internal.cluster.RemoteNode


      }
    }

    // If the cluster has a leader then locate the leader and forward the operation.
    if (context.currentLeader() != null) {
      @SuppressWarnings("rawtypes")
      RemoteNode leader = context.clusterManager().remoteNode(context.currentLeader());
      if (leader != null) {
        logger().debug("{} - Forwarding {} to leader {}", context.clusterManager().localNode(), request, leader);
        leader.client().connect().whenComplete((r, e) -> {
          if (e != null) {
            future.completeExceptionally(e);
          } else {
            leader.client().submit(request).whenComplete((result, error) -> {
              if (error != null) {
                future.completeExceptionally(error);
              } else {
                future.complete(result);
              }
View Full Code Here

TOP

Related Classes of net.kuujo.copycat.internal.cluster.RemoteNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.