Interface RaftEntrySerializer

All Known Implementing Classes:
RaftEntrySBESerializer

public interface RaftEntrySerializer
  • Method Summary

    Modifier and Type
    Method
    Description
    readRaftLogEntry(org.agrona.DirectBuffer buffer)
    Read the raft log entry from the buffer
    int
    writeApplicationEntry(long term, ApplicationEntry entry, org.agrona.MutableDirectBuffer buffer, int offset)
    Writes the term and entry into given buffer at the given offset
    int
    writeConfigurationEntry(long term, ConfigurationEntry entry, org.agrona.MutableDirectBuffer buffer, int offset)
    Writes the term and entry into given buffer at the given offset
    int
    writeInitialEntry(long term, InitialEntry entry, org.agrona.MutableDirectBuffer buffer, int offset)
    Writes the term and entry into given buffer at the given offset
  • Method Details

    • writeApplicationEntry

      int writeApplicationEntry(long term, ApplicationEntry entry, org.agrona.MutableDirectBuffer buffer, int offset)
      Writes the term and entry into given buffer at the given offset
      Parameters:
      term - the term of the entry
      entry - the ApplicationEntry to write
      buffer - the buffer to write to
      offset - the offset in the buffer at which the term and entry will be written
      Returns:
      the number of bytes written
    • writeInitialEntry

      int writeInitialEntry(long term, InitialEntry entry, org.agrona.MutableDirectBuffer buffer, int offset)
      Writes the term and entry into given buffer at the given offset
      Parameters:
      term - the term of the entry
      entry - the InitialEntry to write
      buffer - the buffer to write to
      offset - the offset in the buffer at which the term and entry will be written
      Returns:
      the number of bytes written
    • writeConfigurationEntry

      int writeConfigurationEntry(long term, ConfigurationEntry entry, org.agrona.MutableDirectBuffer buffer, int offset)
      Writes the term and entry into given buffer at the given offset
      Parameters:
      term - the term of the entry
      entry - the ApplicationEntry to write
      buffer - the buffer to write to
      offset - the offset in the buffer at which the term and entry will be written
      Returns:
      the number of bytes written
    • readRaftLogEntry

      RaftLogEntry readRaftLogEntry(org.agrona.DirectBuffer buffer)
      Read the raft log entry from the buffer
      Parameters:
      buffer -
      Returns:
      RaftLogEntry