/** Interrupt data collection, but evaluation is maintained and can be restarted*/ public void interrupt() { for(ListenerData ld: valueListeners) { if(ld.listener != null) ld.resource.removeValueListener(ld.listener); } }
public void close() { target.removeValueListener(this); }
void close() { try{ pattern.target.removeValueListener(this); } catch (Exception e) { LoggerFactory.getLogger(ChannelMapperImpl.class).warn("Error closing channel controller",e); } if (channelConfiguration != null) { try{ ca.unregisterUpdateListener(Collections.singletonList(channelConfiguration), this); } catch (Exception e) { LoggerFactory.getLogger(ChannelMapperImpl.class).warn("Error closing channel controller",e); } try { ca.deleteChannel(channelConfiguration); } catch (Exception e) { LoggerFactory.getLogger(ChannelMapperImpl.class).warn("Error closing channel controller",e); } } ScheduledFuture<?> openTask = this.openTask; if (openTask != null) openTask.cancel(true); this.openTask = null; t = null; }
@Override public void resourceChanged(SingleValueResource resource) { final long newStep = ConnectionTask.getValue(resource); if (newStep >= 2 * MIN_EXECUTION_STEP) { target.removeValueListener(this); task.advanceExecutionTime(); reschedule(task); logger.debug("Configuration update time admissible again {}: {} ms", target, newStep); } }
@Override public void stop() { active = false; m_timer.stop(); for (SingleValueResource input : m_config.inputs().getAllElements()) { input.removeStructureListener(this); input.removeValueListener(this); } }
listeners.forEach((dp, listener) -> { try { ((SingleValueResource) copy.get(dp)).removeValueListener(listener); } catch (Exception ignore) {} });