|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.util.cacheHandler.CacheHandler com.bbn.openmap.layer.vpf.VPFFeatureCache
public class VPFFeatureCache
The VPFFeatureCache is an extended CacheHandler that caches OMGraphicLists representing a specific feature contained in a CoverageTile. It's used by the VPFCachedFeatureGraphicWarehouse, which in turn is used by the LibraryBean as a central warehouse.
Nested Class Summary | |
---|---|
static class |
VPFFeatureCache.VPFListCacheObject
CacheObject used by VPFFeatureCache. |
Field Summary |
---|
Fields inherited from class com.bbn.openmap.util.cacheHandler.CacheHandler |
---|
DEFAULT_MAX_CACHE_SIZE, logger, logicalClock, objs |
Constructor Summary | |
---|---|
VPFFeatureCache()
Create a VPFFeatureCache of the default maximum size. |
|
VPFFeatureCache(int maxSize)
Create a VPFFeatureCache of the specified maximum size. |
Method Summary | |
---|---|
protected void |
addToCachedList(java.lang.String libraryName,
OMGraphic omg,
java.lang.String featureType,
PrimitiveTable pt,
java.lang.String type)
Adds an OMGraphic to a list, signified by the feature type and the table. |
static java.lang.String |
createTableCacheKey(java.lang.String libraryName,
java.lang.String featureType,
java.lang.String tilePath)
Create an identifying key from the feature type and tile path. |
java.lang.Object |
get(java.lang.String key,
java.lang.String featureType)
Additional get method that will call a load() method that takes into account the featureType. |
CacheObject |
load(java.lang.Object key)
CacheHandler method to load the new OMGraphicLists (FeatureCacheGraphicLists). |
CacheObject |
load(java.lang.String key,
java.lang.String featureType)
CacheHandler method to load the new OMGraphicLists (FeatureCacheGraphicLists). |
FeatureCacheGraphicList |
loadCachedGraphicList(java.lang.String libraryName,
java.lang.String featureType,
java.lang.String tilePath,
OMGraphicList requestor)
Returns true if the features from a tile (as described by the key) existed and was added to the warehouse graphics list. |
FeatureCacheGraphicList |
needToFetchTileContents(java.lang.String libraryName,
java.lang.String currentFeature,
TileDirectory currentTile,
OMGraphicList requestor)
Query that the CoverageTable makes to decide whether to read the file contents or to used the cached version. |
Methods inherited from class com.bbn.openmap.util.cacheHandler.CacheHandler |
---|
clear, get, getCacheSize, listIterator, replaceLeastUsed, resetCache, resetCache, searchCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VPFFeatureCache()
public VPFFeatureCache(int maxSize)
Method Detail |
---|
protected void addToCachedList(java.lang.String libraryName, OMGraphic omg, java.lang.String featureType, PrimitiveTable pt, java.lang.String type)
omg
- OMGraphic to addfeatureType
- the feature code of the OMGraphicpt
- the PrimitiveTable containing the path to the CoverageTile.public static java.lang.String createTableCacheKey(java.lang.String libraryName, java.lang.String featureType, java.lang.String tilePath)
public FeatureCacheGraphicList loadCachedGraphicList(java.lang.String libraryName, java.lang.String featureType, java.lang.String tilePath, OMGraphicList requestor)
featureType
- the feature type code.tilePath
- the relative path to the tile file.requestor
- the OMGraphicList used to contain cached lists. The
cached list will for the featureType/path code will be added to
this list, regardless of whether it's been populated or not. The
requestor list will be returned when the warehouse is asked for
the graphics list.
public FeatureCacheGraphicList needToFetchTileContents(java.lang.String libraryName, java.lang.String currentFeature, TileDirectory currentTile, OMGraphicList requestor)
currentFeature
- the feature typecurrentTile
- the tile directoryrequestor
- the OMGraphicList to add the cached list to. If the
CoverageTable reads the data files, the OMGraphics created from
the files will be added to the list added to the requestor.
public java.lang.Object get(java.lang.String key, java.lang.String featureType)
key
- the created key for cached list, see createTableCacheKeyfeatureType
- the kind of feature, VPFUtil.Area, VPFUtil.Edge,
VPFUtil.Point or VPFUtil.Text.public CacheObject load(java.lang.Object key)
load
in class CacheHandler
public CacheObject load(java.lang.String key, java.lang.String featureType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |