use of org.apache.qpid.server.store.preferences.PreferenceStoreProvider 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);
}
});
}
Aggregations