code: protected SnapshotWriter openWriter(SnapshotWriter writer, SnapshotDescriptor descriptor) {
      checkWriter();
      Assert.stateNot(descriptor.locked(), "cannot write to locked snapshot descriptor");
      this.writer = Assert.notNull(writer, "writer");
      return writer;
    }
docs: Opens the given snapshot writer.