|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object network.IPCache
Field Summary | |
static java.lang.String |
IP_CACHE_FILENAME
file name of local cache of IPs of other users |
static java.lang.String |
SERVER_CACHE_FILENAME
file name of local cache of IPs of cache servers. |
Constructor Summary | |
IPCache(Network network,
int maxSize)
Creates a new IPCache. |
Method Summary | |
void |
addAddress(java.lang.String address)
Add an address to the IPCache. |
void |
reloadServers()
Add servers to cache list again, in case they were replaced during session and we then we lose all connections and need them again. |
java.lang.String |
removeAddress()
Removes an address from the IPCache. |
void |
save()
Save the IPCache to a local file. |
void |
save(java.io.File out)
Saves the IPCache to the given file. |
int |
size()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String IP_CACHE_FILENAME
public static final java.lang.String SERVER_CACHE_FILENAME
Constructor Detail |
public IPCache(Network network, int maxSize)
network
- The network the IPCache is for.maxSize
- The maximum number of IPs in the IPCache.Method Detail |
public void reloadServers()
public void save()
public void save(java.io.File out)
out
- The name of the local file in which to save the ipCachepublic java.lang.String removeAddress()
public void addAddress(java.lang.String address)
address
- The address to add.public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |