@Override public io.netty.util.concurrent.ScheduledFuture<?> schedule(Runnable runnable, long l, TimeUnit timeUnit) { return delegate.schedule(runnable, l, timeUnit); }
@Override public <V> io.netty.util.concurrent.ScheduledFuture<V> schedule(Callable<V> callable, long l, TimeUnit timeUnit) { return delegate.schedule(callable, l, timeUnit); }
private void monitorDnsChange() { dnsMonitorFuture = connectionManager.getGroup().schedule(new Runnable() { @Override public void run() { if (connectionManager.isShuttingDown()) { return; } AtomicInteger counter = new AtomicInteger(masters.size() + slaves.size()); monitorMasters(counter); monitorSlaves(counter); } }, dnsMonitoringInterval, TimeUnit.MILLISECONDS); }
private void monitorDnsChange() { dnsMonitorFuture = connectionManager.getGroup().schedule(new Runnable() { @Override public void run() { if (connectionManager.isShuttingDown()) { return; } AtomicInteger counter = new AtomicInteger(masters.size() + slaves.size()); monitorMasters(counter); monitorSlaves(counter); } }, dnsMonitoringInterval, TimeUnit.MILLISECONDS); }
private void scheduleChangeCheck(final SentinelServersConfig cfg, final Iterator<RedisClient> iterator) { monitorFuture = group.schedule(new Runnable() { @Override public void run() { AtomicReference<Throwable> lastException = new AtomicReference<Throwable>(); Iterator<RedisClient> iter = iterator; if (iter == null) { iter = sentinels.values().iterator(); } checkState(cfg, iter, lastException); } }, cfg.getScanInterval(), TimeUnit.MILLISECONDS); }
private void scheduleChangeCheck(final SentinelServersConfig cfg, final Iterator<RedisClient> iterator) { monitorFuture = group.schedule(new Runnable() { @Override public void run() { AtomicReference<Throwable> lastException = new AtomicReference<Throwable>(); Iterator<RedisClient> iter = iterator; if (iter == null) { iter = sentinels.values().iterator(); } checkState(cfg, iter, lastException); } }, cfg.getScanInterval(), TimeUnit.MILLISECONDS); }
private void addPendingLookupRequests(long requestId, CompletableFuture<LookupDataResult> future) { pendingLookupRequests.put(requestId, future); eventLoopGroup.schedule(() -> { if (!future.isDone()) { future.completeExceptionally(new TimeoutException( requestId + " lookup request timedout after ms " + operationTimeoutMs)); } }, operationTimeoutMs, TimeUnit.MILLISECONDS); }
public void schedule() { executor.getConnectionManager().getGroup().schedule(this, delay, TimeUnit.SECONDS); }
public void schedule() { executor.getConnectionManager().getGroup().schedule(this, delay, TimeUnit.SECONDS); }
private void scheduleClusterChangeCheck(final ClusterServersConfig cfg, final Iterator<URI> iterator) { monitorFuture = group.schedule(new Runnable() { @Override public void run() {
private void disableKeys(final String requestId, final Set<CacheKey> keys, long timeout) { for (CacheKey key : keys) { disabledKeys.put(key, requestId); cache.remove(key); } commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() { for (CacheKey cacheKey : keys) { disabledKeys.remove(cacheKey, requestId); } } }, timeout, TimeUnit.MILLISECONDS); }
private void disableKeys(final String requestId, final Set<CacheKey> keys, long timeout) { for (CacheKey key : keys) { disabledKeys.put(key, requestId); cache.remove(key); } commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() { for (CacheKey cacheKey : keys) { disabledKeys.remove(cacheKey, requestId); } } }, timeout, TimeUnit.MILLISECONDS); }
protected <T> void takeAsync(final RPromise<V> result, final long delay, final long timeoutInMicro, final RedisCommand<T> command, final Object ... params) { final long start = System.currentTimeMillis(); commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() {
protected <T> void takeAsync(final RPromise<V> result, final long delay, final long timeoutInMicro, final RedisCommand<T> command, final Object ... params) { final long start = System.currentTimeMillis(); commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() {
private void scheduleCheckAndUpdateHealthyServers() { clientFactory.eventLoopGroup().schedule( () -> checkAndUpdateHealthyServers().thenRun(this::scheduleCheckAndUpdateHealthyServers), retryInterval.toMillis(), TimeUnit.MILLISECONDS); }
commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() { commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() { } else { final long start = System.currentTimeMillis(); commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() {
commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() { commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() { } else { final long start = System.currentTimeMillis(); commandExecutor.getConnectionManager().getGroup().schedule(new Runnable() { @Override public void run() {
@Override public void initChannel(SocketChannel ch) throws Exception { SaslServerHandler saslHandler = new SaslServerHandler(config); final Rpc newRpc = Rpc.createServer(saslHandler, config, ch, group); saslHandler.rpc = newRpc; Runnable cancelTask = new Runnable() { @Override public void run() { LOG.warn("Timed out waiting for the completion of SASL negotiation " + "between HiveServer2 and the Remote Spark Driver."); newRpc.close(); } }; saslHandler.cancelTask = group.schedule(cancelTask, RpcServer.this.config.getConnectTimeoutMs(), TimeUnit.MILLISECONDS); } })
final ScheduledFuture<?> scheduledFuture = redisClient.getEventLoopGroup().schedule(new Runnable() { @Override public void run() {
final ScheduledFuture<?> scheduledFuture = redisClient.getEventLoopGroup().schedule(new Runnable() { @Override public void run() {