/** * Checks to see if any archives have changed since the StatArchiverReader * instance was created or last updated. If an archive has additional * samples then those are read the resource instances maintained by the * reader are updated. * <p>Once closed a reader can no longer be updated. * @return true if update read some new data. * @throws IOException if an archive could not be opened * read, or closed. */ public boolean update() throws IOException { return update(true, false); } private boolean update(boolean doReset, boolean autoClose) throws IOException {
/** * Checks to see if any archives have changed since the StatArchiverReader * instance was created or last updated. If an archive has additional * samples then those are read the resource instances maintained by the * reader are updated. * <p>Once closed a reader can no longer be updated. * @return true if update read some new data. * @throws IOException if an archive could not be opened * read, or closed. */ public boolean update() throws IOException { return update(true, false); } private boolean update(boolean doReset, boolean autoClose) throws IOException {
/** * Creates a StatArchiveReader that will read the named archive file. * @param autoClose if its <code>true</code> then the reader will close * input files as soon as it finds their end. * @throws IOException if <code>archiveName</code> could not be opened * read, or closed. */ public StatArchiveReader(File[] archiveNames, ValueFilter[] filters, boolean autoClose) throws IOException { this.archives = new StatArchiveFile[archiveNames.length]; this.dump = Boolean.getBoolean("StatArchiveReader.dumpall"); for (int i=0; i < archiveNames.length; i++) { this.archives[i] = new StatArchiveFile(this, archiveNames[i], dump, filters); } update(false, autoClose); if (this.dump || Boolean.getBoolean("StatArchiveReader.dump")) { this.dump(new PrintWriter(System.out)); } }
/** * Creates a StatArchiveReader that will read the named archive file. * @param autoClose if its <code>true</code> then the reader will close * input files as soon as it finds their end. * @throws IOException if <code>archiveName</code> could not be opened * read, or closed. */ public StatArchiveReader(File[] archiveNames, ValueFilter[] filters, boolean autoClose) throws IOException { this.archives = new StatArchiveFile[archiveNames.length]; this.dump = Boolean.getBoolean("StatArchiveReader.dumpall"); for (int i=0; i < archiveNames.length; i++) { this.archives[i] = new StatArchiveFile(this, archiveNames[i], dump, filters); } update(false, autoClose); if (this.dump || Boolean.getBoolean("StatArchiveReader.dump")) { this.dump(new PrintWriter(System.out)); } }
while (!reader.update()) { try { Thread.sleep(1000);
while (!reader.update()) { try { Thread.sleep(1000);