public class RatioWatcherUDP extends RatioWatcher
cachePunishmentProbability, force, lock, logger, punishmentFactor, stop, thread, time, tracker
Constructor and Description |
---|
RatioWatcherUDP(Logger logger,
long millis,
HostItem tracker)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeTrackerSocket()
Closes tracker socket
|
protected <T extends Payload> |
createProtocolP2PPacket(T payload)
Create packets
|
protected java.lang.Object |
getTrackerSocket()
Tracker socket getter
|
protected void |
writeLog(java.lang.Exception e,
LogLevel logLevel)
Implementation of writeLog
|
protected void |
writeLog(java.lang.String text,
LogLevel logLevel)
Implementation of writeLog
|
clean, getPunishmentProbability, run, setStop, setThread
protected void writeLog(java.lang.String text, LogLevel logLevel)
writeLog
in class RatioWatcher
text
- Text to loglogLevel
- level of loggingprotected void writeLog(java.lang.Exception e, LogLevel logLevel)
writeLog
in class RatioWatcher
e
- exception to loglogLevel
- level of loggingprotected <T extends Payload> ProtocolP2PPacket<T> createProtocolP2PPacket(T payload)
createProtocolP2PPacket
in class RatioWatcher
payload
- Payloadprotected java.lang.Object getTrackerSocket()
getTrackerSocket
in class RatioWatcher
protected void closeTrackerSocket()
closeTrackerSocket
in class RatioWatcher