/** * Disconnects the channel if it is connected. If the channel is closed or disconnected, this * operation is ignored<br/> * The channel can then be connected to the same or a different cluster again. * * @see #connect(String) */ public void disconnect() { ch.disconnect(); }
@Override public void accept(JChannel channel) { channel.disconnect(); if (this.server != null) { try { JmxConfigurator.unregisterChannel(channel, this.server.get(), this.name); } catch (Exception e) { JGroupsLogger.ROOT_LOGGER.debug(e.getLocalizedMessage(), e); } } channel.close(); } }
protected JChannel _close(boolean disconnect) { Address old_addr=local_addr; if(state == State.CLOSED) return this; if(disconnect) disconnect(); // leave group if connected stopStack(true, true); state=State.CLOSED; notifyChannelClosed(this); init(); // sets local_addr=null; changed March 18 2003 (bela) -- prevented successful rejoining if(old_addr != null) NameCache.remove(old_addr); return this; }
@Override public void emergencyClose() { this.view = null; if (localAddress.getVmViewId() >= 0) { // keep track of old addresses that were used to successfully join the cluster usedDistributedMemberIdentifiers.add(localAddress); } if (this.myChannel != null) { if ((services.isShutdownDueToForcedDisconnect() && services.isAutoReconnectEnabled()) || services.getManager().isReconnectingDS()) { } else { this.myChannel.disconnect(); } } }
protected void applyNewConfig(byte[] buffer) { final InputStream in=new ByteArrayInputStream(buffer); Thread thread=new Thread(() -> { try { JChannel ch=new JChannel(in); Util.sleepRandom(1000, 5000); channel.disconnect(); JChannel tmp=channel; channel=ch; channel.setName(name); channel.setReceiver(MPerf.this); channel.connect("mperf"); local_addr=channel.getAddress(); JmxConfigurator.unregisterChannel(tmp, Util.getMBeanServer(), "jgroups", "mperf"); Util.close(tmp); JmxConfigurator.registerChannel(channel, Util.getMBeanServer(), "jgroups", "mperf", true); } catch(Exception e) { System.err.println("failed creating new channel"); } }); System.out.println("<< restarting channel"); thread.start(); }
/** * Disconnects the channel if it is connected. If the channel is closed or disconnected, this * operation is ignored<br/> * The channel can then be connected to the same or a different cluster again. * * @see #connect(String) */ public void disconnect() { ch.disconnect(); }
@Override public void disconnect() { channel.disconnect(); }
/** * Disconnects from the Cluster, preventing any Commands from being routed to this node. */ public void disconnect() { channel.disconnect(); if (!executorProvided) { executorService.shutdown(); } }
/** * Disconnects from the Cluster, preventing any Commands from being routed to this node. */ public void disconnect() { channel.disconnect(); if (!executorProvided) { executorService.shutdown(); } }
/** * Disconnect shared channel, called by producer and consumer. */ public void disconnect() { if (connectCount.decrementAndGet() == 0) { LOG.trace("Disconnecting JGroups Channel {}", getEndpointUri()); resolvedChannel.disconnect(); } }
public static synchronized void closeChannel(String channelName, JChannel channel) { channel.setReceiver(null); channel.disconnect(); channel.close(); JChannelWrapper<?> wrapper = channels.remove(channelName); if (wrapper == null) { throw new IllegalStateException("Did not find channel " + channelName); } } }
public void stop() throws Exception { if (channel != null) { log.info("Stopping {} ", getAddressAsString()); channel.disconnect(); clusterNodeSummary.disconnected(); } }
@Override public void shutdown() { super.shutdown(); refAllocationExecutor.shutdownNow(); channel.disconnect(); channel.close(); }
@Override public void close() { log.jGroupsDisconnectingAndClosingChannel( clusterName ); channel.disconnect(); channel.close(); }
@Override public void stop(StopContext context) { JChannel channel = this.getValue(); channel.disconnect(); try { JmxConfigurator.unregisterChannel(channel, this.server.getValue(), this.name); } catch (Exception e) { LOGGER.debug(e.getMessage(), e); } } }
public void onEvent(RuntimeStop event) { dispatcher.stop(); domainChannel.disconnect(); domainChannel.close(); } }
@Override public void close() { if ( ! isConnected() ) return; jGroupsChannel.disconnect(); jGroupsChannel.close(); }
@Override protected void doStop() throws Exception { shutdownExecutor(); isMaster = false; fireLeadershipChangedEvent(Optional.empty()); clearLock(); channel.disconnect(); }
public void disconnect() { transmitting = false; receiverThread.shutDown(); channel.disconnect(); control.disconnected(); setTitle("Not connected"); }
@Override public void emergencyClose() { this.view = null; if (this.myChannel != null) { if ((services.isShutdownDueToForcedDisconnect() && services.isAutoReconnectEnabled()) || services.getManager().isReconnectingDS()) { } else { this.myChannel.disconnect(); } } }