@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O server boss #" + id, determiner); }
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O boss #" + id, determiner); }
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O worker #" + id, determiner); }
workerThread = threadFactory.newThread(new ThreadRenamingRunnable( worker, "Hashed wheel timer #" + id.incrementAndGet(), determiner));
new ThreadRenamingRunnable( new OioWorker(channel), "Old I/O client worker (" + channel + ')',
DeadLockProofWorker.start( workerExecutor, new ThreadRenamingRunnable( new OioWorker(acceptedChannel), "Old I/O server worker (parentId: " +
private void bind( OioServerSocketChannel channel, ChannelFuture future, SocketAddress localAddress) { boolean bound = false; boolean bossStarted = false; try { channel.socket.bind(localAddress, channel.getConfig().getBacklog()); bound = true; future.setSuccess(); localAddress = channel.getLocalAddress(); fireChannelBound(channel, localAddress); Executor bossExecutor = ((OioServerSocketChannelFactory) channel.getFactory()).bossExecutor; DeadLockProofWorker.start( bossExecutor, new ThreadRenamingRunnable( new Boss(channel), "Old I/O server boss (" + channel + ')', determiner)); bossStarted = true; } catch (Throwable t) { future.setFailure(t); fireExceptionCaught(channel, t); } finally { if (!bossStarted && bound) { close(channel, future); } } }
private void bind( OioDatagramChannel channel, ChannelFuture future, SocketAddress localAddress) { boolean bound = false; boolean workerStarted = false; try { channel.socket.bind(localAddress); bound = true; // Fire events future.setSuccess(); fireChannelBound(channel, channel.getLocalAddress()); // Start the business. DeadLockProofWorker.start( workerExecutor, new ThreadRenamingRunnable( new OioDatagramWorker(channel), "Old I/O datagram worker (" + channel + ')', determiner)); workerStarted = true; } catch (Throwable t) { future.setFailure(t); fireExceptionCaught(channel, t); } finally { if (bound && !workerStarted) { AbstractOioWorker.close(channel, future); } } }
new ThreadRenamingRunnable( new OioDatagramWorker(channel), threadName, determiner)); } else {
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O server boss #" + id, determiner); }
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O boss #" + id, determiner); }
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O server boss #" + id, determiner); }
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O udp boss #" + id, determiner); }
@Override protected ThreadRenamingRunnable newThreadRenamingRunnable(int id, ThreadNameDeterminer determiner) { return new ThreadRenamingRunnable(this, "New I/O worker #" + id, determiner); }
public AgronaClientChannelFactory() { this.channelSink = new AgronaClientChannelSink(); // TODO: boss pool this.boss = new AgronaClientBoss(); this.bossExecutor = Executors.newFixedThreadPool(1); this.bossExecutor.execute(new ThreadRenamingRunnable(boss, "Agrona boss")); // TODO: worker pool this.worker = new AgronaWorker(); this.workerExecutor = Executors.newFixedThreadPool(1); this.workerExecutor.execute(new ThreadRenamingRunnable(worker, "Agrona worker")); }
public AgronaServerChannelFactory() { this.channelSink = new AgronaServerChannelSink(); // TODO: boss pool this.boss = new AgronaServerBoss(); this.bossExecutor = Executors.newFixedThreadPool(1); this.bossExecutor.execute(new ThreadRenamingRunnable(boss, "Agrona server boss")); // TODO: worker pool this.worker = new AgronaWorker(); this.workerExecutor = Executors.newFixedThreadPool(1); this.workerExecutor.execute(new ThreadRenamingRunnable(worker, "Agrona worker")); }
workerThread = threadFactory.newThread(new ThreadRenamingRunnable( worker, "Hashed wheel timer #" + id.incrementAndGet(), determiner));