|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.cache.ShapeDataCache
public class ShapeDataCache
Provides a mechanism to manage globe-specific representations of shapes. Typically used to manage per-globe state
when the application associates the same shape with multiple WorldWindows.
getEntry(gov.nasa.worldwind.globes.Globe) is called.
| Nested Class Summary | |
|---|---|
static class |
ShapeDataCache.ShapeDataCacheEntry
|
| Field Summary | |
|---|---|
protected HashMap<Globe,ShapeDataCache.ShapeDataCacheEntry> |
entries
This cache's map of entries. |
protected long |
maxTimeSinceLastUsed
The maximum number of milliseconds an entry may remain in the cache without being used. |
| Constructor Summary | |
|---|---|
ShapeDataCache(long maxTimeSinceLastUsed)
Construct a cache with a specified entry lifetime. |
|
| Method Summary | |
|---|---|
void |
addEntry(ShapeDataCache.ShapeDataCacheEntry entry)
Adds a specified entry to the cache or replaces an entry associated with the same globe. |
void |
clearExtents()
Set to null the extent field of all entries in this cache. |
ShapeDataCache.ShapeDataCacheEntry |
getEntry(Globe globe)
Retrieves a specified entry from the cache. |
Iterator<ShapeDataCache.ShapeDataCacheEntry> |
iterator()
|
void |
removeAllEntries()
Remove all entries from this cache. |
void |
setAllExpired(boolean isExpired)
Set all entries in this cache to a specified expiration state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap<Globe,ShapeDataCache.ShapeDataCacheEntry> entries
protected long maxTimeSinceLastUsed
| Constructor Detail |
|---|
public ShapeDataCache(long maxTimeSinceLastUsed)
maxTimeSinceLastUsed - the maximum number of milliseconds an entry may remain in the cache without being
used.| Method Detail |
|---|
public void addEntry(ShapeDataCache.ShapeDataCacheEntry entry)
entry - the entry to add. If null, the cache remains unchanged.public void clearExtents()
public ShapeDataCache.ShapeDataCacheEntry getEntry(Globe globe)
globe - the globe the entry is associated with.
public Iterator<ShapeDataCache.ShapeDataCacheEntry> iterator()
iterator in interface Iterable<ShapeDataCache.ShapeDataCacheEntry>public void removeAllEntries()
public void setAllExpired(boolean isExpired)
isExpired - the expiration state.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||