@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { return next().scheduleWithFixedDelay(command, initialDelay, delay, unit); }
public PersistentAcknowledgmentsGroupingTracker(ConsumerImpl<?> consumer, ConsumerConfigurationData<?> conf, EventLoopGroup eventLoopGroup) { this.consumer = consumer; this.pendingIndividualAcks = new ConcurrentSkipListSet<>(); this.acknowledgementGroupTimeMicros = conf.getAcknowledgementsGroupTimeMicros(); if (acknowledgementGroupTimeMicros > 0) { scheduledTask = eventLoopGroup.next().scheduleWithFixedDelay(this::flush, acknowledgementGroupTimeMicros, acknowledgementGroupTimeMicros, TimeUnit.MICROSECONDS); } else { scheduledTask = null; } }
private void sessionCleaner() { if (null != blade.sessionManager()) { scheduleEventLoop. scheduleWithFixedDelay(new SessionCleaner(blade.sessionManager()), 1000, 1000, TimeUnit.MILLISECONDS); } }
private void sessionCleaner() { if (null != blade.sessionManager()) { scheduleEventLoop. scheduleWithFixedDelay(new SessionCleaner(blade.sessionManager()), 1000, 1000, TimeUnit.MILLISECONDS); } }
@Override public ScheduledFuture<?> scheduleWithFixedDelay( Runnable command, long initialDelay, long delay, TimeUnit unit) { return delegate().scheduleWithFixedDelay( context().makeContextAware(command), initialDelay, delay, unit); }
/** * Starts sending pings. */ public void startPing() { this.ping = this.channel.eventLoop().scheduleWithFixedDelay(this.client::ping, 60, 60, TimeUnit.SECONDS); }
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { return next().scheduleWithFixedDelay(command, initialDelay, delay, unit); }
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { return next().scheduleWithFixedDelay(command, initialDelay, delay, unit); }
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { return next().scheduleWithFixedDelay(command, initialDelay, delay, unit); }
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { return next().scheduleWithFixedDelay(command, initialDelay, delay, unit); }
ConnectionHandler() { final long pollIntervalMillis = Math.min(timeoutMillis, SECONDS.toMillis(1)); timeoutCheckTask = channel .eventLoop() .scheduleWithFixedDelay( () -> { final Request<?> head = outstanding.peek(); if (head == null) { return; } if (timeoutChecker.check(head)) { log.error("Request timeout: {} {}", channel, head); DefaultRawMemcacheClient.this.setDisconnected("Timeout"); } }, pollIntervalMillis, pollIntervalMillis, MILLISECONDS); }
public PersistentAcknowledgmentsGroupingTracker(ConsumerImpl<?> consumer, ConsumerConfigurationData<?> conf, EventLoopGroup eventLoopGroup) { this.consumer = consumer; this.pendingIndividualAcks = new ConcurrentSkipListSet<>(); this.acknowledgementGroupTimeMicros = conf.getAcknowledgementsGroupTimeMicros(); if (acknowledgementGroupTimeMicros > 0) { scheduledTask = eventLoopGroup.next().scheduleWithFixedDelay(this::flush, acknowledgementGroupTimeMicros, acknowledgementGroupTimeMicros, TimeUnit.MICROSECONDS); } else { scheduledTask = null; } }
@Override public ScheduledFuture<?> scheduleWithFixedDelay(Runnable action, long arg1, long arg2, TimeUnit arg3) { return getDelegate().scheduleWithFixedDelay(schedulingRunnable(action), arg1, arg2, arg3); }
@Override public void channelRegistered(ChannelHandlerContext ctx) throws Exception { super.channelRegistered(ctx); Channel c = ctx.channel(); channel.set(c); registeredFutureLatch.release(null); //release all futures waiting for channel registration to complete. log.info("Connection established {} ", ctx); c.write(new WireCommands.Hello(WireCommands.WIRE_VERSION, WireCommands.OLDEST_COMPATIBLE_VERSION), c.voidPromise()); ScheduledFuture<?> old = keepAliveFuture.getAndSet(c.eventLoop().scheduleWithFixedDelay(new KeepAliveTask(), 20, 10, TimeUnit.SECONDS)); if (old != null) { old.cancel(false); } }
private void sessionCleaner() { if (null != blade.sessionManager()) { scheduleEventLoop. scheduleWithFixedDelay(new SessionCleaner(blade.sessionManager()), 1000, 1000, TimeUnit.MILLISECONDS); } }