|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.util.PortsManager
public class PortsManager
Maintains a list of ports used on this host, associated with time stamps. The ports are persisted into the temp file system.
Constructor Summary | |
---|---|
PortsManager()
|
|
PortsManager(long expiry_time)
|
|
PortsManager(long expiry_time,
java.lang.String ports_file)
|
|
PortsManager(long expiry_time,
java.lang.String filename,
java.lang.String temp_dir)
|
|
PortsManager(java.lang.String ports_file)
|
Method Summary | |
---|---|
void |
deleteFile()
Deletes the underlying file. |
long |
getExpiryTime()
|
int |
getNextAvailablePort(int start_port)
Loads the file, weeds out expired ports, returns the next available port and saves the new port in the file |
void |
removePort(int port)
Loads the file, removes the port (if existent) and closes the file again |
void |
setExpiryTime(long expiry_time)
|
void |
updatePort(int port)
Updates the timestamp for the given port |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PortsManager()
public PortsManager(long expiry_time)
public PortsManager(java.lang.String ports_file)
public PortsManager(long expiry_time, java.lang.String ports_file)
public PortsManager(long expiry_time, java.lang.String filename, java.lang.String temp_dir)
Method Detail |
---|
public long getExpiryTime()
public void setExpiryTime(long expiry_time)
public int getNextAvailablePort(int start_port)
public void removePort(int port)
public void updatePort(int port)
port
- public void deleteFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |