Post DatabaseManager deprecation code cleanup
- Dropping MutexExecutionService as there are now better alternatives
- Dropping New from class names that were added during transition phase
Change-Id: If0cdd3321081c3f8fda81441ef2c84549b616edd
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/UnmodifiableAsyncConsistentMap.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/UnmodifiableAsyncConsistentMap.java
index 30efc36..6525f12 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/UnmodifiableAsyncConsistentMap.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/impl/UnmodifiableAsyncConsistentMap.java
@@ -35,6 +35,8 @@
*/
public class UnmodifiableAsyncConsistentMap<K, V> extends DelegatingAsyncConsistentMap<K, V> {
+ private static final String ERROR_MSG = "map updates are not allowed";
+
public UnmodifiableAsyncConsistentMap(AsyncConsistentMap<K, V> backingMap) {
super(backingMap);
}
@@ -43,56 +45,56 @@
public CompletableFuture<Versioned<V>> computeIf(K key,
Predicate<? super V> condition,
BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(""));
}
@Override
public CompletableFuture<Versioned<V>> put(K key, V value) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Versioned<V>> putAndGet(K key, V value) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Versioned<V>> remove(K key) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Void> clear() {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Versioned<V>> putIfAbsent(K key, V value) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Boolean> remove(K key, V value) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Boolean> remove(K key, long version) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Versioned<V>> replace(K key, V value) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Boolean> replace(K key, V oldValue, V newValue) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
@Override
public CompletableFuture<Boolean> replace(K key, long oldVersion, V newValue) {
- return Tools.exceptionalFuture(new UnsupportedOperationException("map updates are not allowed"));
+ return Tools.exceptionalFuture(new UnsupportedOperationException(ERROR_MSG));
}
}