@Override public void handleAddBlobStore(BlobStoreInfo newBlobStore) throws ConfigurationException, StorageException { if (newBlobStore.isDefault()) { loadBlobStoreOverwritingDefault(blobStores, newBlobStore); } else { loadBlobStore(blobStores, newBlobStore); } }
try { stores.remove(DEFAULT_STORE_DEFAULT_ID); loadBlobStore(stores, config);
loadBlobStore(blobStores, modifiedBlobStore); } catch (StorageException | ConfigurationException e) { blobStores.get(DEFAULT_STORE_DEFAULT_ID).config = oldConfig; loadBlobStore(blobStores, modifiedBlobStore);
loadBlobStore(stores, config);
@Override public void handleModifyBlobStore(BlobStoreInfo modifiedBlobStore) throws ConfigurationException, StorageException { LiveStore removedStore = blobStores.remove(modifiedBlobStore.getName()); try { if (modifiedBlobStore.isDefault() && !modifiedBlobStore .getName() .equals(blobStores.get(DEFAULT_STORE_DEFAULT_ID).config.getName())) { loadBlobStoreOverwritingDefault(blobStores, modifiedBlobStore); } else { loadBlobStore(blobStores, modifiedBlobStore); } } catch (StorageException | ConfigurationException e) { blobStores.put(modifiedBlobStore.getName(), removedStore); throw e; } }