@Override public synchronized void setAlwaysOn(boolean enabled) { if (enabled) { if (disableStatus != null) { disableStatus.cancel(false); disableStatus = null; } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(true); } } else { if (disableStatus == null) { disableStatus = executor.scheduleAtFixedRate(disableTask, 0, timeToDisable, timeToDisableUnit); } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(false); } } }
@Override public void set(String name, Boolean t) { op.setAlwaysOn(t.booleanValue()); }
@Override public synchronized void setAlwaysOn(boolean enabled) { if (enabled) { if (disableStatus != null) { disableStatus.cancel(false); disableStatus = null; } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(true); } } else { if (disableStatus == null) { disableStatus = executor.scheduleAtFixedRate(disableTask, 0, timeToDisable, timeToDisableUnit); } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(false); } } }
@Override public synchronized void setAlwaysOn(boolean enabled) { if (enabled) { if (disableStatus != null) { disableStatus.cancel(false); disableStatus = null; } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(true); } } else { if (disableStatus == null) { disableStatus = executor.scheduleAtFixedRate(disableTask, 0, timeToDisable, timeToDisableUnit); } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(false); } } }
@Override public void set(String name, Boolean t) { op.setAlwaysOn(t.booleanValue()); }
@Override public void set(String name, Boolean t) { op.setAlwaysOn(t.booleanValue()); }