Interface SetResolver


public interface SetResolver
Provides a mechanism for resolving conflict between two conflicting sets in a sync db.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SetResolver
    Uses the intersection of the client and server sets.
    static final SetResolver
    Uses the server set, ignoring all elements in the client set.
    static final SetResolver
    Uses the union of the client and server sets.
  • Method Summary

    Modifier and Type
    Method
    Description
    <V> boolean
    resolve(Set<V> client, Set<V> server)
    Resolves a conflict between a client and server set.
  • Field Details

    • SERVER

      static final SetResolver SERVER
      Uses the server set, ignoring all elements in the client set.
    • UNION

      static final SetResolver UNION
      Uses the union of the client and server sets.
    • INTERSECTION

      static final SetResolver INTERSECTION
      Uses the intersection of the client and server sets.
  • Method Details

    • resolve

      <V> boolean resolve(Set<V> client, Set<V> server)
      Resolves a conflict between a client and server set. The client set is mutated to reflect the resolved state.
      Returns:
      whether the client set was mutated during resolution.