@Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) public @interface UpdateMultiCacheOption
Modifier and Type | Optional Element and Description |
---|---|
boolean |
addNullsToCache
If no one argument is annotated together by
ParameterDataUpdateContent and
ParameterValueKeyProvider or method is not annotated by both ReturnValueKeyProvider and
ReturnDataUpdateContent then null values will be added under keys that occurred in list parameter
annotated by ParameterValueKeyProvider or ReturnValueKeyProvider but not occurred in
ParameterDataUpdateContent or ReturnDataUpdateContent . |
boolean |
overwriteNoNulls
If
addNullsToCache() and this property is set to true then regardless of current value in cache null
marked will be set to cache under missed value (set memcached command), otherwise null marked will be added only
if current value in cache is null (add memcached command). |
public abstract boolean addNullsToCache
ParameterDataUpdateContent
and
ParameterValueKeyProvider
or method is not annotated by both ReturnValueKeyProvider
and
ReturnDataUpdateContent
then null values will be added under keys that occurred in list parameter
annotated by ParameterValueKeyProvider
or ReturnValueKeyProvider
but not occurred in
ParameterDataUpdateContent
or ReturnDataUpdateContent
. Example: @UpdateMultiCache(namespace = "NS1", expiration = 0, option=@UpdateMultiCacheOption(addNullsToCache = true)) public Listif getUsersList(1, Arrays.asList(1,2,3,4,5)) returns entities for userId 1,3,4 then null values will be added for userId 2 and 5.getUsersList(@ParameterValueKeyProvider(order = 1) int applicationId, @ParameterValueKeyProvider(order = 0) List<Integer> userIds) { ..... }
public abstract boolean overwriteNoNulls
addNullsToCache()
and this property is set to true then regardless of current value in cache null
marked will be set to cache under missed value (set memcached command), otherwise null marked will be added only
if current value in cache is null (add memcached command).Copyright © 2019. All rights reserved.