private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
private void internalUpdateArray(long time) { synchronized (topologyArrayGuard) { Collection<TopologyMemberImpl> membersCopy = topology.getMembers(); Pair<TransportConfiguration, TransportConfiguration>[] topologyArrayLocal = (Pair<TransportConfiguration, TransportConfiguration>[]) Array.newInstance(Pair.class, membersCopy.size()); int count = 0; for (TopologyMemberImpl pair : membersCopy) { Pair<TransportConfiguration, TransportConfiguration> transportConfigs = pair.getConnector(); topologyArrayLocal[count++] = new Pair<>(protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getA()), protocolManagerFactory.adaptTransportConfiguration(transportConfigs.getB())); } this.topologyArray = topologyArrayLocal; } }
public XARecoveryConfig(final boolean ha, final TransportConfiguration[] transportConfiguration, final String username, final String password, final Map<String, String> properties, final ClientProtocolManagerFactory clientProtocolManager) { TransportConfiguration[] newTransportConfiguration = new TransportConfiguration[transportConfiguration.length]; for (int i = 0; i < transportConfiguration.length; i++) { if (clientProtocolManager != null) { newTransportConfiguration[i] = clientProtocolManager.adaptTransportConfiguration(transportConfiguration[i].newTransportConfig("")); } else { newTransportConfiguration[i] = transportConfiguration[i].newTransportConfig(""); } } this.transportConfiguration = newTransportConfiguration; this.discoveryConfiguration = null; this.username = username; this.password = password; this.ha = ha; this.properties = properties == null ? Collections.unmodifiableMap(new HashMap<String, String>()) : Collections.unmodifiableMap(properties); this.clientProtocolManager = clientProtocolManager; }
public XARecoveryConfig(final boolean ha, final TransportConfiguration[] transportConfiguration, final String username, final String password, final Map<String, String> properties, final ClientProtocolManagerFactory clientProtocolManager) { TransportConfiguration[] newTransportConfiguration = new TransportConfiguration[transportConfiguration.length]; for (int i = 0; i < transportConfiguration.length; i++) { if (clientProtocolManager != null) { newTransportConfiguration[i] = clientProtocolManager.adaptTransportConfiguration(transportConfiguration[i].newTransportConfig("")); } else { newTransportConfiguration[i] = transportConfiguration[i].newTransportConfig(""); } } this.transportConfiguration = newTransportConfiguration; this.discoveryConfiguration = null; this.username = username; this.password = password; this.ha = ha; this.properties = properties == null ? Collections.unmodifiableMap(new HashMap<String, String>()) : Collections.unmodifiableMap(properties); this.clientProtocolManager = clientProtocolManager; }