Interface Resolver<T>


public interface Resolver<T>
Provides a mechanism for resolving conflict between two conflicting values in a sync db.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Resolver<Boolean>
    Uses whichever of the client or server is false.
    static final Resolver<Number>
    Uses the largest of the client and server floating point numbers.
    static final Resolver<Number>
    Uses the smallest of the client and server floating point numbers.
    static final Resolver<Number>
    Uses the largest of the client and server integral numbers.
    static final Resolver<Number>
    Uses the smallest of the client and server integral numbers.
    static final Resolver<Object>
    Uses the server value, ignoring the client value.
    static final Resolver<Boolean>
    Uses whichever of the client or server is true.
  • Method Summary

    Modifier and Type
    Method
    Description
    <V extends T>
    V
    resolve(V client, V server)
    Resolves a conflict between a client and server value.
  • Field Details

    • SERVER

      static final Resolver<Object> SERVER
      Uses the server value, ignoring the client value.
    • INTMIN

      static final Resolver<Number> INTMIN
      Uses the smallest of the client and server integral numbers.
    • INTMAX

      static final Resolver<Number> INTMAX
      Uses the largest of the client and server integral numbers.
    • FLOATMIN

      static final Resolver<Number> FLOATMIN
      Uses the smallest of the client and server floating point numbers.
    • FLOATMAX

      static final Resolver<Number> FLOATMAX
      Uses the largest of the client and server floating point numbers.
    • TRUE

      static final Resolver<Boolean> TRUE
      Uses whichever of the client or server is true.
    • FALSE

      static final Resolver<Boolean> FALSE
      Uses whichever of the client or server is false.
  • Method Details

    • resolve

      <V extends T> V resolve(V client, V server)
      Resolves a conflict between a client and server value.
      Returns:
      the value to be used on the client.