Class Protocol.Response

java.lang.Object
tripleplay.syncdb.Protocol.Response
Enclosing class:
Protocol

public static class Protocol.Response extends Object
Encapsualtes a response from the server.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final boolean
    Whether the client's submitted deltas were applied cleanly to the server.
    Deltas the client needs to apply to sync with the latest server version.
    final int
    The version of Protocol in use by the client.
    final int
    The latest server version.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Response(int version)
    Creates a response that represents a clean sync.
    Response(int version, Map<String,String> delta)
    Creates a (non-clean-sync) response with the supplied version and delta.
  • Method Summary

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • protocolVersion

      public final int protocolVersion
      The version of Protocol in use by the client.
    • version

      public final int version
      The latest server version.
    • delta

      public final Map<String,String> delta
      Deltas the client needs to apply to sync with the latest server version.
    • cleanSync

      public final boolean cleanSync
      Whether the client's submitted deltas were applied cleanly to the server. If false, the client's submitted delta was not applied at all to the server and should be resubmitted after the client applies the server deltas.
  • Constructor Details

    • Response

      public Response(int version)
      Creates a response that represents a clean sync.
    • Response

      public Response(int version, Map<String,String> delta)
      Creates a (non-clean-sync) response with the supplied version and delta.