use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class PacketHandler method startup.
public synchronized void startup() {
_keepReading = true;
for (int i = 0; i < _handlers.length; i++) {
I2PThread t = new I2PThread(_handlers[i], "UDP Packet handler " + (i + 1) + '/' + _handlers.length, true);
t.start();
}
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class UDPReceiver method startup.
/**
* Cannot be restarted (socket is final)
*/
public synchronized void startup() {
// adjustDropProbability();
_keepRunning = true;
I2PThread t = new I2PThread(_runner, _name, true);
t.start();
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class UDPSender method startup.
/**
* Cannot be restarted (socket is final)
*/
public synchronized void startup() {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Starting the runner: " + _name);
_keepRunning = true;
I2PThread t = new I2PThread(_runner, _name, true);
t.start();
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class InNetMessagePool method startup.
/**
* does nothing since we aren't threaded
*/
public synchronized void startup() {
_alive = true;
_dispatchThreaded = DEFAULT_DISPATCH_THREADED;
String threadedStr = _context.getProperty(PROP_DISPATCH_THREADED);
if (threadedStr != null) {
_dispatchThreaded = Boolean.parseBoolean(threadedStr);
}
if (_dispatchThreaded) {
_context.statManager().createRateStat("pool.dispatchDataTime", "How long a tunnel dispatch takes", "Tunnels", new long[] { 10 * 60 * 1000l, 60 * 60 * 1000l, 24 * 60 * 60 * 1000l });
_context.statManager().createRateStat("pool.dispatchGatewayTime", "How long a tunnel gateway dispatch takes", "Tunnels", new long[] { 10 * 60 * 1000l, 60 * 60 * 1000l, 24 * 60 * 60 * 1000l });
I2PThread data = new I2PThread(new TunnelDataDispatcher(), "Tunnel data dispatcher");
data.setDaemon(true);
data.start();
I2PThread gw = new I2PThread(new TunnelGatewayDispatcher(), "Tunnel gateway dispatcher");
gw.setDaemon(true);
gw.start();
}
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class JobQueue method startup.
/**
* Start the pumper.
* @since 0.9.19
*/
public void startup() {
_alive = true;
I2PThread pumperThread = new I2PThread(_pumper, "Job Queue Pumper", true);
pumperThread.setPriority(Thread.NORM_PRIORITY + 1);
pumperThread.start();
}
Aggregations