code: public static Message buildSnapshot(Zxid lastZxid, Zxid snapZxid) {
      ZabMessage.Zxid lZxid = toProtoZxid(lastZxid);
      ZabMessage.Zxid sZxid = toProtoZxid(snapZxid);
      Snapshot snapshot = Snapshot.newBuilder().setLastZxid(lZxid)
                                               .setSnapZxid(sZxid)
                                               .build();
      return Message.newBuilder().setType(MessageType.SNAPSHOT)
                                 .setSnapshot(snapshot)
                                 .build();
    }
docs: Creates a SNAPSHOT message.
  
  @param lastZxid the last zxid of the sender.
  @param snapZxid the last guaranteed applied zxid in snapshot.
  @return a protobuf message.