public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }
public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
public TransportConfiguration getBackupForConnector(final Connector connector) { for (TopologyMemberImpl member : topology.values()) { if (member.getLive() != null && connector.isEquivalent(member.getLive().getParams())) { return member.getBackup(); } } return null; }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }
@Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; // if the connector has never been used (i.e. the getConnection hasn't been called yet), we will need // to create a connector just to validate if the parameters are ok. // so this will create the instance to be used on the isEquivalent check if (localConnector == null) { localConnector = connectorFactory.createConnector(currentConnectorConfig.getParams(), new DelegatingBufferHandler(), this, closeExecutor, threadPool, scheduledThreadPool, clientProtocolManager); } if (localConnector.isEquivalent(live.getParams()) && backUp != null && !localConnector.isEquivalent(backUp.getParams())) { if (logger.isDebugEnabled()) { logger.debug("Setting up backup config = " + backUp + " for live = " + live); } backupConfig = backUp; } else { if (logger.isDebugEnabled()) { logger.debug("ClientSessionFactoryImpl received backup update for live/backup pair = " + live + " / " + backUp + " but it didn't belong to " + currentConnectorConfig); } } }