Search in sources :

Example 1 with TransferLeadershipRequest

use of org.apache.ratis.protocol.TransferLeadershipRequest 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);
}
Also used : TransferLeadershipRequest(org.apache.ratis.protocol.TransferLeadershipRequest) ClientProtoUtils(org.apache.ratis.client.impl.ClientProtoUtils)

Aggregations

ClientProtoUtils (org.apache.ratis.client.impl.ClientProtoUtils)1 TransferLeadershipRequest (org.apache.ratis.protocol.TransferLeadershipRequest)1