public final class LogProtoUtils extends Object
public static String toLogEntryString(org.apache.ratis.proto.RaftProtos.LogEntryProto entry, Function<org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto,String> function)
public static String toLogEntryString(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
public static String toLogEntriesString(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries)
public static String toLogEntriesShortString(List<org.apache.ratis.proto.RaftProtos.LogEntryProto> entries)
public static org.apache.ratis.proto.RaftProtos.LogEntryProto toLogEntryProto(RaftConfiguration conf, Long term, long index)
public static org.apache.ratis.proto.RaftProtos.LogEntryProto toLogEntryProto(org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto proto, long term, long index)
public static org.apache.ratis.proto.RaftProtos.LogEntryProto toLogEntryProto(long commitIndex, long term, long index)
public static org.apache.ratis.proto.RaftProtos.LogEntryProto removeStateMachineData(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
public static boolean isStateMachineDataEmpty(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
public static int getSerializedSize(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
public static org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto toStateMachineLogEntryProto(RaftClientRequest request, org.apache.ratis.thirdparty.com.google.protobuf.ByteString logData, org.apache.ratis.thirdparty.com.google.protobuf.ByteString stateMachineData)
public static org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto toStateMachineLogEntryProto(ClientId clientId, long callId, org.apache.ratis.proto.RaftProtos.StateMachineLogEntryProto.Type type, org.apache.ratis.thirdparty.com.google.protobuf.ByteString logData, org.apache.ratis.thirdparty.com.google.protobuf.ByteString stateMachineData)
public static RaftConfiguration toRaftConfiguration(org.apache.ratis.proto.RaftProtos.LogEntryProto entry)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.