Class LockingGranuleCatalog
- Object
-
- GranuleCatalog
-
- LockingGranuleCatalog
-
public class LockingGranuleCatalog extends GranuleCatalog
Applies read/write locks around all operations to protect the underlying store, which might not be able to handle this scenario correctly
-
-
Field Summary
-
Fields inherited from class GranuleCatalog
configurations, hints, multiScaleROIProvider
-
-
Constructor Summary
Constructors Constructor Description LockingGranuleCatalog(GranuleCatalog delegate, Hints hints)
-
Method Summary
-
Methods inherited from class GranuleCatalog
getConfigurations, getHints
-
-
-
-
Constructor Detail
-
LockingGranuleCatalog
public LockingGranuleCatalog(GranuleCatalog delegate, Hints hints)
-
-
Method Detail
-
addGranule
public void addGranule(String typeName, SimpleFeature granule, Transaction transaction) throws IOException
- Overrides:
addGranulein classGranuleCatalog- Throws:
IOException
-
addGranules
public void addGranules(String typeName, Collection<SimpleFeature> granules, Transaction transaction) throws IOException
- Specified by:
addGranulesin classGranuleCatalog- Throws:
IOException
-
computeAggregateFunction
public void computeAggregateFunction(Query q, FeatureCalc function) throws IOException
- Specified by:
computeAggregateFunctionin classGranuleCatalog- Throws:
IOException
-
createType
public void createType(String namespace, String typeName, String typeSpec) throws IOException, SchemaException
- Specified by:
createTypein classGranuleCatalog- Throws:
IOExceptionSchemaException
-
createType
public void createType(SimpleFeatureType featureType) throws IOException
- Specified by:
createTypein classGranuleCatalog- Throws:
IOException
-
createType
public void createType(String identification, String typeSpec) throws SchemaException, IOException
- Specified by:
createTypein classGranuleCatalog- Throws:
SchemaExceptionIOException
-
dispose
public void dispose()
- Specified by:
disposein classGranuleCatalog
-
getBounds
public BoundingBox getBounds(String typeName)
- Specified by:
getBoundsin classGranuleCatalog
-
getBounds
public BoundingBox getBounds(String typeName, Transaction t)
- Overrides:
getBoundsin classGranuleCatalog
-
getGranules
public SimpleFeatureCollection getGranules(Query q) throws IOException
- Specified by:
getGranulesin classGranuleCatalog- Throws:
IOException
-
getGranules
public SimpleFeatureCollection getGranules(Query q, Transaction t) throws IOException
- Overrides:
getGranulesin classGranuleCatalog- Throws:
IOException
-
getGranulesCount
public int getGranulesCount(Query q) throws IOException
- Specified by:
getGranulesCountin classGranuleCatalog- Throws:
IOException
-
getGranuleDescriptors
public void getGranuleDescriptors(Query q, GranuleCatalogVisitor visitor) throws IOException
- Specified by:
getGranuleDescriptorsin classGranuleCatalog- Throws:
IOException
-
getQueryCapabilities
public QueryCapabilities getQueryCapabilities(String typeName)
- Specified by:
getQueryCapabilitiesin classGranuleCatalog
-
getType
public SimpleFeatureType getType(String typeName) throws IOException
- Specified by:
getTypein classGranuleCatalog- Throws:
IOException
-
removeType
public void removeType(String typeName) throws IOException
- Specified by:
removeTypein classGranuleCatalog- Throws:
IOException
-
removeGranules
public int removeGranules(Query query)
- Specified by:
removeGranulesin classGranuleCatalog
-
removeGranules
public int removeGranules(Query query, Transaction transaction)
- Overrides:
removeGranulesin classGranuleCatalog
-
getTypeNames
public String[] getTypeNames()
- Specified by:
getTypeNamesin classGranuleCatalog
-
mergeHints
public Query mergeHints(Query q)
Description copied from class:GranuleCatalogMerges the wrapper hints with the query ones, making sure not to overwrite the query ones- Overrides:
mergeHintsin classGranuleCatalog
-
setMultiScaleROIProvider
public void setMultiScaleROIProvider(MultiLevelROIProvider footprintProvider)
- Overrides:
setMultiScaleROIProviderin classGranuleCatalog
-
getGranuleFootprint
public MultiLevelROI getGranuleFootprint(SimpleFeature sf)
Description copied from class:GranuleCatalogReturns the footprint for the given granule. Mind, when applying insets we might have the case of the geometry being empty (negative buffer eroded it fully), in that case the granule must not be loaded- Overrides:
getGranuleFootprintin classGranuleCatalog
-
getFootprintFiles
public List<File> getFootprintFiles(SimpleFeature sf) throws IOException
Description copied from class:GranuleCatalogReturns the list of footprint files for the given granule- Overrides:
getFootprintFilesin classGranuleCatalog- Throws:
IOException
-
drop
public void drop() throws IOExceptionDescription copied from class:GranuleCatalogDrop the underlying catalog, all the individual granule indexes.This is usuallu done when deleting an ImageMosaic storre.
- Specified by:
dropin classGranuleCatalog- Throws:
IOException- in case something bad happens
-
getParentLocation
protected String getParentLocation()
- Specified by:
getParentLocationin classGranuleCatalog
-
getAdaptee
public GranuleCatalog getAdaptee()
-
-