/** clears any entry for the given key in the {@link Attributes#SERVICE_NOT_UP_INDICATORS} map */ public static void clearNotUpIndicator(Entity entity, String key) { clearMapSensorEntry(entity, Attributes.SERVICE_NOT_UP_INDICATORS, key); } /** as {@link #updateNotUpIndicator(Entity, String, Object)} using the given sensor as the key */
/** as {@link #clearProblemsIndicator(Entity, Sensor)} */ public static void clearProblemsIndicator(Entity entity, String key) { clearMapSensorEntry(entity, Attributes.SERVICE_PROBLEMS, key); } }
/** clears any entry for the given sensor in the {@link Attributes#SERVICE_PROBLEMS} map */ public static void clearProblemsIndicator(Entity entity, Sensor<?> sensor) { clearMapSensorEntry(entity, Attributes.SERVICE_PROBLEMS, sensor.getName()); } /** as {@link #updateProblemsIndicator(Entity, Sensor, Object)} */
/** as {@link #clearProblemsIndicator(Entity, Sensor)} */ public static void clearProblemsIndicator(Entity entity, Effector<?> eff) { clearMapSensorEntry(entity, Attributes.SERVICE_PROBLEMS, eff.getName()); } /** as {@link #updateProblemsIndicator(Entity, Sensor, Object)} */
/** as {@link #clearNotUpIndicator(Entity, String)} using the given sensor as the key */ public static void clearNotUpIndicator(Entity entity, Sensor<?> sensor) { clearMapSensorEntry(entity, Attributes.SERVICE_NOT_UP_INDICATORS, sensor.getName()); }
protected void updateMapSensor(AttributeSensor<Map<String, Object>> sensor, Object value) { if (log.isTraceEnabled()) log.trace("{} updating map sensor {} with {}", new Object[] { this, sensor, value }); if (value!=null) { updateMapSensorEntry(entity, sensor, getKeyForMapSensor(), value); } else { clearMapSensorEntry(entity, sensor, getKeyForMapSensor()); } }
if (getDriver() == null) { ServiceStateLogic.updateMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "driver", "No driver"); ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "sshable"); ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, SERVICE_PROCESS_IS_RUNNING.getName()); return; } else { ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "driver"); if (loc instanceof SshMachineLocation) { if (((SshMachineLocation)loc).isSshable()) { ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "sshable"); } else { ServiceStateLogic.updateMapSensorEntry( ServiceStateLogic.clearMapSensorEntry( this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS,
clearMapSensorEntry(entity, Attributes.SERVICE_NOT_UP_INDICATORS, DEFAULT_UNIQUE_TAG); } else { updateMapSensorEntry(entity, Attributes.SERVICE_NOT_UP_INDICATORS, DEFAULT_UNIQUE_TAG, newServiceUp.reason); updateMapSensorEntry(entity, Attributes.SERVICE_PROBLEMS, DEFAULT_UNIQUE_TAG, newServiceState.reason); } else { clearMapSensorEntry(entity, Attributes.SERVICE_PROBLEMS, DEFAULT_UNIQUE_TAG);