public enum ValueMatcher extends Enum<ValueMatcher>
putIfAbsent(k, v) already succeeded on a backup owner which became the primary owner,
when retrying the command will find v in the cache but should return null. For non-conditional
commands it's impossible to know what the previous value was, so the command is allowed to return v.| Enum Constant and Description |
|---|
MATCH_ALWAYS
Always match.
|
MATCH_EXPECTED
Match when the existing value is equal to the expected value.
|
MATCH_EXPECTED_OR_NEW
Match when the existing value is equal to the expected value or to the new value.
|
MATCH_EXPECTED_OR_NULL |
MATCH_NEVER
Never match.
|
MATCH_NON_NULL
Match any non-null value.
|
| Modifier and Type | Method and Description |
|---|---|
abstract ValueMatcher |
matcherForRetry() |
abstract boolean |
matches(Object existingValue,
Object expectedValue,
Object newValue) |
abstract boolean |
nonExistentEntryCanMatch()
Deprecated.
Since 9.0, no longer used.
|
static ValueMatcher |
valueOf(int ordinal) |
static ValueMatcher |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValueMatcher[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ValueMatcher MATCH_ALWAYS
BasicCache.remove(Object) operations.public static final ValueMatcher MATCH_EXPECTED
ConcurrentMap.putIfAbsent(Object, Object), ConcurrentMap.replace(Object, Object, Object),
and ConcurrentMap.remove(Object, Object).public static final ValueMatcher MATCH_EXPECTED_OR_NEW
public static final ValueMatcher MATCH_EXPECTED_OR_NULL
public static final ValueMatcher MATCH_NON_NULL
ConcurrentMap.replace(Object, Object) and BasicCache.remove(Object).public static final ValueMatcher MATCH_NEVER
public static ValueMatcher[] values()
for (ValueMatcher c : ValueMatcher.values()) System.out.println(c);
public static ValueMatcher valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean matches(Object existingValue, Object expectedValue, Object newValue)
@Deprecated public abstract boolean nonExistentEntryCanMatch()
public abstract ValueMatcher matcherForRetry()
public static ValueMatcher valueOf(int ordinal)
Copyright © 2022 JBoss by Red Hat. All rights reserved.