/** * Perform the supplied function on each directory used by this server. * * @param consumer the consumer function; may not be null */ void onEachDirectory(Consumer<File> consumer) { consumer.accept(getSnapshotDirectory()); consumer.accept(getLogDirectory()); }
/** * Perform the supplied function on each directory used by this cluster. * * @param consumer the consumer function; may not be null */ void onEachDirectory(java.util.function.Consumer<File> consumer) { consumer.accept(zkServer.getSnapshotDirectory()); consumer.accept(zkServer.getLogDirectory()); kafkaServers.values().forEach(server -> consumer.accept(server.getStateDirectory())); }