Class SyncReport

java.lang.Object
lol.trq.alts.vault.SyncReport

public final class SyncReport extends Object
What one sync with the home host found and did (AVP SPEC 5, 6.4, 6.5, 7.5, 8.4), and what the owner may have to act on: pending leave requests, a diverged owner chain, and a policy that started sharing refresh tokens.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    How many heads failed a client check of SPEC 7.5 (a forged commit, a removed member's commit past its cutoff, a citation that does not hold): never merged, never a parent.
    The seq at which this device adopted a diverged owner chain that won the tie rule (SPEC 6.5): two owner devices published there while apart, and the states of the losing side were dropped.
    int
    How many head or leave items of the host's answer did not decode at all.
    boolean
    Whether the sync pushed a merge commit, because it read more than one head.
    int
    How many verified manifest states the sync added to this device's chain: every state for the open or join that first read the repository, the states past the pin for a resume.
    The members whose signed leave request is pending and passes the SPEC 8.4 checks.
    boolean
    Whether the repository's refresh-token policy went from withhold to share with this sync (SPEC 5.1), or, for the open or join that first read it, whether it shares.
    int
    How many verified heads this device read and merged.
    The counts.
    int
    How many verified heads this device cannot read (no key for their epoch, or a payload that does not open or is not version 2).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • newStates

      public int newStates()
      How many verified manifest states the sync added to this device's chain: every state for the open or join that first read the repository, the states past the pin for a resume.
      Returns:
      the count
      Since:
      1.0.0
    • divergedAt

      public OptionalLong divergedAt()
      The seq at which this device adopted a diverged owner chain that won the tie rule (SPEC 6.5): two owner devices published there while apart, and the states of the losing side were dropped. Show it to the owner; empty when the chain only grew.
      Returns:
      the fork seq, or empty
      Since:
      1.0.0
    • policyTurnedOn

      public boolean policyTurnedOn()
      Whether the repository's refresh-token policy went from withhold to share with this sync (SPEC 5.1), or, for the open or join that first read it, whether it shares. Show it to the member the first time: from now on, refresh tokens the members put are shared.
      Returns:
      whether sharing turned on
      Since:
      1.0.0
    • readableHeads

      public int readableHeads()
      How many verified heads this device read and merged.
      Returns:
      the count
      Since:
      1.0.0
    • unreadableHeads

      public int unreadableHeads()
      How many verified heads this device cannot read (no key for their epoch, or a payload that does not open or is not version 2). They are left alone, not merged, and are not a failure.
      Returns:
      the count
      Since:
      1.0.0
    • discardedCommits

      public int discardedCommits()
      How many heads failed a client check of SPEC 7.5 (a forged commit, a removed member's commit past its cutoff, a citation that does not hold): never merged, never a parent.
      Returns:
      the count
      Since:
      1.0.0
    • malformedItems

      public int malformedItems()
      How many head or leave items of the host's answer did not decode at all.
      Returns:
      the count
      Since:
      1.0.0
    • pendingLeaves

      public List<VaultMember> pendingLeaves()
      The members whose signed leave request is pending and passes the SPEC 8.4 checks. The owner removes them with SharedVault.processLeaves().
      Returns:
      the leaving members
      Since:
      1.0.0
    • merged

      public boolean merged()
      Whether the sync pushed a merge commit, because it read more than one head.
      Returns:
      whether it merged
      Since:
      1.0.0
    • toString

      public String toString()
      The counts.
      Overrides:
      toString in class Object
      Returns:
      a description
      Since:
      1.0.0