List of usage examples for org.apache.lucene.util IOUtils spins
public static boolean spins(Path path) throws IOException
From source file:org.elasticsearch.env.ESFileStore.java
License:Apache License
@SuppressForbidden(reason = "tries to determine if disk is spinning") // TODO: move PathUtils to be package-private here instead of // public+forbidden api! ESFileStore(FileStore in) {/*from w w w. j av a 2 s .com*/ this.in = in; Boolean spins; // Lucene's IOUtils.spins only works on Linux today: if (Constants.LINUX) { try { spins = IOUtils.spins(PathUtils.get(getMountPointLinux(in))); } catch (Exception e) { spins = null; } } else { spins = null; } this.spins = spins; }