use of org.apache.ratis.client.impl.ClientProtoUtils in project incubator-ratis by apache.
the class GrpcAdminProtocolService method groupManagement.
@Override
public void groupManagement(GroupManagementRequestProto proto, StreamObserver<RaftClientReplyProto> responseObserver) {
final GroupManagementRequest request = ClientProtoUtils.toGroupManagementRequest(proto);
GrpcUtil.asyncCall(responseObserver, () -> protocol.groupManagementAsync(request), ClientProtoUtils::toRaftClientReplyProto);
}
use of org.apache.ratis.client.impl.ClientProtoUtils in project incubator-ratis by apache.
the class GrpcAdminProtocolService method transferLeadership.
@Override
public void transferLeadership(TransferLeadershipRequestProto proto, StreamObserver<RaftClientReplyProto> responseObserver) {
final TransferLeadershipRequest request = ClientProtoUtils.toTransferLeadershipRequest(proto);
GrpcUtil.asyncCall(responseObserver, () -> protocol.transferLeadershipAsync(request), ClientProtoUtils::toRaftClientReplyProto);
}
use of org.apache.ratis.client.impl.ClientProtoUtils in project incubator-ratis by apache.
the class GrpcAdminProtocolService method groupInfo.
@Override
public void groupInfo(GroupInfoRequestProto proto, StreamObserver<GroupInfoReplyProto> responseObserver) {
final GroupInfoRequest request = ClientProtoUtils.toGroupInfoRequest(proto);
GrpcUtil.asyncCall(responseObserver, () -> protocol.getGroupInfoAsync(request), ClientProtoUtils::toGroupInfoReplyProto);
}
use of org.apache.ratis.client.impl.ClientProtoUtils in project incubator-ratis by apache.
the class GrpcAdminProtocolService method leaderElectionManagement.
@Override
public void leaderElectionManagement(LeaderElectionManagementRequestProto proto, StreamObserver<RaftClientReplyProto> responseObserver) {
final LeaderElectionManagementRequest request = ClientProtoUtils.toLeaderElectionManagementRequest(proto);
GrpcUtil.asyncCall(responseObserver, () -> protocol.leaderElectionManagementAsync(request), ClientProtoUtils::toRaftClientReplyProto);
}
use of org.apache.ratis.client.impl.ClientProtoUtils in project incubator-ratis by apache.
the class GrpcAdminProtocolService method setConfiguration.
@Override
public void setConfiguration(SetConfigurationRequestProto proto, StreamObserver<RaftClientReplyProto> responseObserver) {
final SetConfigurationRequest request = ClientProtoUtils.toSetConfigurationRequest(proto);
GrpcUtil.asyncCall(responseObserver, () -> protocol.setConfigurationAsync(request), ClientProtoUtils::toRaftClientReplyProto);
}
Aggregations