|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.caching.featurecache.AbstractFeatureCache
org.geotools.caching.grid.featurecache.GridFeatureCache
org.geotools.caching.grid.featurecache.StreamingGridFeatureCache
public class StreamingGridFeatureCache
Implementation of a GridFeatureCache that uses streaming feature collections. Feature are streamed out of the cache and the feature source only when requested. Features streams out of the feature source are cached as they are read.
This is a read only implementation; you cannot add features to this cache.
This implementation of a feature cache locks the cache at the node level not the entire cache. So as long as you are accessing different nodes you should be able to write to and read from the cache at the same time.
Only supports SimpleFeatureType & SimpleFeature
Field Summary |
---|
Fields inherited from class org.geotools.caching.grid.featurecache.GridFeatureCache |
---|
capacity, max_tiles, tracker |
Fields inherited from class org.geotools.caching.featurecache.AbstractFeatureCache |
---|
ff, fs, lock, logger, source_feature_reads, source_hits |
Constructor Summary | |
---|---|
StreamingGridFeatureCache(FeatureSource fs,
int indexcapacity,
int capacity,
Storage store)
|
|
StreamingGridFeatureCache(FeatureSource fs,
ReferencedEnvelope env,
int indexcapacity,
int capacity,
Storage store)
|
Method Summary | |
---|---|
FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
get(com.vividsolutions.jts.geom.Envelope e)
Gets all feature within a given envelope. |
FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
getFeatures(org.opengis.filter.Filter filter)
Get all features that match given filter. |
FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
getFeatures(Query query)
Gets all features that match a query. |
FeatureCollection |
peek(com.vividsolutions.jts.geom.Envelope e)
Returns all features in the cache that match the given envelope. |
void |
put(FeatureCollection fc)
Unsupported. |
void |
put(FeatureCollection fc,
com.vividsolutions.jts.geom.Envelope e)
Unsupported. |
void |
register(java.util.Collection<NodeIdentifier> nodes)
Registers a collection of nodes as valid. |
void |
remove(com.vividsolutions.jts.geom.Envelope e)
Removes all nodes from the cache that match the given envelope. |
void |
unregister(java.util.Collection<NodeIdentifier> nodes)
Un-registers a collection of nodes. |
Methods inherited from class org.geotools.caching.grid.featurecache.GridFeatureCache |
---|
clear, dispose, getBounds, getBounds, getCount, getFeatureBounds, getIndex, getSchema, getStats, getSupportedHints, isOversized, match, matchNodeIds, register, toString, unregister |
Methods inherited from class org.geotools.caching.featurecache.AbstractFeatureCache |
---|
_getFeatures, addFeatureListener, changed, getDataStore, getFeatures, getInfo, getName, getQueryCapabilities, readLock, readUnLock, register, register, removeFeatureListener, sourceAccessStats, unregister, unregister, writeLock, writeUnLock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StreamingGridFeatureCache(FeatureSource fs, int indexcapacity, int capacity, Storage store) throws FeatureCacheException
FeatureCacheException
public StreamingGridFeatureCache(FeatureSource fs, ReferencedEnvelope env, int indexcapacity, int capacity, Storage store)
Method Detail |
---|
public FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> get(com.vividsolutions.jts.geom.Envelope e) throws java.io.IOException
get
in interface FeatureCache
get
in class AbstractFeatureCache
java.io.IOException
public FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatures(Query query) throws java.io.IOException
Currently the query handle is not supported.
getFeatures
in interface FeatureSource
getFeatures
in class AbstractFeatureCache
query
- a datasource query object. It encapsulates requested
information, such as typeName, maxFeatures and filter.
java.io.IOException
- For all data source errors.Query
public FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatures(org.opengis.filter.Filter filter) throws java.io.IOException
getFeatures
in interface FeatureSource
getFeatures
in class AbstractFeatureCache
filter
- An OpenGIS filter; specifies which features to retrieve.
null is not allowed, use Filter.INCLUDE instead.
java.io.IOException
- For all data source errors.public FeatureCollection peek(com.vividsolutions.jts.geom.Envelope e)
peek
in interface FeatureCache
peek
in class GridFeatureCache
public void put(FeatureCollection fc, com.vividsolutions.jts.geom.Envelope e) throws CacheOversizedException
put
in interface FeatureCache
put
in class GridFeatureCache
fc
- the feature collection to add to the cachee
- the envelope that encompasses the feature collection added
CacheOversizedException
public void put(FeatureCollection fc) throws CacheOversizedException
put
in interface FeatureCache
put
in class GridFeatureCache
fc
- the feature collection to add to the cache
CacheOversizedException
- if the feature collection has too many features for the cache.public void remove(com.vividsolutions.jts.geom.Envelope e)
remove
in interface FeatureCache
remove
in class GridFeatureCache
public void register(java.util.Collection<NodeIdentifier> nodes)
register
in class GridFeatureCache
nodes
- public void unregister(java.util.Collection<NodeIdentifier> nodes)
unregister
in class GridFeatureCache
nodes
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |