|
||||||||||
| 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(java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> cacheMap,
java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Collection<java.lang.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 | |
|---|---|
java.lang.String |
get(java.lang.String path)
Retrieve appropriate key by matching patterns with supplied path. |
java.util.Collection<java.lang.String> |
getAll(java.lang.String path)
Retrieve all mappings which match a supplied path. |
void |
put(java.lang.String key,
java.lang.String pattern)
Add a key and appropriate matching pattern. |
void |
set(java.util.Map<java.lang.String,java.lang.String> patterns)
|
java.lang.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) calls
public CachedPathMapper(java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> cacheMap,
java.util.concurrent.ConcurrentMap<java.lang.String,java.util.Collection<java.lang.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) calls| Method Detail |
|---|
public java.lang.String get(java.lang.String path)
IPathMapper
get in interface IPathMapperpublic java.util.Collection<java.lang.String> getAll(java.lang.String path)
IPathMapper
getAll in interface IPathMapperpublic void set(java.util.Map<java.lang.String,java.lang.String> patterns)
public void put(java.lang.String key,
java.lang.String pattern)
IPathMapper
put in interface IPathMapperpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||