public interface ContextHubCache
Modifier and Type | Interface and Description |
---|---|
static class |
ContextHubCache.CodeType |
Modifier and Type | Method and Description |
---|---|
void |
cacheCode(SlingHttpServletRequest request,
ContextHubCache.CodeType codeType,
java.lang.String code)
Stores the supplied code in the cache.
|
java.lang.String |
getCode(SlingHttpServletRequest request,
ContextHubCache.CodeType codeType)
Retrieves the code for the particular contexthub configuration and corresponding to the given codeType from the cache.
|
java.util.Map |
getCodeMetadata(SlingHttpServletRequest request,
ContextHubCache.CodeType codeType)
Retrieves the metadata for the code stored in the cache - for the particular contexthub configuration and corresponding
to the given codeType.
|
void |
setCodeMetadata(SlingHttpServletRequest request,
ContextHubCache.CodeType codeType,
java.util.Map metadata)
Stores the supplied metadata in the cache.
|
java.lang.String getCode(SlingHttpServletRequest request, ContextHubCache.CodeType codeType)
request
- The request object from which the contexthub configuration path is retrievedcodeType
- the type of code to returnString
containing the code if the code is present in the cachenull
if code is not found in the cachejava.util.Map getCodeMetadata(SlingHttpServletRequest request, ContextHubCache.CodeType codeType)
request
- The request object from which the contexthub configuration path is retrievedcodeType
- the type of code corresponding to which the metadata should be returnedMap
containing the metadata as key-value pairs if the code and its corresponding metadata is present
in the cache void cacheCode(SlingHttpServletRequest request, ContextHubCache.CodeType codeType, java.lang.String code)
request
- The request object from which the contexthub configuration path is retrievedcodeType
- The type of code corresponding to which the code needs to be stored.code
- the code to storevoid setCodeMetadata(SlingHttpServletRequest request, ContextHubCache.CodeType codeType, java.util.Map metadata)
request
- The request object from which the contexthub configuration path is retrievedcodeType
- The type of code corresponding to which the metadata needs to storedmetadata
- The metadata to storeCopyright © 2010 - 2020 Adobe. All Rights Reserved