Parameters:
         - clusterId
         - memberId
185328
def resumeMember(self, clusterId, memberId):
        
        self.send_resumeMember(clusterId, memberId)
        return self.recv_resumeMember()
1062590
int createUserIndexForClusters() {
		if (m_clusterIndices == null) {
			m_clusterIndices = new ArrayList<AttributeStreamOfInt32>(3);
		}

		AttributeStreamOfInt32 new_stream = new AttributeStreamOfInt32(
				m_clusterData.capacity(), -1);
		for (int i = 0, n = m_clusterIndices.size(); i < n; i++) {
			if (m_clusterIndices.get(i) == null) {
				m_clusterIndices.set(i, new_stream);
				return i;
			}
		}
		m_clusterIndices.add(new_stream);
		return m_clusterIndices.size() - 1;
	}
226099
public static clusterinstance_clusternode_binding[] get_filtered(nitro_service service, Long clid, String filter) throws Exception{
		clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding();
		obj.set_clid(clid);
		options option = new options();
		option.set_filter(filter);
		clusterinstance_clusternode_binding[] response = (clusterinstance_clusternode_binding[]) obj.getfiltered(service, option);
		return response;
	}
502586
public void addMembers(final List<String> memberIds, final AVIMConversationCallback callback) {
    if (null == memberIds || memberIds.size() < 1) {
      if (null != callback) {
        callback.done(new AVIMException(new IllegalArgumentException("memberIds is null")));
      }
      return;
    }
    Map<String, Object> params = new HashMap<String, Object>();
    params.put(Conversation.PARAM_CONVERSATION_MEMBER, memberIds);
    boolean ret = InternalConfiguration.getOperationTube().processMembers(this.client.getClientId(), this.conversationId,
            getType(), JSON.toJSONString(params), Conversation.AVIMOperation.CONVERSATION_ADD_MEMBER, callback);
    if (!ret && null != callback) {
      callback.internalDone(null,
              new AVException(AVException.OPERATION_FORBIDDEN, "couldn't start service in background."));
    }
  }
249344
public ListInstanceGroupsResponse listInstanceGroups(ListInstanceGroupsRequest request) {
        checkNotNull(request, "request should not be null.");
        checkStringNotEmpty(request.getClusterId(), "The parameter clusterId should not be null or empty string.");

        InternalRequest internalRequest = this.createRequest(
                request, HttpMethodName.GET, CLUSTER, request.getClusterId(), INSTANCE_GROUP);

        return this.invokeHttpClient(internalRequest, ListInstanceGroupsResponse.class);
    }
367631
private void handleClusterEvent(ClusterMembershipEvent event) {
    PrimaryTerm term = this.term;
    if (term != null
        && event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED
        && event.subject().id().equals(term.primary().memberId())) {
      changeState(PrimitiveState.SUSPENDED);
    }
  }
274370
private void bfs(int[] membership, int cluster, int id) {
        int n = merge.length + 1;
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(cluster);

        for (Integer i = queue.poll(); i != null; i = queue.poll()) {
            if (i < n) {
                membership[i] = id;
                continue;
            }

            i -= n;

            int m1 = merge[i][0];

            if (m1 >= n) {
                queue.offer(m1);
            } else {
                membership[m1] = id;
            }

            int m2 = merge[i][1];

            if (m2 >= n) {
                queue.offer(m2);
            } else {
                membership[m2] = id;
            }
        }
    }
493569
public static long count(nitro_service service, Long clid) throws Exception{
		clusterinstance_clusternode_binding obj = new clusterinstance_clusternode_binding();
		obj.set_clid(clid);
		options option = new options();
		option.set_count(true);
		clusterinstance_clusternode_binding response[] = (clusterinstance_clusternode_binding[]) obj.get_resources(service,option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
17089
@SuppressWarnings("WeakerAccess")
  public Cluster resizeCluster(String instanceId, String clusterId, int numServeNodes) {
    return ApiExceptions.callAndTranslateApiException(
        resizeClusterAsync(instanceId, clusterId, numServeNodes));
  }
722230
private void handleClusterEvent(ClusterMembershipEvent event) {
    raft.getThreadContext().execute(() -> {
      if (event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED) {
        log.debug("Node {} deactivated", event.subject().id());
        raft.getSessions().getSessions().stream()
            .filter(session -> session.memberId().equals(event.subject().id()))
            .forEach(this::expireSession);
      }
    });
  }
1100554
protected MemberId next() {
    // If a connection was already established then use that connection.
    if (currentNode != null) {
      return currentNode;
    }

    if (!selector.hasNext()) {
      if (selector.leader() != null) {
        selector.reset(null, selector.members());
        this.currentNode = selector.next();
        this.selectionId++;
        return currentNode;
      } else {
        log.debug("Failed to connect to the cluster");
        selector.reset();
        return null;
      }
    } else {
      this.currentNode = selector.next();
      this.selectionId++;
      return currentNode;
    }
  }
608749
public ListInstancesResponse listInstances(String clusterId, String instanceGroupId) {
        return listInstances(new ListInstancesRequest().withClusterId(clusterId).withInstanceGroupId(instanceGroupId));
    }
1266120
public void setDBClusterOptionGroupMemberships(java.util.Collection<DBClusterOptionGroupStatus> dBClusterOptionGroupMemberships) {
        if (dBClusterOptionGroupMemberships == null) {
            this.dBClusterOptionGroupMemberships = null;
            return;
        }

        this.dBClusterOptionGroupMemberships = new java.util.ArrayList<DBClusterOptionGroupStatus>(dBClusterOptionGroupMemberships);
    }
575955
static <T extends ScanCursor, K, V> RedisFuture<T> clusterScan(StatefulRedisClusterConnection<K, V> connection,
            ScanCursor cursor, BiFunction<RedisKeyAsyncCommands<K, V>, ScanCursor, RedisFuture<T>> scanFunction,
            ScanCursorMapper<RedisFuture<T>> mapper) {

        List<String> nodeIds = ClusterScanSupport.getNodeIds(connection, cursor);
        String currentNodeId = ClusterScanSupport.getCurrentNodeId(cursor, nodeIds);
        ScanCursor continuationCursor = ClusterScanSupport.getContinuationCursor(cursor);

        RedisFuture<T> scanCursor = scanFunction.apply(connection.getConnection(currentNodeId).async(), continuationCursor);
        return mapper.map(nodeIds, currentNodeId, scanCursor);
    }
1356013
void updateMembers(MembersView membersView) {
        MemberMap currentMemberMap = memberMapRef.get();

        Collection<MemberImpl> addedMembers = new LinkedList<>();
        Collection<MemberImpl> removedMembers = new LinkedList<>();
        ClusterHeartbeatManager clusterHeartbeatManager = clusterService.getClusterHeartbeatManager();

        MemberImpl[] members = new MemberImpl[membersView.size()];
        int memberIndex = 0;
        for (MemberInfo memberInfo : membersView.getMembers()) {
            Address address = memberInfo.getAddress();
            MemberImpl member = currentMemberMap.getMember(address);

            if (member != null && member.getUuid().equals(memberInfo.getUuid())) {
                member = createNewMemberImplIfChanged(memberInfo, member);
                members[memberIndex++] = member;
                continue;
            }

            if (member != null) {
                assert !(member.localMember() && member.equals(clusterService.getLocalMember()))
                        : "Local " + member + " cannot be replaced with " + memberInfo;

                // UUID changed: means member has gone and come back with a new uuid
                removedMembers.add(member);
            }

            member = createMember(memberInfo, memberInfo.getAttributes());
            addedMembers.add(member);

            long now = clusterService.getClusterTime();
            clusterHeartbeatManager.onHeartbeat(member, now);

            repairPartitionTableIfReturningMember(member);
            members[memberIndex++] = member;
        }

        MemberMap newMemberMap = membersView.toMemberMap();
        for (MemberImpl member : currentMemberMap.getMembers()) {
            if (!newMemberMap.contains(member.getAddress())) {
                removedMembers.add(member);
            }
        }

        setMembers(MemberMap.createNew(membersView.getVersion(), members));

        for (MemberImpl member : removedMembers) {
            closeConnection(member.getAddress(), "Member left event received from master");
            handleMemberRemove(memberMapRef.get(), member);
        }

        clusterService.getClusterJoinManager().insertIntoRecentlyJoinedMemberSet(addedMembers);
        sendMembershipEvents(currentMemberMap.getMembers(), addedMembers);

        removeFromMissingMembers(members);

        clusterHeartbeatManager.heartbeat();
        clusterService.printMemberList();

        //async call
        node.getNodeExtension().scheduleClusterVersionAutoUpgrade();
    }
1100275
public static clusterinstance_binding get(nitro_service service, Long clid) throws Exception{
		clusterinstance_binding obj = new clusterinstance_binding();
		obj.set_clid(clid);
		clusterinstance_binding response = (clusterinstance_binding) obj.get_resource(service);
		return response;
	}
18307
def shutdownMember(self, clusterId, memberId):
        
        self.send_shutdownMember(clusterId, memberId)
        return self.recv_shutdownMember()