@Test public void resetTest() { context.setName("hello"); context.putProperty("keyA", "valA"); context.putObject("keyA", "valA"); assertEquals("valA", context.getProperty("keyA")); assertEquals("valA", context.getObject("keyA")); MockLifeCycleComponent component = new MockLifeCycleComponent(); context.register(component); assertSame(component, lifeCycleManager.getLastComponent()); context.reset(); assertNull(context.getProperty("keyA")); assertNull(context.getObject("keyA")); assertTrue(lifeCycleManager.isReset()); }
public void reset() { removeShutdownHook(); getLifeCycleManager().reset(); propertyMap.clear(); objectMap.clear(); }
ContextBase implements Context, LifeCycle { public void reset() { removeShutdownHook(); getLifeCycleManager().reset(); propertyMap.clear(); objectMap.clear(); } }
ContextBase implements Context, LifeCycle { public void reset() { removeShutdownHook(); getLifeCycleManager().reset(); propertyMap.clear(); objectMap.clear(); } ContextBase(); }
ContextBase implements Context, LifeCycle { public void reset() { removeShutdownHook(); getLifeCycleManager().reset(); propertyMap.clear(); objectMap.clear(); } ContextBase(); StatusManager getStatusManager(); void setStatusManager(StatusManager statusManager); Map<String, String> getCopyOfPropertyMap(); void putProperty(String key, String val); String getProperty(String key); Object getObject(String key); void putObject(String key, Object value); void removeObject(String key); String getName(); void start(); void stop(); boolean isStarted(); void reset(); void setName(String name); long getBirthTime(); Object getConfigurationLock(); @Override /** * @deprecated */ synchronized ExecutorService getExecutorService(); @Override synchronized ScheduledExecutorService getScheduledExecutorService(); void register(LifeCycle component); @Override String toString(); @Override void addScheduledFuture(ScheduledFuture<?> scheduledFuture); List<ScheduledFuture<?>> getScheduledFutures(); SequenceNumberGenerator getSequenceNumberGenerator(); void setSequenceNumberGenerator(SequenceNumberGenerator sequenceNumberGenerator); }
ContextBase implements Context, LifeCycle { public void reset() { removeShutdownHook(); getLifeCycleManager().reset(); propertyMap.clear(); objectMap.clear(); } ContextBase(); StatusManager getStatusManager(); void setStatusManager(StatusManager statusManager); Map<String, String> getCopyOfPropertyMap(); void putProperty(String key, String val); String getProperty(String key); Object getObject(String key); void putObject(String key, Object value); void removeObject(String key); String getName(); void start(); void stop(); boolean isStarted(); void reset(); void setName(String name); long getBirthTime(); Object getConfigurationLock(); @Override /** * @deprecated */ synchronized ExecutorService getExecutorService(); @Override synchronized ScheduledExecutorService getScheduledExecutorService(); void register(LifeCycle component); @Override String toString(); @Override void addScheduledFuture(ScheduledFuture<?> scheduledFuture); List<ScheduledFuture<?>> getScheduledFutures(); SequenceNumberGenerator getSequenceNumberGenerator(); void setSequenceNumberGenerator(SequenceNumberGenerator sequenceNumberGenerator);  }