Details
-
Enhancement
-
Resolution: Done
-
Major
-
12.0.0.CR1
-
None
Description
NonBlockingStore.delete(int segment, Object key) returns a CompletionStage<Boolean>, just like CacheWriter.delete(Object key) returns a boolean. But the Boolean return value is not used, so it could be replaced with Void.
In CacheWriterInterceptor, the return value of the remove command is based only on the value that was loaded in the invocation context, not on the result of the store delete operation:
Same with the removeHits statistic in CacheMgmtInterceptor:
Changing the return value to CompletionStage<Void> would improve performance in some stores, e.g. RocksDBStore wouldn't have to read the value first. And the async store can't return the result of the actual deletion anyway.