|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.PongCacher
This class caches pongs from the network. Caching pongs saves considerable bandwidth because only a controlled number of pings are sent to maintain adequate host data, with Ultrapeers caching and responding to pings with the best pongs available.
Field Summary | |
static int |
NUM_HOPS
Constant for the number of hops to keep track of in our pong cache. |
static int |
NUM_PONGS_PER_HOP
Constant for the number of pongs to store per hop. |
Method Summary | |
void |
addPong(PingReply pr)
Adds the specified PingReply instance to the cache of pongs. |
java.util.List |
getBestPongs()
Accessor for the Set of cached pongs. |
static PongCacher |
instance()
Returns the single PongCacher instance. |
boolean |
needsPongs()
Returns whether or not we need pongs for the cacher. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NUM_PONGS_PER_HOP
public static final int NUM_HOPS
Method Detail |
public static PongCacher instance()
public java.util.List getBestPongs()
public void addPong(PingReply pr)
pr
- the PingReply to addpublic boolean needsPongs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |