LimeWire Consolidated API

com.limegroup.gnutella
Interface PongCacher

All Known Implementing Classes:
PongCacherImpl

public interface PongCacher


Field Summary
static int EXPIRE_TIME
          Constant for the number of seconds to wait before expiring cached pongs.
static int EXPIRE_TIME_LOC
          Constant for expiring locale specific pongs
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.
 List<PingReply> getBestPongs(String loc)
          Accessor for the Set of cached pongs.
 

Field Detail

NUM_PONGS_PER_HOP

static final int NUM_PONGS_PER_HOP
Constant for the number of pongs to store per hop. Public to make testing easier.

See Also:
Constant Field Values

NUM_HOPS

static final int NUM_HOPS
Constant for the number of hops to keep track of in our pong cache.

See Also:
Constant Field Values

EXPIRE_TIME

static final int EXPIRE_TIME
Constant for the number of seconds to wait before expiring cached pongs.

See Also:
Constant Field Values

EXPIRE_TIME_LOC

static final int EXPIRE_TIME_LOC
Constant for expiring locale specific pongs

See Also:
Constant Field Values
Method Detail

getBestPongs

List<PingReply> getBestPongs(String loc)
Accessor for the Set of cached pongs. This List is unmodifiable and will throw IllegalOperationException if it is modified.

Returns:
the List of cached pongs -- continually updated

addPong

void addPong(PingReply pr)
Adds the specified PingReply instance to the cache of pongs.

Parameters:
pr - the PingReply to add

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.