public class ThreadLocalCache extends Object implements Cache
ThreadLocalCacheFactory to store method's returns value
to server from store without making method call.
e.g. <dubbo:service cache="threadlocal" />
As this ThreadLocalCache stores key-value in memory without any expiry or delete support per thread wise, if number threads and number of key-value are high then jvm should be configured with appropriate memory.
AbstractCacheFactory,
CacheFilter,
Cache| Constructor and Description |
|---|
ThreadLocalCache(URL url)
Taken URL as an argument to create an instance of ThreadLocalCache.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Object key)
API to return stored value using a key against the calling thread specific store.
|
void |
put(Object key,
Object value)
API to store value against a key in the calling thread scope.
|
public ThreadLocalCache(URL url)
url - Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.