public class DelegateMetadataCacheManager extends Object implements MetadataCacheManager, org.mule.runtime.api.lifecycle.Initialisable
METADATA_CACHE_MANAGER_KEY| Constructor and Description |
|---|
DelegateMetadataCacheManager(Supplier<MetadataCacheManager> metadataCacheManagerSupplier) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose(String id)
If the given
id references exactly one MetadataCache then that cache will be disposed. |
org.mule.runtime.api.metadata.MetadataCache |
getOrCreateCache(String id)
Returns the
MetadataCache with the given id if one has already been defined. |
void |
initialise() |
void |
updateCache(String id,
org.mule.runtime.api.metadata.MetadataCache cache)
Replaces the old binding of the given
id with the new cache element. |
public DelegateMetadataCacheManager(Supplier<MetadataCacheManager> metadataCacheManagerSupplier)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic org.mule.runtime.api.metadata.MetadataCache getOrCreateCache(String id)
MetadataCacheManagerMetadataCache with the given id if one has already been defined. Otherwise, a new instance of
MetadataCache will be created, bound to the given id and then returned.getOrCreateCache in interface MetadataCacheManagerid - the cache identifier hash stringMetadataCache bound to the given id, or a new cache of none existed.public void updateCache(String id, org.mule.runtime.api.metadata.MetadataCache cache)
MetadataCacheManagerid with the new cache element.updateCache in interface MetadataCacheManagerid - the cache identifier hash stringcache - the new MetadataCache value bound to the given idpublic void dispose(String id)
MetadataCacheManagerid references exactly one MetadataCache then that cache will be disposed. Otherwise, all the
caches that have an id starting with the given value will be disposed, based on the pre-condition that id's are
formed in a hierarchical way.dispose in interface MetadataCacheManagerid - the given identifier hash string of the level at which the disposal should be performedCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.