Ejemplo n.º 1
0
 public boolean checkAuthorization(String groupName, String groupPassword, Address target) {
   AbstractRemotelyCallable<Boolean> authorizationCall =
       new AuthorizationCall(groupName, groupPassword);
   AsyncRemotelyBooleanOp op =
       new NoneMemberAsyncRemotelyBooleanOp(authorizationCall, target, true);
   op.execute();
   return op.getResultAsBoolean();
 }
Ejemplo n.º 2
0
 void doCall(AbstractRemotelyCallable callable, List<Address> targets, boolean ignoreThis) {
   List<AsyncRemotelyBooleanOp> calls = new ArrayList<AsyncRemotelyBooleanOp>(targets.size());
   for (final Address target : targets) {
     boolean skip = ignoreThis && thisAddress.equals(target);
     if (!skip) {
       AsyncRemotelyBooleanOp op = new AsyncRemotelyBooleanOp(callable, target, false);
       op.execute();
       calls.add(op);
     }
   }
   for (AsyncRemotelyBooleanOp call : calls) {
     if (!call.getResultAsBoolean(5)) {
       targets.remove(call.getTarget());
     }
   }
 }
Ejemplo n.º 3
0
 public void finalizeJoin() {
   Set<Member> members = node.getClusterImpl().getMembers();
   List<AsyncRemotelyBooleanOp> calls = new ArrayList<AsyncRemotelyBooleanOp>();
   for (Member m : members) {
     MemberImpl member = (MemberImpl) m;
     if (!member.localMember()) {
       AsyncRemotelyBooleanOp op =
           new AsyncRemotelyBooleanOp(new FinalizeJoin(), member.getAddress(), false);
       op.execute();
       calls.add(op);
     }
   }
   for (AsyncRemotelyBooleanOp call : calls) {
     call.getResultAsBoolean();
   }
 }