public enum ReplicationMessages extends Enum<ReplicationMessages>
| Modifier and Type | Field and Description |
|---|---|
static short |
APPEND_REQUEST |
static short |
APPEND_RESPONSE |
static byte |
FLAG_APPEND_SUCCESS |
| Modifier and Type | Method and Description |
|---|---|
static int |
appendRequest(MutableDirectBuffer buffer,
int offset,
int term,
int leaderId,
long logIndex,
DirectBuffer payload,
int payloadOffset,
int payloadSize) |
static int |
appendResponse(MutableDirectBuffer buffer,
int offset,
int term,
int leaderId,
long nextEventLogIndex,
boolean success) |
static int |
candidateId(DirectBuffer buffer) |
static int |
committedLogIndex(DirectBuffer buffer) |
static byte |
flags(DirectBuffer buffer) |
static boolean |
isAppendSuccess(DirectBuffer buffer) |
static boolean |
isReplicationMessageType(int type) |
static int |
leaderId(DirectBuffer buffer) |
static int |
logIndex(DirectBuffer buffer) |
static int |
payloadSize(DirectBuffer buffer) |
static String |
replicationMessageName(int type) |
static int |
term(DirectBuffer buffer) |
static byte |
type(DirectBuffer buffer) |
static ReplicationMessages |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ReplicationMessages[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static byte |
version(DirectBuffer buffer) |
public static final short APPEND_REQUEST
public static final short APPEND_RESPONSE
public static final byte FLAG_APPEND_SUCCESS
public static ReplicationMessages[] values()
for (ReplicationMessages c : ReplicationMessages.values()) System.out.println(c);
public static ReplicationMessages valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static int appendRequest(MutableDirectBuffer buffer, int offset, int term, int leaderId, long logIndex, DirectBuffer payload, int payloadOffset, int payloadSize)
public static int appendResponse(MutableDirectBuffer buffer, int offset, int term, int leaderId, long nextEventLogIndex, boolean success)
public static byte version(DirectBuffer buffer)
public static byte flags(DirectBuffer buffer)
public static boolean isAppendSuccess(DirectBuffer buffer)
public static byte type(DirectBuffer buffer)
public static int candidateId(DirectBuffer buffer)
public static int leaderId(DirectBuffer buffer)
public static int term(DirectBuffer buffer)
public static int logIndex(DirectBuffer buffer)
public static int committedLogIndex(DirectBuffer buffer)
public static int payloadSize(DirectBuffer buffer)
public static boolean isReplicationMessageType(int type)
public static String replicationMessageName(int type)
Copyright © 2020 tools4j.org (Marco Terzer, Anton Anufriev). All Rights Reserved.