public class CachedPathMapper extends Object implements IPathMapper
PathMapper| Constructor and Description |
|---|
CachedPathMapper()
Creates a CachedPathMapper object that will cache the results of the
get(String) and the getAll(String) calls. |
CachedPathMapper(ConcurrentMap<String,String> cacheMap,
ConcurrentMap<String,Collection<String>> cacheAllMap)
Creates a CachedPathMapper object that will use cacheMap to cache the results of the
get(String) calls and cacheAllMap to cache the
results of the getAll(String) class. |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String path)
Retrieve appropriate key by matching patterns with supplied path.
|
Collection<String> |
getAll(String path)
Retrieve all mappings which match a supplied path.
|
void |
put(String key,
String pattern)
Add a key and appropriate matching pattern.
|
void |
set(Map<String,String> patterns) |
String |
toString() |
public CachedPathMapper()
get(String) and the getAll(String) calls.
Use the passed in maps for caches. The maps must be thread-safe as far as Map.get(Object) calls are concerned as gets may happen
concurrently. An access ordered map should be wrapped in a synchronizedMap wrapper.
public CachedPathMapper(ConcurrentMap<String,String> cacheMap, ConcurrentMap<String,Collection<String>> cacheAllMap)
get(String) calls and cacheAllMap to cache the
results of the getAll(String) class.
Use the passed in maps for caches. The maps must be thread-safe as far as Map.get(Object) calls are concerned as gets may happen
concurrently. An access ordered map should be wrapped in a synchronizedMap wrapper.
cacheMap - for caching results of get(String) callscacheAllMap - for caching results of getAll(String) callspublic String get(String path)
IPathMapperget in interface IPathMapperpublic Collection<String> getAll(String path)
IPathMappergetAll in interface IPathMapperpublic void put(String key, String pattern)
IPathMapperput in interface IPathMapperCopyright © 2018 Atlassian. All rights reserved.