org.discotools.io.aprs
Class AprsCache

java.lang.Object
  extended by org.discotools.io.aprs.AprsCache

public class AprsCache
extends Object

Author:
kengu

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

STATION_LIMIT

public static final int STATION_LIMIT
Default 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.

See Also:
Constant Field Values

PACKET_LIMIT

public static final int PACKET_LIMIT
Default 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.

See Also:
Constant Field Values

PACKET_LIFETIME

public static final long PACKET_LIFETIME
Default 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.

See Also:
Constant Field Values
Constructor Detail

AprsCache

public AprsCache()
Default constructor


AprsCache

public AprsCache(int limit,
                 long lifetime,
                 AprsVicinityPlot plot)
Configurable cache constructor

Parameters:
limit -
lifetime -
plot -
Method Detail

contains

public boolean contains(AprsReport aprs)

contains

public boolean contains(String callSign)

get

public AprsStation get(String callSign)

cache

public AprsStation cache(AprsReport aprs)

purge

public void purge(boolean deep)

addListener

public boolean addListener(AprsCacheListener listener)

removeListener

public boolean removeListener(AprsCacheListener listener)

create

protected AprsStation create(AprsReport aprs)

create

protected AprsStation create(String callSign,
                             String path,
                             String status,
                             com.vividsolutions.jts.geom.Point location)

getListeners

protected AprsCacheListener[] getListeners()


Copyright © 2012-2013 DISCO Foundation. All Rights Reserved.