|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bbn.openmap.layer.util.cacheHandler.CacheHandler | +--com.bbn.openmap.layer.vpf.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.layer.util.cacheHandler.CacheHandler |
DEFAULT_MAX_CACHE_SIZE, 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(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 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.String 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). |
boolean |
loadCachedGraphicList(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. |
boolean |
needToFetchTileContents(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.layer.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(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 featureType, java.lang.String tilePath)
public boolean loadCachedGraphicList(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 boolean needToFetchTileContents(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.String 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 |