|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.discotools.io.aprs.AprsCache
public class AprsCache
Field Summary | |
---|---|
static long |
PACKET_LIFETIME
Default AprsReport lifetime, cached packets are
discarded after this amount of time. |
static int |
PACKET_LIMIT
Default AprsReport cache limit, the oldest packet
cached for each station is discarded when this limit is
reached. |
static int |
STATION_LIMIT
Default AprsStation cache limit. |
Constructor Summary | |
---|---|
AprsCache()
Default constructor |
|
AprsCache(int limit,
long lifetime,
AprsVicinityPlot plot)
Configurable cache constructor |
Method Summary | |
---|---|
boolean |
addListener(AprsCacheListener listener)
|
AprsStation |
cache(AprsReport aprs)
|
boolean |
contains(AprsReport aprs)
|
boolean |
contains(String callSign)
|
protected AprsStation |
create(AprsReport aprs)
|
protected AprsStation |
create(String callSign,
String path,
String status,
com.vividsolutions.jts.geom.Point location)
|
AprsStation |
get(String callSign)
|
protected AprsCacheListener[] |
getListeners()
|
void |
purge(boolean deep)
|
boolean |
removeListener(AprsCacheListener listener)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STATION_LIMIT
AprsStation
cache limit.
The oldest station is discarded when this limit is reached. A negative value indicates that station cache should grow forever. Default value is 1000 stations.
public static final int PACKET_LIMIT
AprsReport
cache limit, the oldest packet
cached for each station is discarded when this limit is
reached. A negative value indicates that cache should grow
forever. Default value is 2000 packets.
public static final long PACKET_LIFETIME
AprsReport
lifetime, cached packets are
discarded after this amount of time. A negative value indicates that
packets should be cached forever. Default value is 2 minutes.
Constructor Detail |
---|
public AprsCache()
public AprsCache(int limit, long lifetime, AprsVicinityPlot plot)
limit
- lifetime
- plot
- Method Detail |
---|
public boolean contains(AprsReport aprs)
public boolean contains(String callSign)
public AprsStation get(String callSign)
public AprsStation cache(AprsReport aprs)
public void purge(boolean deep)
public boolean addListener(AprsCacheListener listener)
public boolean removeListener(AprsCacheListener listener)
protected AprsStation create(AprsReport aprs)
protected AprsStation create(String callSign, String path, String status, com.vividsolutions.jts.geom.Point location)
protected AprsCacheListener[] getListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |