@Override public synchronized void stopStack(String cluster) { if(--connects == 0) super.stopStack(cluster); }
public void exit() { // 8 ProtocolStack stack=channel.getProtocolStack(); String cluster_name=channel.getClusterName(); try { JmxConfigurator.unregisterChannel(channel, Util.getMBeanServer(), "jgroups", "mperf"); } catch(Exception e) { } stack.stopStack(cluster_name); stack.destroy(); }
/** Removes the fork-channel from the fork-stack's hashmap and resets its state. Does <em>not</em> affect the * main-channel */ @Override public ForkChannel disconnect() { if(state != State.CONNECTED) return this; prot_stack.down(new Event(Event.DISCONNECT, local_addr)); // will be discarded by ForkProtocol prot_stack.stopStack(cluster_name); ((ForkProtocolStack)prot_stack).remove(fork_channel_id); nullFields(); state=State.OPEN; notifyChannelDisconnected(this); return this; }
protected JChannel stopStack(boolean stop, boolean destroy) { if(prot_stack != null) { try { if(stop) prot_stack.stopStack(cluster_name); if(destroy) prot_stack.destroy(); } catch(Exception e) { log.error(Util.getMessage("StackDestroyFailure"), e); } TP transport=prot_stack.getTransport(); if(transport != null) transport.unregisterProbeHandler(probe_handler); } return this; }
stack.stopStack(cluster_name); stack.destroy(); break;
@Override public synchronized void stopStack(String cluster) { if(--connects == 0) super.stopStack(cluster); }
prot_stack.stopStack(); prot_stack.destroy();
/** * Disconnects the channel if it is connected. If the channel is closed, this operation is ignored<BR> * Otherwise the following actions happen in the listed order<BR> * <ol> * <li> The JChannel sends a DISCONNECT event down the protocol stack<BR> * <li> Blocks until the event has returned<BR> * <li> Sends a STOP_QUEING event down the stack<BR> * <li> Stops the protocol stack by calling ProtocolStack.stop()<BR> * <li> Notifies the listener, if the listener is available<BR> * </ol> */ public synchronized void disconnect() { if(closed) return; if(connected) { if(cluster_name != null) { // Send down a DISCONNECT event, which travels down to the GMS, where a response is returned Event disconnect_event=new Event(Event.DISCONNECT, local_addr); down(disconnect_event); // DISCONNECT is handled by each layer } connected=false; try { prot_stack.stopStack(); // calls stop() in all protocols, from top to bottom } catch(Exception e) { if(log.isErrorEnabled()) log.error("exception: " + e); } notifyChannelDisconnected(this); init(); // sets local_addr=null; changed March 18 2003 (bela) -- prevented successful rejoining } }
public void exit() { // 8 ProtocolStack stack=channel.getProtocolStack(); String cluster_name=channel.getClusterName(); try { JmxConfigurator.unregisterChannel(channel, Util.getMBeanServer(), "jgroups", "mperf"); } catch(Exception e) { } stack.stopStack(cluster_name); stack.destroy(); }
/** Removes the fork-channel from the fork-stack's hashmap and resets its state. Does <em>not</em> affect the * main-channel */ @Override public ForkChannel disconnect() { if(state != State.CONNECTED) return this; prot_stack.down(new Event(Event.DISCONNECT, local_addr)); // will be discarded by ForkProtocol prot_stack.stopStack(cluster_name); ((ForkProtocolStack)prot_stack).remove(fork_channel_id); nullFields(); state=State.OPEN; notifyChannelDisconnected(this); return this; }
protected JChannel stopStack(boolean stop, boolean destroy) { if(prot_stack != null) { try { if(stop) prot_stack.stopStack(cluster_name); if(destroy) prot_stack.destroy(); } catch(Exception e) { log.error(Util.getMessage("StackDestroyFailure"), e); } TP transport=prot_stack.getTransport(); if(transport != null) transport.unregisterProbeHandler(probe_handler); } return this; }
stack.stopStack(cluster_name); stack.destroy(); break;