Closed cruftex closed 8 years ago
Proposed correction for final value - the entry is removed if it was present Proposed correction for CacheLoader effect - CacheLoader: Invoked by the first get only if the entry is not present, a loader was registered and read through is enabled. Proposed correction for CacheWriter effect - CacheWriter: Invoked by the remove only as the two puts are internal to the Entry Processor, provided that the first #getValue was non-null.
The TCK's behaviour is correct. Will close TCK challenge: jsr107/jsr107tck#84
The Spec needs some more clarification for the
EntryProcessor
semantics and has mistakes. Snippet of the example 3 of theEntryProcessor
:Proposed correction for final value
Should read:
Proposed correction for CacheLoader effect
Should read:
Proposed correction for CacheWriter effect
This implies that
CacheWriter.delete()
is always called, regardless there was an entry or not. The TCK asserts that the writer is not called onMutableEntry.remove()
if no entry exists before.TCK challenge: https://github.com/jsr107/jsr107tck/issues/84
Consequent change to align with existing TCK:
The texts of the other examples need some corrections also.
An explicit example should be added for
MutableEntry.remove()
on a non existent entry.The change/clarification on
CacheWriter
would align with the TCK and existing implementations do not need changing. The downside: Its against the concept of theEntryProcessor
, being able to carry out any cache operation with it.