| Package | Description |
|---|---|
| org.nerd4j.utils.cache |
| Modifier and Type | Method and Description |
|---|---|
static CacheKey |
CacheKey.of(Class<?> dataModelType,
Object... attributes)
Creates a new cache key with the given values.
|
static CacheKey |
CacheKey.of(Class<?> dataModelType,
String version,
Object... attributes)
Creates a new cache key with the given values.
|
CacheKey |
CacheKey.Prototype.of(Object... attributes)
Creates a new
CacheKey with the given values. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract CacheEntry<V> |
AbstractCacheProvider.doGet(CacheKey key)
Returns the cache entry related to the given key.
|
protected CacheEntry<V> |
HeapCacheProvider.doGet(CacheKey key)
Returns the cache entry related to the given key.
|
CacheEntry<V> |
EmptyCacheProvider.doGet(CacheKey key)
Returns the cache entry related to the given key.
|
protected abstract void |
AbstractCacheProvider.doPut(CacheKey key,
CacheEntry<V> entry,
long duration)
Binds the given entry to the given key and
put it into the underlying cache.
|
protected void |
HeapCacheProvider.doPut(CacheKey key,
CacheEntry<V> entry,
long duration)
Binds the given entry to the given key and
put it into the underlying cache.
|
void |
EmptyCacheProvider.doPut(CacheKey key,
CacheEntry<V> entry,
long duration)
Binds the given entry to the given key and
put it into the underlying cache.
|
protected abstract void |
AbstractCacheProvider.doRemove(CacheKey key)
Removes the given key and the related entry from the cache.
|
protected void |
HeapCacheProvider.doRemove(CacheKey key)
Removes the given key and the related entry from the cache.
|
void |
EmptyCacheProvider.doRemove(CacheKey key)
Removes the given key and the related entry from the cache.
|
protected abstract boolean |
AbstractCacheProvider.doTouch(CacheKey key,
long duration)
Defers the expiration time of the cache entry related to the given key.
|
protected boolean |
HeapCacheProvider.doTouch(CacheKey key,
long duration)
Defers the expiration time of the cache entry related to the given key.
|
boolean |
EmptyCacheProvider.doTouch(CacheKey key,
long duration)
Defers the expiration time of the cache entry related to the given key.
|
void |
AbstractSelfLoadingCache.evict(CacheKey key)
Removes the given key from the underlying cache system
forcing to reload it the next time
SelfLoadingCache.get(CacheKey, DataProvider)
is invoked. |
void |
SelfLoadingCache.evict(CacheKey key)
Removes the given key from the underlying cache system
forcing to reload it the next time
SelfLoadingCache.get(CacheKey, DataProvider)
is invoked. |
CacheEntry<V> |
AbstractCacheProvider.get(CacheKey key)
Returns the cache entry related to the given key.
|
protected CacheEntry<V> |
AbstractSelfLoadingCache.get(CacheKey key)
Returns the value from the cache if available
and
null otherwise. |
CacheEntry<V> |
CacheProvider.get(CacheKey key)
Returns the cache entry related to the given key.
|
V |
AbstractSelfLoadingCache.get(CacheKey key,
DataProvider<V> dataProvider)
Returns the value related to the given key.
|
V |
SelfLoadingCache.get(CacheKey key,
DataProvider<V> dataProvider)
Returns the value related to the given key.
|
protected V |
AbstractSelfLoadingCache.insert(CacheKey key,
DataProvider<V> dataProvider)
Inserts the given key and the related value into the cache.
|
protected V |
AbstractSelfLoadingCache.load(CacheKey key,
DataProvider<V> dataProvider)
Loads the value from the
DataProvider. |
protected V |
AbstractSelfLoadingCache.loadAndPut(String operation,
CacheKey key,
DataProvider<V> dataProvider)
Performs the loading of te data related to the given
key and puts the
<key-value> pair into the cache. |
protected void |
AbstractSelfLoadingCache.put(CacheKey key,
V value)
Puts the given
key-value pair into the cache. |
void |
AbstractCacheProvider.put(CacheKey key,
V value,
long duration)
Inserts the given key and the related value into the cache.
|
void |
CacheProvider.put(CacheKey key,
V value,
long duration)
Inserts the given key and the related value into the cache.
|
void |
AbstractCacheProvider.remove(CacheKey key)
Removes the given key from the cache.
|
void |
CacheProvider.remove(CacheKey key)
Removes the given key from the cache.
|
V |
DataProvider.retrieve(CacheKey key)
Returns the data to cache in relation with
the given key.
|
boolean |
AbstractCacheProvider.touch(CacheKey key,
long duration)
Defers the expiration time of the entry related to the given key.
|
boolean |
CacheProvider.touch(CacheKey key,
long duration)
Defers the expiration time of the entry related to the given key.
|
protected V |
AbstractSelfLoadingCache.update(CacheKey key,
CacheEntry<V> entry,
DataProvider<V> dataProvider)
Updates the cache for the given key and the related value.
|
Copyright © 2011–2020 Nerd4j. All rights reserved.