Search in sources :

Example 11 with ClientInvocationId

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

the class RetryCacheTestUtil method assertFailure.

public static void assertFailure(RetryCache cache, LogEntryProto logEntry, boolean isFailed) {
    if (logEntry.hasStateMachineLogEntry()) {
        final ClientInvocationId invocationId = ClientInvocationId.valueOf(logEntry.getStateMachineLogEntry());
        Assert.assertEquals(isFailed, get(cache, invocationId).isFailed());
    }
}
Also used : ClientInvocationId(org.apache.ratis.protocol.ClientInvocationId)

Aggregations

ClientInvocationId (org.apache.ratis.protocol.ClientInvocationId)11 CompletableFuture (java.util.concurrent.CompletableFuture)4 DataStreamReply (org.apache.ratis.protocol.DataStreamReply)3 List (java.util.List)2 Optional (java.util.Optional)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ConcurrentMap (java.util.concurrent.ConcurrentMap)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 RaftProperties (org.apache.ratis.conf.RaftProperties)2 RequestContext (org.apache.ratis.netty.metrics.NettyServerStreamRpcMetrics.RequestContext)2 RequestMetrics (org.apache.ratis.netty.metrics.NettyServerStreamRpcMetrics.RequestMetrics)2 MessageStreamRequestTypeProto (org.apache.ratis.proto.RaftProtos.MessageStreamRequestTypeProto)2 ClientId (org.apache.ratis.protocol.ClientId)2 RaftClientReply (org.apache.ratis.protocol.RaftClientReply)2 RaftPeer (org.apache.ratis.protocol.RaftPeer)2 Test (org.junit.Test)2 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 IOException (java.io.IOException)1 ByteBuffer (java.nio.ByteBuffer)1 Collection (java.util.Collection)1