public SpyDotPropertiesReloader(SpyDotProperties spyDotProperties, P6ModuleManager p6ModuleManager) { this.spyDotProperties = spyDotProperties; final P6SpyLoadableOptions spyOptions = p6ModuleManager.getOptions(P6SpyOptions.class); reschedule(spyOptions.getReloadProperties(), spyOptions.getReloadPropertiesInterval()); p6ModuleManager.registerOptionChangedListener(this); }
@Override public void optionChanged(String key, Object oldValue, Object newValue) { if (key.equals(P6SpyOptions.RELOADPROPERTIES)) { reschedule(Boolean.valueOf(newValue.toString()), P6SpyOptions.getActiveInstance().getReloadPropertiesInterval()); } else if (key.equals(P6SpyOptions.RELOADPROPERTIESINTERVAL)) { reschedule(P6SpyOptions.getActiveInstance().getReloadProperties(), (Long) newValue); } }
public SpyDotPropertiesReloader(SpyDotProperties spyDotProperties, P6ModuleManager p6ModuleManager) { this.spyDotProperties = spyDotProperties; final P6SpyLoadableOptions spyOptions = p6ModuleManager.getOptions(P6SpyOptions.class); reschedule(spyOptions.getReloadProperties(), spyOptions.getReloadPropertiesInterval()); p6ModuleManager.registerOptionChangedListener(this); }
@Override public void optionChanged(String key, Object oldValue, Object newValue) { if (key.equals(P6SpyOptions.RELOADPROPERTIES)) { reschedule(Boolean.valueOf(newValue.toString()), P6SpyOptions.getActiveInstance().getReloadPropertiesInterval()); } else if (key.equals(P6SpyOptions.RELOADPROPERTIESINTERVAL)) { reschedule(P6SpyOptions.getActiveInstance().getReloadProperties(), (Long) newValue); } }
Assert.assertNull(opts.getStackTraceClass()); Assert.assertFalse(opts.getAutoflush()); Assert.assertFalse(opts.getReloadProperties()); Assert.assertEquals(60L, opts.getReloadPropertiesInterval()); Assert.assertNull(opts.getJNDIContextFactory());