/** * Returns all the type names known * * @return */ Set<String> getTypeNames() throws IOException { lock.readLock().lock(); try { updateCache(); return ftCache.keySet(); } finally { lock.readLock().unlock(); } }
/** * Returns the data store containing a specific feature type, or null if not found * * @param typeName * @param forceUpdate If true, it will force the update * @return */ DataStore getDataStore(String typeName, boolean forceUpdate) throws IOException { lock.readLock().lock(); try { if (forceUpdate) updateCache(); // TODO: check about re-creating the datastore when the cache // is turned into a soft map FileEntry fileEntry = ftCache.get(typeName); if (fileEntry == null) { throw new IOException("Not available: " + typeName); } return fileEntry.getStore(true); } finally { lock.readLock().unlock(); } }
/** * Returns all the type names known * @return */ Set<String> getTypeNames() throws IOException { lock.readLock().lock(); try { updateCache(); return ftCache.keySet(); } finally { lock.readLock().unlock(); } }
/** * Returns all the type names known * @return */ Set<String> getTypeNames() throws IOException { lock.readLock().lock(); try { updateCache(); return ftCache.keySet(); } finally { lock.readLock().unlock(); } }
/** * Returns the data store containing a specific feature type, or null if not * found * * @param typeName * @param forceUpdate If true, it will force the update * @return */ DataStore getDataStore(String typeName, boolean forceUpdate) throws IOException { lock.readLock().lock(); try { if(forceUpdate) updateCache(); // TODO: check about re-creating the datastore when the cache // is turned into a soft map return ftCache.get(typeName).getStore(true); } finally { lock.readLock().unlock(); } }
/** * Returns the data store containing a specific feature type, or null if not * found * * @param typeName * @param forceUpdate If true, it will force the update * @return */ DataStore getDataStore(String typeName, boolean forceUpdate) throws IOException { lock.readLock().lock(); try { if(forceUpdate) updateCache(); // TODO: check about re-creating the datastore when the cache // is turned into a soft map FileEntry fileEntry = ftCache.get(typeName); if( fileEntry == null){ throw new IOException("Not available: "+typeName ); } return fileEntry.getStore(true); } finally { lock.readLock().unlock(); } }