public synchronized void start(int svc) throws ChannelException { super.start(svc); running = true; if ( thread == null ) { thread = new PingThread(); thread.setDaemon(true); thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); thread.start(); } //acquire the interceptors to invoke on send ping events ChannelInterceptor next = getNext(); while ( next != null ) { if ( next instanceof TcpFailureDetector ) failureDetector = new WeakReference<TcpFailureDetector>((TcpFailureDetector)next); if ( next instanceof StaticMembershipInterceptor ) staticMembers = new WeakReference<StaticMembershipInterceptor>((StaticMembershipInterceptor)next); next = next.getNext(); } }
@Override public synchronized void start(int svc) throws ChannelException { super.start(svc); running = true; if ( thread == null && useThread) { thread = new PingThread(); thread.setDaemon(true); thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); thread.start(); } //acquire the interceptors to invoke on send ping events ChannelInterceptor next = getNext(); while ( next != null ) { if ( next instanceof TcpFailureDetector ) failureDetector = new WeakReference<>((TcpFailureDetector)next); if ( next instanceof StaticMembershipInterceptor ) staticMembers = new WeakReference<>((StaticMembershipInterceptor)next); next = next.getNext(); } }
@Override public synchronized void start(int svc) throws ChannelException { super.start(svc); running = true; if ( thread == null && useThread) { thread = new PingThread(); thread.setDaemon(true); thread.setName("TcpPingInterceptor.PingThread-"+cnt.addAndGet(1)); thread.start(); } //acquire the interceptors to invoke on send ping events ChannelInterceptor next = getNext(); while ( next != null ) { if ( next instanceof TcpFailureDetector ) failureDetector = new WeakReference<TcpFailureDetector>((TcpFailureDetector)next); if ( next instanceof StaticMembershipInterceptor ) staticMembers = new WeakReference<StaticMembershipInterceptor>((StaticMembershipInterceptor)next); next = next.getNext(); } }
@Override public synchronized void start(int svc) throws ChannelException { super.start(svc); running = true; if ( thread == null && useThread) { thread = new PingThread(); thread.setDaemon(true); String channelName = ""; if (getChannel().getName() != null) channelName = "[" + getChannel().getName() + "]"; thread.setName("TcpPingInterceptor.PingThread" + channelName +"-"+cnt.addAndGet(1)); thread.start(); } //acquire the interceptors to invoke on send ping events ChannelInterceptor next = getNext(); while ( next != null ) { if ( next instanceof TcpFailureDetector ) failureDetector = new WeakReference<>((TcpFailureDetector)next); if ( next instanceof StaticMembershipInterceptor ) staticMembers = new WeakReference<>((StaticMembershipInterceptor)next); next = next.getNext(); } }