|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.maps.client.geocode.GeocodeCache
com.google.gwt.maps.client.geocode.FactualGeocodeCache
public final class FactualGeocodeCache
This class refines the basic GeocodeCache class by placing stricter conditions on cached replies. It only caches replies which are very unlikely to change within a short period of time.
Field Summary |
---|
Fields inherited from class com.google.gwt.maps.client.geocode.GeocodeCache |
---|
jsoPeer |
Constructor Summary | |
---|---|
FactualGeocodeCache()
Constructs a new cache that only caches replies which are very unlikely to change within a short period of time. |
Method Summary | |
---|---|
com.google.gwt.core.client.JavaScriptObject |
get(java.lang.String address)
Returns the reply which was stored under the given address. |
boolean |
isCacheable(com.google.gwt.core.client.JavaScriptObject reply)
Returns whether or not the given reply should be cached. |
void |
put(java.lang.String address,
com.google.gwt.core.client.JavaScriptObject reply)
Stores the given reply under the given address. |
void |
reset()
Purges all replies from the cache. |
java.lang.String |
toCanonical(java.lang.String address)
Returns what is considered a canonical version of the address. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FactualGeocodeCache()
Method Detail |
---|
public com.google.gwt.core.client.JavaScriptObject get(java.lang.String address)
GeocodeCache
null
get
in class GeocodeCache
address
- the address used as a key to lookup.
public boolean isCacheable(com.google.gwt.core.client.JavaScriptObject reply)
GeocodeCache
null
and that it has
the name field . This method may be overridden by extending classes to
provide more precise conditions on the reply object.
isCacheable
in class GeocodeCache
reply
- the reply to test.
public void put(java.lang.String address, com.google.gwt.core.client.JavaScriptObject reply)
GeocodeCache
GeocodeCache.isCacheable(com.google.gwt.core.client.JavaScriptObject)
method to verify that the reply may be cached. If it
gets a go-ahead, it caches the reply under the address normalized with the
help of the GeocodeCache.toCanonical(java.lang.String)
method.
put
in class GeocodeCache
address
- the address used in the query.reply
- the reply value to cache.public void reset()
GeocodeCache
reset
in class GeocodeCache
public java.lang.String toCanonical(java.lang.String address)
GeocodeCache
toCanonical
in class GeocodeCache
address
- the address to convert to canonical form.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |