private static Map<String, Object> convertParameters(Map<String, Object> params) { if (params == null) { return null; } Map<String, Object> convertedParams = new HashMap<>(params.size()); for (Map.Entry<String, Object> entry: params.entrySet()) { convertedParams.put(convertParameter(entry.getKey()), entry.getValue()); } return convertedParams; }
/** * Replaces class name and parameter names to HornetQ values. */ private static TransportConfiguration convertTransport(TransportConfiguration tc) { if (tc != null) { String className = tc.getFactoryClassName().replace("org.apache.activemq.artemis", "org.hornetq").replace("ActiveMQ", "HornetQ"); return new TransportConfiguration(className, convertParameters(tc.getParams()), tc.getName()); } return tc; }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }
@Override public void nodeUP(final TopologyMember topologyMember, final boolean last) { try { final Pair<TransportConfiguration, TransportConfiguration> connectorPair = BackwardsCompatibilityUtils.checkTCPPairConversion(channel0.getConnection().getChannelVersion(), topologyMember); final String nodeID = topologyMember.getNodeId(); // Using an executor as most of the notifications on the Topology // may come from a channel itself // What could cause deadlocks entry.connectionExecutor.execute(new Runnable() { @Override public void run() { if (channel0.supports(PacketImpl.CLUSTER_TOPOLOGY_V3)) { channel0.send(new ClusterTopologyChangeMessage_V3(topologyMember.getUniqueEventID(), nodeID, topologyMember.getBackupGroupName(), topologyMember.getScaleDownGroupName(), connectorPair, last)); } else if (channel0.supports(PacketImpl.CLUSTER_TOPOLOGY_V2)) { channel0.send(new ClusterTopologyChangeMessage_V2(topologyMember.getUniqueEventID(), nodeID, topologyMember.getBackupGroupName(), connectorPair, last)); } else { channel0.send(new ClusterTopologyChangeMessage(nodeID, connectorPair, last)); } } }); } catch (RejectedExecutionException ignored) { // this could happen during a shutdown and we don't care, if we lost a nodeDown during a shutdown // what can we do anyways? } }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }
private static Map<String, Object> convertParameters(Map<String, Object> params) { if (params == null) { return null; } Map<String, Object> convertedParams = new HashMap<>(params.size()); for (Map.Entry<String, Object> entry: params.entrySet()) { convertedParams.put(convertParameter(entry.getKey()), entry.getValue()); } return convertedParams; }
/** * Replaces class name and parameter names to HornetQ values. */ private static TransportConfiguration convertTransport(TransportConfiguration tc) { if (tc != null) { String className = tc.getFactoryClassName().replace("org.apache.activemq.artemis", "org.hornetq").replace("ActiveMQ", "HornetQ"); return new TransportConfiguration(className, convertParameters(tc.getParams()), tc.getName()); } return tc; }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }
private static Map<String, Object> convertParameters(Map<String, Object> params) { if (params == null) { return null; } Map<String, Object> convertedParams = new HashMap<>(params.size()); for (Map.Entry<String, Object> entry: params.entrySet()) { convertedParams.put(convertParameter(entry.getKey()), entry.getValue()); } return convertedParams; }
/** * Replaces class name and parameter names to HornetQ values. */ private static TransportConfiguration convertTransport(TransportConfiguration tc) { if (tc != null) { String className = tc.getFactoryClassName().replace("org.apache.activemq.artemis", "org.hornetq").replace("ActiveMQ", "HornetQ"); return new TransportConfiguration(className, convertParameters(tc.getParams()), tc.getName()); } return tc; }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }
private static Map<String, Object> convertParameters(Map<String, Object> params) { if (params == null) { return null; } Map<String, Object> convertedParams = new HashMap<>(params.size()); for (Map.Entry<String, Object> entry: params.entrySet()) { convertedParams.put(convertParameter(entry.getKey()), entry.getValue()); } return convertedParams; }
/** * Replaces class name and parameter names to HornetQ values. */ private static TransportConfiguration convertTransport(TransportConfiguration tc) { if (tc != null) { String className = tc.getFactoryClassName().replace("org.apache.activemq.artemis", "org.hornetq").replace("ActiveMQ", "HornetQ"); return new TransportConfiguration(className, convertParameters(tc.getParams()), tc.getName()); } return tc; }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }
private static Map<String, Object> convertParameters(Map<String, Object> params) { if (params == null) { return null; } Map<String, Object> convertedParams = new HashMap<>(params.size()); for (Map.Entry<String, Object> entry: params.entrySet()) { convertedParams.put(convertParameter(entry.getKey()), entry.getValue()); } return convertedParams; }
/** * Replaces class name and parameter names to HornetQ values. */ private static TransportConfiguration convertTransport(TransportConfiguration tc) { if (tc != null) { String className = tc.getFactoryClassName().replace("org.apache.activemq.artemis", "org.hornetq").replace("ActiveMQ", "HornetQ"); return new TransportConfiguration(className, convertParameters(tc.getParams()), tc.getName()); } return tc; }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }
private static Map<String, Object> convertParameters(Map<String, Object> params) { if (params == null) { return null; } Map<String, Object> convertedParams = new HashMap<>(params.size()); for (Map.Entry<String, Object> entry: params.entrySet()) { convertedParams.put(convertParameter(entry.getKey()), entry.getValue()); } return convertedParams; }
/** * Replaces class name and parameter names to HornetQ values. */ private static TransportConfiguration convertTransport(TransportConfiguration tc) { if (tc != null) { String className = tc.getFactoryClassName().replace("org.apache.activemq.artemis", "org.hornetq").replace("ActiveMQ", "HornetQ"); return new TransportConfiguration(className, convertParameters(tc.getParams()), tc.getName()); } return tc; }
public static Pair<TransportConfiguration, TransportConfiguration> checkTCPPairConversion(int clientIncrementingVersion, TopologyMember member) { if (clientIncrementingVersion < INITIAL_ACTIVEMQ_INCREMENTING_VERSION) { return new Pair<>(convertTransport(member.getLive()), convertTransport(member.getBackup())); } return new Pair<>(member.getLive(), member.getBackup()); }