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 t)
Reset expiry to the specified value.
|
void |
failure(RuntimeException t)
Bad things happened, propagate the exception to the client.
|
InternalClock |
getClock() |
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,
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 t)
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.
|
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, ExceptionInformation inf)
void load()
Semantic.Base
void refresh()
void loadAndMutation()
void expire(long t)
void remove()
void put(V value)
void failure(RuntimeException t)
void putAndSetExpiry(V value, long t)
InternalClock getClock()
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.