protected void setDatasetAcquireProxy(Dataset typicalDataset, NetcdfDataset newds) throws IOException { DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); setDatasetAcquireProxy( proxy, newds.getRootGroup()); }
/** * All non-agg variables use a proxy to acquire the file before reading. * If the variable is caching, read data into cache now. * If not caching, VariableEnhanced.setProxyReader() is called. * * @param typicalDataset read from a "typical dataset" * @param newds containing dataset * @throws IOException on i/o error */ protected void setDatasetAcquireProxy(Dataset typicalDataset, NetcdfDataset newds) throws IOException { DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); setDatasetAcquireProxy( proxy, newds.getRootGroup()); }
protected void setDatasetAcquireProxy(Dataset typicalDataset, NetcdfDataset newds) throws IOException { DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); setDatasetAcquireProxy( proxy, newds.getRootGroup()); }
protected void setDatasetAcquireProxy(DatasetProxyReader proxy, Group g) throws IOException { // all normal (non agg) variables must use a proxy to lock the file for (Variable v : g.getVariables()) { if (v.getProxyReader() != v) { if (debugProxy) System.out.println(" debugProxy: hasProxyReader " + v.getFullName()); continue; // dont mess with agg variables } if (v.isCaching()) { // cache the small ones v.setCachedData( v.read()); // cache the variableDS directly } else { // put proxy on the rest v.setProxyReader(proxy); if (debugProxy) System.out.println(" debugProxy: set proxy on " + v.getFullName()); } } // recurse for (Group nested : g.getGroups()) { setDatasetAcquireProxy(proxy, nested); } }
protected void setDatasetAcquireProxy(DatasetProxyReader proxy, Group g) throws IOException { // all normal (non agg) variables must use a proxy to lock the file for (Variable v : g.getVariables()) { if (v.getProxyReader() != v) { if (debugProxy) System.out.println(" debugProxy: hasProxyReader " + v.getFullName()); continue; // dont mess with agg variables } if (v.isCaching()) { // cache the small ones v.setCachedData( v.read()); // cache the variableDS directly } else { // put proxy on the rest v.setProxyReader(proxy); if (debugProxy) System.out.println(" debugProxy: set proxy on " + v.getFullName()); } } // recurse for (Group nested : g.getGroups()) { setDatasetAcquireProxy(proxy, nested); } }
protected void setDatasetAcquireProxy(DatasetProxyReader proxy, Group g) throws IOException { // all normal (non agg) variables must use a proxy to lock the file for (Variable v : g.getVariables()) { if (v.getProxyReader() != v) { if (debugProxy) System.out.println(" debugProxy: hasProxyReader " + v.getFullName()); continue; // dont mess with agg variables } if (v.isCaching()) { // cache the small ones v.setCachedData( v.read()); // cache the variableDS directly } else { // put proxy on the rest v.setProxyReader(proxy); if (debugProxy) System.out.println(" debugProxy: set proxy on " + v.getFullName()); } } // recurse for (Group nested : g.getGroups()) { setDatasetAcquireProxy(proxy, nested); } }