private void shutdownConnectors() { log.debug("Shutting down connectors"); Iterator<Object> it = connectors.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); final PerfMonAgentConnector conn = connectors.get(key); log.debug("Shutting down " + conn.toString()); //Fix ConcurrentModificationException if more than one host //connectors.remove(key); it.remove(); conn.disconnect(); } }
private void processConnectors() { for (Object key : connectors.keySet()) { PerfMonAgentConnector connector = connectors.get(key); try { connector.generateSamples(this); } catch (IOException e) { log.error(e.getMessage()); connectors.put(key, new UnavailableAgentConnector(e)); } } }
private void initiateConnectors() { oldValues.clear(); JMeterProperty prop = getMetricSettings(); connectors.clear(); if (!(prop instanceof CollectionProperty)) { log.warn("Got unexpected property: " + prop); return; } CollectionProperty rows = (CollectionProperty) prop; for (int i = 0; i < rows.size(); i++) { Object val = rows.get(i).getObjectValue(); if (val instanceof ArrayList) { ArrayList<JMeterProperty> row = (ArrayList<JMeterProperty>) val; String host = row.get(0).getStringValue(); int port = row.get(1).getIntValue(); String metric = row.get(2).getStringValue(); String params = row.get(3).getStringValue(); initiateConnector(host, port, i, metric, params); } } for (Object key : connectors.keySet()) { try { connectors.get(key).connect(); } catch (IOException ex) { log.error("Error connecting to agent", ex); connectors.put(key, new UnavailableAgentConnector(ex)); } } }
private void initiateConnectors() { oldValues.clear(); JMeterProperty prop = getMetricSettings(); connectors.clear(); if (!(prop instanceof CollectionProperty)) { log.warn("Got unexpected property: " + prop); return; } CollectionProperty rows = (CollectionProperty) prop; for (int i = 0; i < rows.size(); i++) { Object val = rows.get(i).getObjectValue(); if (val instanceof ArrayList) { ArrayList<JMeterProperty> row = (ArrayList<JMeterProperty>) val; String host = row.get(0).getStringValue(); int port = row.get(1).getIntValue(); String metric = row.get(2).getStringValue(); String params = row.get(3).getStringValue(); initiateConnector(host, port, i, metric, params); } } for (Object key : connectors.keySet()) { try { connectors.get(key).connect(); } catch (IOException ex) { log.error("Error connecting to agent", ex); connectors.put(key, new UnavailableAgentConnector(ex)); } } }
private void processConnectors() { for (Object key : connectors.keySet()) { PerfMonAgentConnector connector = connectors.get(key); try { connector.generateSamples(this); } catch (IOException e) { log.error(e.getMessage()); connectors.put(key, new UnavailableAgentConnector(e)); } } }
private void shutdownConnectors() { log.debug("Shutting down connectors"); Iterator<Object> it = connectors.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); final PerfMonAgentConnector conn = connectors.get(key); log.debug("Shutting down " + conn.toString()); //Fix ConcurrentModificationException if more than one host //connectors.remove(key); it.remove(); conn.disconnect(); } }
private void initiateConnectors() { oldValues.clear(); JMeterProperty prop = getMetricSettings(); connectors.clear(); if (!(prop instanceof CollectionProperty)) { log.warn("Got unexpected property: " + prop); return; } CollectionProperty rows = (CollectionProperty) prop; for (int i = 0; i < rows.size(); i++) { ArrayList<Object> row = (ArrayList<Object>) rows.get(i).getObjectValue(); String host = ((JMeterProperty) row.get(0)).getStringValue(); int port = ((JMeterProperty) row.get(1)).getIntValue(); String metric = ((JMeterProperty) row.get(2)).getStringValue(); String params = ((JMeterProperty) row.get(3)).getStringValue(); initiateConnector(host, port, i, metric, params); } for (Object key : connectors.keySet()) { try { connectors.get(key).connect(); } catch (IOException ex) { log.error("Error connecting to agent", ex); connectors.put(key, new UnavailableAgentConnector(ex)); } } }
private void processConnectors() { for (Object key : connectors.keySet()) { PerfMonAgentConnector connector = connectors.get(key); try { connector.generateSamples(this); } catch (IOException e) { log.error(e.getMessage()); connectors.put(key, new UnavailableAgentConnector(e)); } } }
private void shutdownConnectors() { log.debug("Shutting down connectors"); Iterator<Object> it = connectors.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); final PerfMonAgentConnector conn = connectors.get(key); log.debug("Shutting down " + conn.toString()); //Fix ConcurrentModificationException if more than one host //connectors.remove(key); it.remove(); conn.disconnect(); } }