K - key typepublic class ImmutableMapContainer<K> extends Object implements LimitedContainer<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 that set in the creation time. and data will not be updated after the container is created.
LimitedContainerContainer.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.
|
Map<K,?> |
getAll()
Get all data source objects in the container.
|
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 Map<K,?> getAll()
getAll 在接口中 LimitedContainer<K>public void destroy()
destroy 在接口中 Container.LifecycleCopyright © 2024. All rights reserved.