Search in sources :

Example 1 with AssignmentMessage

use of org.apache.ratis.examples.arithmetic.AssignmentMessage in project incubator-ratis by apache.

the class Assign method operation.

@Override
protected void operation(RaftClient client) throws IOException {
    RaftClientReply send = client.io().send(new AssignmentMessage(new Variable(name), createExpression(value)));
    System.out.println("Success: " + send.isSuccess());
    System.out.println("Response: " + send.getMessage().getClass());
}
Also used : AssignmentMessage(org.apache.ratis.examples.arithmetic.AssignmentMessage) Variable(org.apache.ratis.examples.arithmetic.expression.Variable) RaftClientReply(org.apache.ratis.protocol.RaftClientReply)

Aggregations

AssignmentMessage (org.apache.ratis.examples.arithmetic.AssignmentMessage)1 Variable (org.apache.ratis.examples.arithmetic.expression.Variable)1 RaftClientReply (org.apache.ratis.protocol.RaftClientReply)1