use of org.apache.bookkeeper.stream.proto.kv.rpc.Compare in project bookkeeper by apache.
the class TableStoreImpl method buildTxnOp.
private TxnOp<byte[], byte[]> buildTxnOp(TxnRequest request) {
RoutingHeader header = request.getHeader();
TxnOpBuilder<byte[], byte[]> txnBuilder = store.getOpFactory().newTxn();
for (RequestOp requestOp : request.getSuccessList()) {
txnBuilder.Then(buildTxnOp(header, requestOp));
}
for (RequestOp requestOp : request.getFailureList()) {
txnBuilder.Else(buildTxnOp(header, requestOp));
}
for (Compare compare : request.getCompareList()) {
txnBuilder.If(fromProtoCompare(store.getOpFactory(), header, compare));
}
return txnBuilder.build();
}
Aggregations