LimeWire Consolidated API

com.limegroup.gnutella
Interface PushEndpointCache

All Superinterfaces:
PushEndpointService

public interface PushEndpointCache
extends PushEndpointService


Method Summary
 void clear()
           
 PushEndpoint getCached(GUID guid)
          Should only be used internally by PushEndpoint implementations.
 void overwriteProxies(byte[] guid, Set<? extends IpPort> newSet)
          Sets a new set of proxies overwriting the exiting one.
 void overwriteProxies(byte[] guid, String httpString)
          Overwrites the current known push proxies for the host specified by the GUID, using the the proxies as written in the httpString.
 void removePushProxy(byte[] bytes, IpPort pushProxy)
          Removes the push proxies from the set of push proxies of the push endpoint in the cache.
 void setAddr(byte[] guid, IpPort addr)
          updates the external address of all PushEndpoints for the given guid
 void setFWTVersionSupported(byte[] guid, int version)
          Sets the fwt version supported for all PEs pointing to the given client guid.
 GUID updateProxiesFor(GUID guid, PushEndpoint pushEndpoint, boolean valid)
          Adds or removes the given set of ip ports depending on valid.
 
Methods inherited from interface com.limegroup.gnutella.dht.db.PushEndpointService
findPushEndpoint, getPushEndpoint
 

Method Detail

clear

void clear()

getCached

PushEndpoint getCached(GUID guid)
Should only be used internally by PushEndpoint implementations.

For retrieving a value from the cache use #getPushEndpoint().


overwriteProxies

void overwriteProxies(byte[] guid,
                      String httpString)
Overwrites the current known push proxies for the host specified by the GUID, using the the proxies as written in the httpString.

Parameters:
guid - the guid whose proxies to overwrite
httpString - comma-separated list of proxies and possible proxy features

overwriteProxies

void overwriteProxies(byte[] guid,
                      Set<? extends IpPort> newSet)
Sets a new set of proxies overwriting the exiting one.


setAddr

void setAddr(byte[] guid,
             IpPort addr)
updates the external address of all PushEndpoints for the given guid


setFWTVersionSupported

void setFWTVersionSupported(byte[] guid,
                            int version)
Sets the fwt version supported for all PEs pointing to the given client guid.


updateProxiesFor

GUID updateProxiesFor(GUID guid,
                      PushEndpoint pushEndpoint,
                      boolean valid)
Adds or removes the given set of ip ports depending on valid.

Parameters:
valid - if false removes proxies otherwise adds them
Returns:
the guid of the push endpoint a client should hold onto to keep the values in the cache

removePushProxy

void removePushProxy(byte[] bytes,
                     IpPort pushProxy)
Removes the push proxies from the set of push proxies of the push endpoint in the cache.

Parameters:
bytes - the bytes of the guid of the push endpoint
pushProxy - the push proxy to remove

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.