org.geotools.caching.featurecache
Interface FeatureCache

All Superinterfaces:
FeatureSource
All Known Implementing Classes:
AbstractFeatureCache, GridFeatureCache, StreamingGridFeatureCache

public interface FeatureCache
extends FeatureSource

Interface for a feature cache.


Method Summary
 void clear()
          Removes all features from the feature cache.
 void dispose()
          Disposes of the feature cache closing any open store connections.
 FeatureCollection get(com.vividsolutions.jts.geom.Envelope e)
          Returns a feature collection of features within in the given envelope.
 FeatureCollection peek(com.vividsolutions.jts.geom.Envelope e)
          Looks in the cache for the features within a given envelope.
 void put(FeatureCollection fc)
           
 void put(FeatureCollection fc, com.vividsolutions.jts.geom.Envelope e)
           
 void remove(com.vividsolutions.jts.geom.Envelope e)
          Removes all features from the cache that lie within the given envelope.
 
Methods inherited from interface org.geotools.data.FeatureSource
addFeatureListener, getBounds, getBounds, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener
 

Method Detail

clear

void clear()
Removes all features from the feature cache.


put

void put(FeatureCollection fc,
         com.vividsolutions.jts.geom.Envelope e)
         throws CacheOversizedException
Parameters:
fc - the feature collection to add to the cache
e - the envelope that encompasses the feature collection added
Throws:
CacheOversizedException

put

void put(FeatureCollection fc)
         throws CacheOversizedException
Parameters:
fc - the feature collection to add to the cache
Throws:
CacheOversizedException

get

FeatureCollection get(com.vividsolutions.jts.geom.Envelope e)
                      throws java.io.IOException
Returns a feature collection of features within in the given envelope.

This function will look for features in the cache; if none are present it will then look into the underlying feature source for the features.

Parameters:
e -
Returns:
Collection of feature found in the given envelope (from the cache or feature source)
Throws:
java.io.IOException

peek

FeatureCollection peek(com.vividsolutions.jts.geom.Envelope e)
Looks in the cache for the features within a given envelope.

This function will only look in the cache for the features; it will not look in the underlying datastore.

Parameters:
e -
Returns:
Collection of features found in the cache.

remove

void remove(com.vividsolutions.jts.geom.Envelope e)
Removes all features from the cache that lie within the given envelope.

Parameters:
e -

dispose

void dispose()
Disposes of the feature cache closing any open store connections.



Copyright © 1996-2010 Geotools. All Rights Reserved.