Search in sources :

Example 1 with DataStreamException

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

the class DataStreamManagement method replyDataStreamException.

void replyDataStreamException(Throwable cause, DataStreamRequestByteBuf request, ChannelHandlerContext ctx) {
    final RaftClientReply reply = RaftClientReply.newBuilder().setClientId(ClientId.emptyClientId()).setServerId(server.getId()).setGroupId(RaftGroupId.emptyGroupId()).setException(new DataStreamException(server.getId(), cause)).build();
    sendDataStreamException(cause, request, reply, ctx);
}
Also used : DataStreamException(org.apache.ratis.protocol.exceptions.DataStreamException) RaftClientReply(org.apache.ratis.protocol.RaftClientReply)

Example 2 with DataStreamException

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

the class DataStreamManagement method replyDataStreamException.

static void replyDataStreamException(RaftServer server, Throwable cause, RaftClientRequest raftClientRequest, DataStreamRequestByteBuf request, ChannelHandlerContext ctx) {
    final RaftClientReply reply = RaftClientReply.newBuilder().setRequest(raftClientRequest).setException(new DataStreamException(server.getId(), cause)).build();
    sendDataStreamException(cause, request, reply, ctx);
}
Also used : DataStreamException(org.apache.ratis.protocol.exceptions.DataStreamException) RaftClientReply(org.apache.ratis.protocol.RaftClientReply)

Aggregations

RaftClientReply (org.apache.ratis.protocol.RaftClientReply)2 DataStreamException (org.apache.ratis.protocol.exceptions.DataStreamException)2