24#ifndef SINGLE_PRIMARY_MESSAGE_INCLUDED
25#define SINGLE_PRIMARY_MESSAGE_INCLUDED
156 const unsigned char *
end)
override;
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: single_primary_message.h:35
static uint64_t get_sent_timestamp(const unsigned char *buffer, size_t length)
Return the time at which the message contained in the buffer was sent.
Definition: single_primary_message.cc:126
enum_primary_election_mode get_election_mode()
Definition: single_primary_message.cc:121
enum_primary_election_mode election_mode
The mode for election requests.
Definition: single_primary_message.h:165
Single_primary_message(Single_primary_message_type type)
Message constructor.
Definition: single_primary_message.cc:30
Single_primary_message_type
The several single primary type messages.
Definition: single_primary_message.h:60
@ SINGLE_PRIMARY_QUEUE_APPLIED_MESSAGE
Primary did apply queue after election.
Definition: single_primary_message.h:66
@ SINGLE_PRIMARY_READ_MODE_SET
The member as set the read on the election context.
Definition: single_primary_message.h:74
@ SINGLE_PRIMARY_PRIMARY_READY
The primary is now ready, processed all the backlog.
Definition: single_primary_message.h:72
@ SINGLE_PRIMARY_UNKNOWN
This type should not be used anywhere.
Definition: single_primary_message.h:62
@ SINGLE_PRIMARY_MESSAGE_TYPE_END
The end of the enum.
Definition: single_primary_message.h:76
@ SINGLE_PRIMARY_PRIMARY_ELECTION
Invoke a new election.
Definition: single_primary_message.h:70
@ SINGLE_PRIMARY_NO_RESTRICTED_TRANSACTIONS
No more forbidden transactions on multi master remain.
Definition: single_primary_message.h:68
@ SINGLE_PRIMARY_NEW_PRIMARY_MESSAGE
A new primary was elected.
Definition: single_primary_message.h:64
enum_payload_item_type
Definition: single_primary_message.h:37
@ PIT_SINGLE_PRIMARY_SERVER_UUID
Definition: single_primary_message.h:45
@ PIT_UNKNOWN
Definition: single_primary_message.h:39
@ PIT_SINGLE_PRIMARY_MESSAGE_TYPE
Definition: single_primary_message.h:42
@ PIT_SINGLE_PRIMARY_ELECTION_MODE
Definition: single_primary_message.h:48
@ PIT_SENT_TIMESTAMP
Definition: single_primary_message.h:51
@ PIT_MAX
Definition: single_primary_message.h:54
Single_primary_message_type get_single_primary_message_type() const
Returns this single primary message type.
Definition: single_primary_message.h:111
void decode_payload(const unsigned char *buffer, const unsigned char *end) override
Message decoding method.
Definition: single_primary_message.cc:52
~Single_primary_message() override
Message destructor.
std::string primary_uuid
The uuid for the primary member.
Definition: single_primary_message.h:163
std::string & get_primary_uuid()
Definition: single_primary_message.cc:116
Single_primary_message_type single_primary_message_type
The message type.
Definition: single_primary_message.h:160
void encode_payload(std::vector< unsigned char > *buffer) const override
Encodes the message contents for transmission.
Definition: single_primary_message.cc:94
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
Definition: buf0block_hint.cc:30
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
enum_primary_election_mode
Enum for election types.
Definition: primary_election_include.h:33
required string type
Definition: replication_group_member_actions.proto:34