public void close() throws IOException {
        FileChannel channel = channelOrNull();
        if (channel != null)
            channel.close();
        maybeChannel = Optional.empty();
    }
Remove all the entries from the index. Unlike `AbstractIndex`, this index is not resized ahead of time.
storage/src/main/java/org/apache/kafka/storage/internals/log/TransactionIndex.java