|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.geocoder.ReverseGeocodeCache
public class ReverseGeocodeCache
Constructor Summary | |
---|---|
ReverseGeocodeCache()
Constructor |
|
ReverseGeocodeCache(int maxSize,
long maxAgeMS)
Constructor |
Method Summary | |
---|---|
boolean |
addReverseGeocode(GeoPoint gp,
ReverseGeocode rg)
Adds the specified ReverseGeocode to the cache for the specified GeoPoint. |
long |
getMaximumAgeMS()
Gets the maximum entry age, in milliseconds |
int |
getMaximumSize()
Gets the maximum cache size |
ReverseGeocode |
getReverseGeocode(GeoPoint gp)
Gets the cached ReverseGeocode for the specified GeoPoint, or null if no ReverseGeocode exists for the specified GeoPoint. |
int |
getSize()
Gets the current size of the memory cache |
int |
getSizeCutbackCount()
|
static void |
main(java.lang.String[] argv)
Main testing/debugging entry point |
void |
setMaximumAgeMS(long maxAgeMS)
Sets the maximum entry age, in milliseconds |
void |
setMaximumSize(int maxSize)
Sets the maximum cache size |
void |
setTrimOnAdd(boolean trim)
Sets the trim-on-add attribute |
boolean |
startAutoTrimThread(long intervalMS)
Starts the "trim" thread. |
void |
stopAutoTrimThread()
Stop the "trim" thread. |
protected void |
trimCache()
Trims/removes aged/excessive entries from cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReverseGeocodeCache()
public ReverseGeocodeCache(int maxSize, long maxAgeMS)
Method Detail |
---|
public int getSize()
public int getSizeCutbackCount()
public void setMaximumSize(int maxSize)
public int getMaximumSize()
public void setMaximumAgeMS(long maxAgeMS)
public long getMaximumAgeMS()
public void setTrimOnAdd(boolean trim)
protected void trimCache()
public boolean startAutoTrimThread(long intervalMS)
public void stopAutoTrimThread()
public ReverseGeocode getReverseGeocode(GeoPoint gp)
public boolean addReverseGeocode(GeoPoint gp, ReverseGeocode rg)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |