public interface Progress<K,V,R>
Semantic| Modifier and Type | Method and Description |
|---|---|
void |
entryResult(ExaminationEntry e)
Returns a cache entry as result.
|
void |
expire(long expiryTime)
Reset expiry to the specified value.
|
void |
failure(RuntimeException t)
Bad things happened, propagate the exception to the client.
|
long |
getCurrentTime()
The current time in millis or the value when it was first called.
|
boolean |
isPresent()
Entry has valid data in the cache and is not expired.
|
boolean |
isPresentOrInRefreshProbation()
Same as
isPresent() but also true if the entry is in refresh probation. |
boolean |
isPresentOrMiss()
Entry has valid data in the cache and is not expired.
|
void |
load()
Request that the entry value gets loaded from loader.
|
void |
loadAndMutation()
Request a load, however call update again for the final outcome.
|
RuntimeException |
propagateException(K key,
org.cache2k.integration.ExceptionInformation inf)
Needed for the mutable entry getValue() to throw an exception.
|
void |
put(V value)
Update the entry with the new value.
|
void |
putAndSetExpiry(V value,
long expiryTime,
long refreshTime)
Set new value, skip expiry calculation and set expiry time directly.
|
void |
refresh()
Same as load but counting statistics as refresh.
|
void |
remove()
The entry will be removed.
|
void |
result(R result)
Sets the operation result.
|
void |
wantData()
Requests that the cache content for an entry will be provided.
|
void |
wantMutation()
The entry gets locked for mutation.
|
long getCurrentTime()
void wantData()
Semantic.examine(Progress, ExaminationEntry)boolean isPresent()
boolean isPresentOrInRefreshProbation()
isPresent() but also true if the entry is in refresh probation.boolean isPresentOrMiss()
void wantMutation()
Semantic.update(Progress, ExaminationEntry)void result(R result)
void entryResult(ExaminationEntry e)
RuntimeException propagateException(K key, org.cache2k.integration.ExceptionInformation inf)
void load()
Semantic.Basevoid refresh()
void loadAndMutation()
void expire(long expiryTime)
void remove()
void put(V value)
void failure(RuntimeException t)
void putAndSetExpiry(V value, long expiryTime, long refreshTime)
cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.