public static Message buildDiff(Zxid lastZxid) {
    ZabMessage.Zxid lz = toProtoZxid(lastZxid);

    Diff diff = Diff.newBuilder().setLastZxid(lz).build();

    return Message.newBuilder().setType(MessageType.DIFF)
                               .setDiff(diff)
                               .build();
  }
public static Message buildDiff ( Zxid lastZxid ) { ZabMessage . Zxid lz = toProtoZxid ( lastZxid ) ; Diff diff = Diff . newBuilder ( ) . setLastZxid ( lz ) . build ( ) ; return Message . newBuilder ( ) . setType ( MessageType . DIFF ) . setDiff ( diff ) . build ( ) ; }
Creates a DIFF message.

@param lastZxid the last zxid of the server who initiates the sync.
@return a protobuf message.