if(layer == null) return null; singleton_transports.put(singleton_name, new Tuple<>((TP)layer,new ProtocolStack.RefCounter((short)0,(short)0))); retval.add(layer);
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_starts=counter.incrementStartCount(); if(num_starts >= 1) { continue; counter.decrementStartCount(); up_prots.remove(cluster_name); throw ex;
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_starts=counter.incrementStartCount(); if(num_starts >= 1) { continue; counter.decrementStartCount(); up_prots.remove(cluster_name); throw ex;
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_starts=counter.incrementStartCount(); if(num_starts >= 1) { continue; counter.decrementStartCount(); up_prots.remove(cluster_name); throw ex;
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_starts=counter.decrementStartCount(); if(num_starts > 0) { continue; // don't call TP.stop() if we still have references to the transport
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_starts=counter.decrementStartCount(); if(num_starts > 0) { continue; // don't call TP.stop() if we still have references to the transport
if(layer == null) return null; singleton_transports.put(singleton_name, new Tuple<>((TP)layer,new ProtocolStack.RefCounter((short)0,(short)0))); retval.add(layer);
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_starts=counter.decrementStartCount(); if(num_starts > 0) { continue; // don't call TP.stop() if we still have references to the transport
if(layer == null) return null; singleton_transports.put(singleton_name, new Tuple<>((TP)layer,new ProtocolStack.RefCounter((short)0,(short)0))); retval.add(layer);
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_inits=counter.decrementInitCount(); if(num_inits >= 1) { continue;
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_inits=counter.decrementInitCount(); if(num_inits >= 1) { continue;
public void initProtocolStack() throws Exception { List<Protocol> protocols = getProtocols(); Collections.reverse(protocols); for(Protocol prot: protocols) { if(prot.getProtocolStack() == null) prot.setProtocolStack(this); if(prot instanceof TP) { TP transport=(TP)prot; if(transport.isSingleton()) { String singleton_name=transport.getSingletonName(); synchronized(singleton_transports) { Tuple<TP,RefCounter> val=singleton_transports.get(singleton_name); if(val == null) singleton_transports.put(singleton_name, new Tuple<>(transport,new RefCounter((short)1, (short)0))); else { RefCounter counter=val.getVal2(); short num_inits=counter.incrementInitCount(); if(num_inits >= 1) continue; } callAfterCreationHook(prot, prot.afterCreationHook()); prot.init(); // if shared TP, call init() with lock : https://issues.jboss.org/browse/JGRP-1887 continue; } } } callAfterCreationHook(prot, prot.afterCreationHook()); prot.init(); } }
public void initProtocolStack() throws Exception { List<Protocol> protocols = getProtocols(); Collections.reverse(protocols); for(Protocol prot: protocols) { if(prot.getProtocolStack() == null) prot.setProtocolStack(this); if(prot instanceof TP) { TP transport=(TP)prot; if(transport.isSingleton()) { String singleton_name=transport.getSingletonName(); synchronized(singleton_transports) { Tuple<TP,RefCounter> val=singleton_transports.get(singleton_name); if(val == null) singleton_transports.put(singleton_name, new Tuple<>(transport,new RefCounter((short)1, (short)0))); else { RefCounter counter=val.getVal2(); short num_inits=counter.incrementInitCount(); if(num_inits >= 1) continue; } callAfterCreationHook(prot, prot.afterCreationHook()); prot.init(); // if shared TP, call init() with lock : https://issues.jboss.org/browse/JGRP-1887 continue; } } } callAfterCreationHook(prot, prot.afterCreationHook()); prot.init(); } }
if(val != null) { ProtocolStack.RefCounter counter=val.getVal2(); short num_inits=counter.decrementInitCount(); if(num_inits >= 1) { continue;
public void initProtocolStack() throws Exception { List<Protocol> protocols = getProtocols(); Collections.reverse(protocols); for(Protocol prot: protocols) { if(prot.getProtocolStack() == null) prot.setProtocolStack(this); if(prot instanceof TP) { TP transport=(TP)prot; if(transport.isSingleton()) { String singleton_name=transport.getSingletonName(); synchronized(singleton_transports) { Tuple<TP,RefCounter> val=singleton_transports.get(singleton_name); if(val == null) singleton_transports.put(singleton_name, new Tuple<>(transport,new RefCounter((short)1, (short)0))); else { RefCounter counter=val.getVal2(); short num_inits=counter.incrementInitCount(); if(num_inits >= 1) continue; } callAfterCreationHook(prot, prot.afterCreationHook()); prot.init(); // if shared TP, call init() with lock : https://issues.jboss.org/browse/JGRP-1887 continue; } } } callAfterCreationHook(prot, prot.afterCreationHook()); prot.init(); } }