Class CommitTable

java.lang.Object
org.jgroups.raft.util.CommitTable

public class CommitTable extends Object
Keeps track of next_index and match_index for each cluster member (excluding this leader).

Used to (1) compute the commit_index and (2) to resend log entries to members which haven't yet seen them. Only created on the leader.

Since:
0.1
Author:
Bela Ban
  • Field Details

  • Constructor Details

    • CommitTable

      public CommitTable(List<org.jgroups.Address> members, long next_index)
  • Method Details

    • keys

      public Set<org.jgroups.Address> keys()
    • get

      public CommitTable.Entry get(org.jgroups.Address a)
    • adjust

      public void adjust(List<org.jgroups.Address> members, long next_index)
    • update

      public CommitTable update(org.jgroups.Address member, long match_index, long next_index, long commit_index, boolean single_resend)
    • update

      public CommitTable update(org.jgroups.Address member, long match_index, long next_index, long commit_index, boolean single_resend, boolean overwrite)
    • forEach

      public void forEach(BiConsumer<org.jgroups.Address,CommitTable.Entry> function)
      Applies a function to all elements of the commit table
    • toString

      public String toString()
      Overrides:
      toString in class Object