T - the generic type of the instances contained in the ObjectStorepublic abstract class ObjectStoreToMapAdapter<T extends Serializable> extends Object implements Map<String,T>
This class provides limited functionality from the Map interface. It does not support some methods (see methods javadoc) that can have a big impact in performance due the underlying object store being used.
The object store provided will be access for completing the map operations but the whole lifecycle of the provided object store must be handled by the user.
Operations of this map are not thread safe so the user must synchronize access to this map properly.
If a method detects a data hazard such that the underlying object store throws an exception, it returns null instead of propagate the exception, in order to honor the Map interface.
| Constructor and Description |
|---|
ObjectStoreToMapAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,T>> |
entrySet()
This method is not supported for performance reasons
|
T |
get(Object key) |
protected abstract ObjectStore<T> |
getObjectStore() |
boolean |
isEmpty() |
Set<String> |
keySet() |
T |
put(String key,
T value) |
void |
putAll(Map<? extends String,? extends T> mapToAdd) |
T |
remove(Object key) |
int |
size() |
Collection<T> |
values()
This method is not supported for performance reasons
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllprotected abstract ObjectStore<T> getObjectStore()
public int size()
size in interface Map<String,T extends Serializable>public boolean isEmpty()
isEmpty in interface Map<String,T extends Serializable>public boolean containsKey(Object key)
containsKey in interface Map<String,T extends Serializable>public boolean containsValue(Object value)
containsValue in interface Map<String,T extends Serializable>public T put(String key, T value)
put in interface Map<String,T extends Serializable>public T remove(Object key)
remove in interface Map<String,T extends Serializable>public void putAll(Map<? extends String,? extends T> mapToAdd)
putAll in interface Map<String,T extends Serializable>public void clear()
clear in interface Map<String,T extends Serializable>public Set<String> keySet()
keySet in interface Map<String,T extends Serializable>public Collection<T> values()
values in interface Map<String,T extends Serializable>Copyright © 2021 MuleSoft, Inc.. All rights reserved.