@Override public void shutdown() { try { this.timer.cancel(); for (ChannelWrapper cw : this.channelTables.values()) { this.closeChannel(null, cw.getChannel()); } this.channelTables.clear(); if (this.remotingEventExecutor != null) { this.remotingEventExecutor.shutdown(); } clientShutdown(); } catch (Exception e) { LOGGER.error("NettyRemotingClient shutdown exception, ", e); } if (this.publicExecutor != null) { try { this.publicExecutor.shutdown(); } catch (Exception e) { LOGGER.error("NettyRemotingServer shutdown exception, ", e); } } }
@Override public void start() throws RemotingException { clientStart(); // 每隔1秒扫描下异步调用超时情况 this.timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { AbstractRemotingClient.this.scanResponseTable(); } catch (Exception e) { LOGGER.error("scanResponseTable exception", e); } } }, 1000 * 3, 1000); if (this.channelEventListener != null) { this.remotingEventExecutor.start(); } }
@Override public void run() { LOGGER.info(this.getServiceName() + " service started"); while (!this.isStopped()) { try { RemotingEvent event = this.eventQueue.poll(3000, TimeUnit.MILLISECONDS); LOGGER.warn(this.getServiceName() + " service has exception. ", e); LOGGER.info(this.getServiceName() + " service end");
@Override public void shutdown() { try { this.timer.cancel(); for (ChannelWrapper cw : this.channelTables.values()) { this.closeChannel(null, cw.getChannel()); } this.channelTables.clear(); if (this.remotingEventExecutor != null) { this.remotingEventExecutor.shutdown(); } clientShutdown(); } catch (Exception e) { LOGGER.error("NettyRemotingClient shutdown exception, ", e); } if (this.publicExecutor != null) { try { this.publicExecutor.shutdown(); } catch (Exception e) { LOGGER.error("NettyRemotingServer shutdown exception, ", e); } } }
@Override public void shutdown() { try { if (this.timer != null) { this.timer.cancel(); } if (this.remotingEventExecutor != null) { this.remotingEventExecutor.shutdown(); } serverShutdown(); } catch (Exception e) { LOGGER.error("RemotingServer shutdown exception, ", e); } if (this.publicExecutor != null) { try { this.publicExecutor.shutdown(); } catch (Exception e) { LOGGER.error("RemotingServer shutdown exception, ", e); } } }
@Override public final void start() throws RemotingException { serverStart(); if (channelEventListener != null) { this.remotingEventExecutor.start(); } // 每隔1秒扫描下异步调用超时情况 this.timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { AbstractRemotingServer.this.scanResponseTable(); } catch (Exception e) { LOGGER.error("scanResponseTable exception", e); } } }, 1000 * 3, 1000); }
@Override public void start() throws RemotingException { clientStart(); // 每隔1秒扫描下异步调用超时情况 this.timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { AbstractRemotingClient.this.scanResponseTable(); } catch (Exception e) { LOGGER.error("scanResponseTable exception", e); } } }, 1000 * 3, 1000); if (this.channelEventListener != null) { this.remotingEventExecutor.start(); } }
public void putRemotingEvent(final RemotingEvent event) { this.remotingEventExecutor.putRemotingEvent(event); }
@Override public void run() { LOGGER.info(this.getServiceName() + " service started"); while (!this.isStopped()) { try { RemotingEvent event = this.eventQueue.poll(3000, TimeUnit.MILLISECONDS); LOGGER.warn(this.getServiceName() + " service has exception. ", e); LOGGER.info(this.getServiceName() + " service end");
@Override public void run() { LOGGER.info(this.getServiceName() + " service started"); while (!this.isStopped()) { try { RemotingEvent event = this.eventQueue.poll(3000, TimeUnit.MILLISECONDS); LOGGER.warn(this.getServiceName() + " service has exception. ", e); LOGGER.info(this.getServiceName() + " service end");
@Override public void shutdown() { try { if (this.timer != null) { this.timer.cancel(); } if (this.remotingEventExecutor != null) { this.remotingEventExecutor.shutdown(); } serverShutdown(); } catch (Exception e) { LOGGER.error("RemotingServer shutdown exception, ", e); } if (this.publicExecutor != null) { try { this.publicExecutor.shutdown(); } catch (Exception e) { LOGGER.error("RemotingServer shutdown exception, ", e); } } }
@Override public void shutdown() { try { if (this.timer != null) { this.timer.cancel(); } if (this.remotingEventExecutor != null) { this.remotingEventExecutor.shutdown(); } serverShutdown(); } catch (Exception e) { LOGGER.error("RemotingServer shutdown exception, ", e); } if (this.publicExecutor != null) { try { this.publicExecutor.shutdown(); } catch (Exception e) { LOGGER.error("RemotingServer shutdown exception, ", e); } } }
@Override public void shutdown() { try { this.timer.cancel(); for (ChannelWrapper cw : this.channelTables.values()) { this.closeChannel(null, cw.getChannel()); } this.channelTables.clear(); if (this.remotingEventExecutor != null) { this.remotingEventExecutor.shutdown(); } clientShutdown(); } catch (Exception e) { LOGGER.error("NettyRemotingClient shutdown exception, ", e); } if (this.publicExecutor != null) { try { this.publicExecutor.shutdown(); } catch (Exception e) { LOGGER.error("NettyRemotingServer shutdown exception, ", e); } } }
@Override public final void start() throws RemotingException { serverStart(); if (channelEventListener != null) { this.remotingEventExecutor.start(); } // 每隔1秒扫描下异步调用超时情况 this.timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { AbstractRemotingServer.this.scanResponseTable(); } catch (Exception e) { LOGGER.error("scanResponseTable exception", e); } } }, 1000 * 3, 1000); }
@Override public final void start() throws RemotingException { serverStart(); if (channelEventListener != null) { this.remotingEventExecutor.start(); } // 每隔1秒扫描下异步调用超时情况 this.timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { AbstractRemotingServer.this.scanResponseTable(); } catch (Exception e) { LOGGER.error("scanResponseTable exception", e); } } }, 1000 * 3, 1000); }
@Override public void start() throws RemotingException { clientStart(); // 每隔1秒扫描下异步调用超时情况 this.timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { AbstractRemotingClient.this.scanResponseTable(); } catch (Exception e) { LOGGER.error("scanResponseTable exception", e); } } }, 1000 * 3, 1000); if (this.channelEventListener != null) { this.remotingEventExecutor.start(); } }
public void putRemotingEvent(final RemotingEvent event) { this.remotingEventExecutor.putRemotingEvent(event); }
public void putRemotingEvent(final RemotingEvent event) { this.remotingEventExecutor.putRemotingEvent(event); }