//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: @Override public void startup() throws LifeCycleException public override void startup() { base.startup(); scheduledService = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("RpcTaskScannerThread", true)); scheduledService.scheduleWithFixedDelay(new TempRunnable(scanList), 10000, 10000, TimeUnit.MILLISECONDS); }
public void start() { scheduler = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("timeout")); scheduler.scheduleWithFixedDelay(() => { long now = DateTimeHelper.CurrentUnixTimeMillis(); _protocolServer.Timeouts.tick(now); }, 0, 10, TimeUnit.MILLISECONDS); }
public override void Start() { Scheduler = Executors.newSingleThreadScheduledExecutor(daemon("timeout-clusterClient", Monitors.newMonitor(typeof(NamedThreadFactory.Monitor)))); TickFuture = Scheduler.scheduleWithFixedDelay(() => { long now = DateTimeHelper.CurrentUnixTimeMillis(); Server.Timeouts.tick(now); }, 0, 10, TimeUnit.MILLISECONDS); }
public override void Init() { _chunkSize = _config.ChunkSize; assertChunkSizeIsWithinFrameSize(_chunkSize, _frameLength); string className = this.GetType().Name; _targetCallExecutor = newCachedThreadPool(named(className + ":" + _config.ServerAddress.Port)); _unfinishedTransactionExecutor = newScheduledThreadPool(2, named("Unfinished transactions")); _silentChannelExecutor = newSingleThreadScheduledExecutor(named("Silent channel reaper")); _silentChannelExecutor.scheduleWithFixedDelay(_connectedSlaveChannels, 5, 5, TimeUnit.SECONDS); }