diff options
Diffstat (limited to 'src/test/java/org/openecomp/datarouter/policy/InMemorySearchDatastore.java')
-rw-r--r-- | src/test/java/org/openecomp/datarouter/policy/InMemorySearchDatastore.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/java/org/openecomp/datarouter/policy/InMemorySearchDatastore.java b/src/test/java/org/openecomp/datarouter/policy/InMemorySearchDatastore.java new file mode 100644 index 0000000..4b25f6e --- /dev/null +++ b/src/test/java/org/openecomp/datarouter/policy/InMemorySearchDatastore.java @@ -0,0 +1,24 @@ +package org.openecomp.datarouter.policy; + +import java.util.concurrent.ConcurrentHashMap; + +public final class InMemorySearchDatastore { + + private final static ConcurrentHashMap<String, String> documents = new ConcurrentHashMap<String, String>(); + + public static ConcurrentHashMap<String, String> getAll() { + return documents; + } + + public static void put(String key, String value) { + documents.put(key, value); + } + + public static String get(String key) { + return documents.get(key); + } + + public static void remove(String key) { + documents.remove(key); + } +} |