K - key typepublic class ImmutableMapContainer<K> extends Object implements Container<K>, Container.Lifecycle
A container that stores key-value pairs.
Supports the following factory methods to create containers:
forMap(java.lang.String, java.util.Map<K, ?>): key-value pairs in the specified map;for performance reasons, when get data from container, it always returns all data which set in the creation time. and data will not be updated after the container is created.
Container.LifecycleEMPTY_CONTAINER_NAMESPACE| 构造器和说明 |
|---|
ImmutableMapContainer() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy()
Destroy the container
|
static <K> ImmutableMapContainer<K> |
forMap(String namespace,
@NonNull Map<K,?> data)
Create a key-value pair container based on the specified
Map instance. |
Map<K,?> |
get(Collection<K> keys)
Enter a batch of key values to return data source objects grouped by key values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitempty, getNamespaceinitpublic static <K> ImmutableMapContainer<K> forMap(String namespace, @NonNull Map<K,?> data)
Create a key-value pair container based on the specified Map instance.
K - key typenamespace - namespacedata - data source objects grouped by key valuepublic Map<K,?> get(Collection<K> keys)
public void destroy()
destroy 在接口中 Container.LifecycleCopyright © 2023. All rights reserved.