Search in sources :

Example 1 with GroupListRequest

use of org.apache.ratis.protocol.GroupListRequest in project incubator-ratis by apache.

the class GroupManagementImpl method list.

@Override
public GroupListReply list() throws IOException {
    final long callId = CallId.getAndIncrement();
    final RaftClientReply reply = client.io().sendRequestWithRetry(() -> new GroupListRequest(client.getId(), server, client.getGroupId(), callId));
    Preconditions.assertTrue(reply instanceof GroupListReply, () -> "Unexpected reply: " + reply);
    return (GroupListReply) reply;
}
Also used : GroupListRequest(org.apache.ratis.protocol.GroupListRequest) RaftClientReply(org.apache.ratis.protocol.RaftClientReply) GroupListReply(org.apache.ratis.protocol.GroupListReply)

Example 2 with GroupListRequest

use of org.apache.ratis.protocol.GroupListRequest in project incubator-ratis by apache.

the class GrpcAdminProtocolService method groupList.

@Override
public void groupList(GroupListRequestProto proto, StreamObserver<GroupListReplyProto> responseObserver) {
    final GroupListRequest request = ClientProtoUtils.toGroupListRequest(proto);
    GrpcUtil.asyncCall(responseObserver, () -> protocol.getGroupListAsync(request), ClientProtoUtils::toGroupListReplyProto);
}
Also used : GroupListRequest(org.apache.ratis.protocol.GroupListRequest) ClientProtoUtils(org.apache.ratis.client.impl.ClientProtoUtils)

Aggregations

GroupListRequest (org.apache.ratis.protocol.GroupListRequest)2 ClientProtoUtils (org.apache.ratis.client.impl.ClientProtoUtils)1 GroupListReply (org.apache.ratis.protocol.GroupListReply)1 RaftClientReply (org.apache.ratis.protocol.RaftClientReply)1