/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.autoplot.aggregator; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.UnknownHostException; import java.util.Date; import java.util.logging.Level; import java.util.logging.Logger; import org.das2.datum.DatumRange; import org.das2.fsm.FileStorageModel; import org.das2.util.filesystem.FileObject; import org.das2.util.filesystem.FileSystem; import org.das2.util.filesystem.FileSystem.FileSystemOfflineException; import org.das2.util.filesystem.LocalFileSystem; import org.das2.util.monitor.NullProgressMonitor; import org.autoplot.datasource.capability.Updating; /** * Aggregation polling checks for updates of the set, for a given timerange. * @author jbf */ public class AggregationPollUpdating implements Updating { private static final Logger logger= Logger.getLogger("apdss.agg.updating"); FileStorageModel fsm; DatumRange dr; long dirHash; long pollCyclePeriodSeconds= -1; boolean dirty= false; //true indicates the hash has changed and we need to clean. boolean polling= false; //true indicates we are polling. private final static int LIMIT_SHORT_CYCLE_PERIOD_SECONDS= 1; private final static int LIMIT_SHORT_REMOTE_CYCLE_PERIOD_SECONDS= 10; public AggregationPollUpdating( FileStorageModel fsm, DatumRange dr, long pollCyclePeriodSeconds ) { this.fsm= fsm; this.dr= dr; if ( fsm.getFileSystem() instanceof LocalFileSystem ) { if ( pollCyclePeriodSeconds