@Override
    public void freeze() {
        writer.freeze();
        // Only notify the callback on success
        callback.accept(writer.snapshotId());
    }
Delegates the call to the internal writer and invokes the callback on success.
raft/src/main/java/org/apache/kafka/snapshot/NotifyingRawSnapshotWriter.java