@Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            EnrichedLogSegment that = (EnrichedLogSegment) o;
            return nextSegmentOffset == that.nextSegmentOffset && Objects.equals(logSegment, that.logSegment);
        }
Closes and releases all the resources like RemoterStorageManager and RemoteLogMetadataManager.
core/src/main/java/kafka/log/remote/RemoteLogManager.java