|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.seraph.util.CachedPathMapper
public class CachedPathMapper
Caches the results of the PathMapper
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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.
cacheMap
- for caching results of get(String)
callscacheAllMap
- for caching results of getAll(String)
callspublic 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)
callsMethod Detail |
---|
public String get(String path)
IPathMapper
get
in interface IPathMapper
public Collection<String> getAll(String path)
IPathMapper
getAll
in interface IPathMapper
public void set(Map<String,String> patterns)
public void put(String key, String pattern)
IPathMapper
put
in interface IPathMapper
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |