public PoolFiber(Executor pool, BatchExecutor executor, ScheduledExecutorService scheduler) { _flushExecutor = pool; _commandExecutor = executor; _scheduler = new SchedulerImpl(this, scheduler); _flushRunnable = new Runnable() { public void run() { flush(); } }; }
public PoolFiber(Executor pool, BatchExecutor executor, ScheduledExecutorService scheduler) { _flushExecutor = pool; _commandExecutor = executor; _scheduler = new SchedulerImpl(this, scheduler); _flushRunnable = new Runnable() { public void run() { flush(); } }; }
public ThreadFiber(RunnableExecutor queue, String threadName, boolean isDaemonThread){ this(queue, threadName, isDaemonThread, new SchedulerImpl(queue)); }
public ThreadFiber(RunnableExecutor queue, String threadName, boolean isDaemonThread){ this(queue, threadName, isDaemonThread, new SchedulerImpl(queue)); }
public NioFiberImpl(final NioBatchExecutor executor, Collection<NioChannelHandler> nioHandlers, String threadName, boolean isDaemonThread, WriteFailure writeFailed, OnBuffer onBuffer) { this.executor = executor; this.writeFailed = writeFailed; this.onBuffer = onBuffer; this.scheduler = new SchedulerImpl(this); try { this.selector = Selector.open(); } catch (IOException e) { throw new RuntimeException(e); } for (NioChannelHandler nioHandler : nioHandlers) { synchronousAdd(nioHandler); } queue = new QueueSwapper(selector); thread = new Thread(this, threadName); thread.setDaemon(isDaemonThread); }
public NioFiberImpl(final NioBatchExecutor executor, Collection<NioChannelHandler> nioHandlers, String threadName, boolean isDaemonThread, WriteFailure writeFailed, OnBuffer onBuffer) { this.executor = executor; this.writeFailed = writeFailed; this.onBuffer = onBuffer; this.scheduler = new SchedulerImpl(this); try { this.selector = Selector.open(); } catch (IOException e) { throw new RuntimeException(e); } for (NioChannelHandler nioHandler : nioHandlers) { synchronousAdd(nioHandler); } queue = new QueueSwapper(selector); thread = new Thread(this, threadName); thread.setDaemon(isDaemonThread); }