Package com.hybris.cockpitng.util.impl
Class DefaultCockpitZulCache
- java.lang.Object
-
- com.hybris.cockpitng.util.impl.DefaultCockpitZulCache
-
- All Implemented Interfaces:
Resettable,CockpitZulCache
public class DefaultCockpitZulCache extends java.lang.Object implements CockpitZulCache
DefaultCockpitZulCacheimplementation, usingConcurrentHashMap.
-
-
Constructor Summary
Constructors Constructor Description DefaultCockpitZulCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.zkoss.zk.ui.metainfo.PageDefinitionaddPageDefinitionToCache(java.lang.String path, org.zkoss.zk.ui.metainfo.PageDefinition def)Adds aPageDefinitionto the cache.java.util.Set<java.lang.String>getDefinitionPaths()Returns all paths currently stored in the cache.org.zkoss.zk.ui.metainfo.PageDefinitiongetPageDefinition(java.lang.String path)Returns thePageDefinitionfor a given path.voidreset()Clears all entries in the cache.
-
-
-
Method Detail
-
getPageDefinition
public org.zkoss.zk.ui.metainfo.PageDefinition getPageDefinition(java.lang.String path)
Description copied from interface:CockpitZulCacheReturns thePageDefinitionfor a given path.- Specified by:
getPageDefinitionin interfaceCockpitZulCache- Parameters:
path- An unique identifier for the page.- Returns:
- A
PageDefinition, if present in the cache, or null otherwise.
-
addPageDefinitionToCache
public org.zkoss.zk.ui.metainfo.PageDefinition addPageDefinitionToCache(java.lang.String path, org.zkoss.zk.ui.metainfo.PageDefinition def)Description copied from interface:CockpitZulCacheAdds aPageDefinitionto the cache.- Specified by:
addPageDefinitionToCachein interfaceCockpitZulCache- Parameters:
path- The path to the zul file.def- ThePageDefinitionto add to the cache.- Returns:
- The
PageDefinitionthat was added (for convenience).
-
reset
public void reset()
Description copied from interface:CockpitZulCacheClears all entries in the cache.- Specified by:
resetin interfaceCockpitZulCache- Specified by:
resetin interfaceResettable
-
getDefinitionPaths
public java.util.Set<java.lang.String> getDefinitionPaths()
Description copied from interface:CockpitZulCacheReturns all paths currently stored in the cache.- Specified by:
getDefinitionPathsin interfaceCockpitZulCache
-
-