public void markForCleanup() throws IOException {
            entryLock.writeLock().lock();
            try {
                if (!markedForCleanup) {
                    markedForCleanup = true;
                    offsetIndex.renameTo(new File(Utils.replaceSuffix(offsetIndex.file().getPath(), "", LogFileUtils.DELETED_FILE_SUFFIX)));
                    timeIndex.renameTo(new File(Utils.replaceSuffix(timeIndex.file().getPath(), "", LogFileUtils.DELETED_FILE_SUFFIX)));
                    txnIndex.renameTo(new File(Utils.replaceSuffix(txnIndex.file().getPath(), "", LogFileUtils.DELETED_FILE_SUFFIX)));
                }
            } finally {
                entryLock.writeLock().unlock();
            }
        }
Creates RemoteIndexCache with the given configs.

@param maxSize              maximum bytes size of segment index entries to be cached.
@param remoteStorageManager RemoteStorageManager instance, to be used in fetching indexes.
@param logDir               log directory
storage/src/main/java/org/apache/kafka/storage/internals/log/RemoteIndexCache.java