code: public CompletableFuture<Void> snapshot() {
      RaftPartitionServer server = this.server;
      if (server != null) {
        return server.snapshot();
      }
      return CompletableFuture.completedFuture(null);
    }
docs: Takes a snapshot of the partition.
  
  @return a future to be completed once the snapshot is complete