use of org.apache.qpid.server.store.preferences.PreferenceStore in project qpid-broker-j by apache.
the class PreferencesTest method setUp.
@Before
public void setUp() throws Exception {
final String objectName = getTestName();
_testObject = _model.getObjectFactory().create(TestSingleton.class, Collections.<String, Object>singletonMap(ConfiguredObject.NAME, objectName), null);
_preferenceTaskExecutor = new CurrentThreadTaskExecutor();
_preferenceTaskExecutor.start();
PreferenceStore preferenceStore = mock(PreferenceStore.class);
_testObject.setUserPreferences(new UserPreferencesImpl(_preferenceTaskExecutor, _testObject, preferenceStore, Collections.<Preference>emptySet()));
_testSubject = TestPrincipalUtils.createTestSubject(TEST_USERNAME);
}
use of org.apache.qpid.server.store.preferences.PreferenceStore in project qpid-broker-j by apache.
the class AbstractStandardVirtualHostNode method onDelete.
@Override
protected ListenableFuture<Void> onDelete() {
final VirtualHost<?> virtualHost = getVirtualHost();
final MessageStore messageStore = virtualHost == null ? null : virtualHost.getMessageStore();
return doAfterAlways(closeVirtualHostIfExists(), () -> {
if (messageStore != null) {
messageStore.closeMessageStore();
messageStore.onDelete(virtualHost);
}
if (AbstractStandardVirtualHostNode.this instanceof PreferenceStoreProvider) {
PreferenceStore preferenceStore = ((PreferenceStoreProvider) AbstractStandardVirtualHostNode.this).getPreferenceStore();
if (preferenceStore != null) {
preferenceStore.onDelete();
}
}
DurableConfigurationStore configurationStore = getConfigurationStore();
if (configurationStore != null) {
configurationStore.closeConfigurationStore();
configurationStore.onDelete(AbstractStandardVirtualHostNode.this);
}
onCloseOrDelete();
});
}
Aggregations