public class UpdateModifiers extends Object
static
methods and constants to decode update types
modifiers. The sets of modifiers are represented as integers with distinct bit positions
representing different modifiers.Modifier and Type | Field and Description |
---|---|
static int |
MEMORY_ONLY_SEARCH
Look only in memory for existence of entry with the same ID -do not use the underlying EDS.
|
static int |
NO_RETURN_VALUE
If set, the write or update operations will return
null instead of the lease
object (write) or previous value (update). |
static int |
PARTIAL_UPDATE
The
int value representing the PARTIAL_UPDATE modifier. |
static int |
RETURN_PREV_ON_UPDATE
Determines if an update operation should return the previous entry in the lease.
|
static int |
UPDATE_ONLY
The
int value representing the UPDATE_OR_ONLY modifier. |
static int |
UPDATE_OR_WRITE
The
int value representing the UPDATE_OR_WRITE modifier. |
static int |
WRITE_ONLY
The
int value representing the WRITE_ONLY modifier. |
Constructor and Description |
---|
UpdateModifiers() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isMemoryOnlySearch(int mod)
Return true if the integer argument includes the MEMORY_ONLY_SEARCH
modifier, false otherwise.
|
static boolean |
isNoReturnValue(int mod)
Return true if the integer argument includes the NO_RETURN_VALUE modifier,
false otherwise.
|
static boolean |
isPartialUpdate(int mod)
Return true if the integer argument includes the PARTIAL_UPDATE modifier,
false otherwise.
|
static boolean |
isPotentialUpdate(int mod) |
static boolean |
isReturnPrevOnUpdate(int mod)
Return true if the integer argument includes the RETURN_PREV_ON_UPDATE
modifier, false otherwise.
|
static boolean |
isUpdate(int mod)
Return true if the integer argument includes the UPDATE_ONLY modifier or
PARTIAL_UPDATE modifier or UPDATE_OR_WRITE modifier, false
otherwise.
|
static boolean |
isUpdateOnly(int mod)
Return true if the integer argument includes the UPDATE_ONLY modifier,
false otherwise.
|
static boolean |
isUpdateOrWrite(int mod)
Return true if the integer argument includes the UPDATE_OR_WRITE modifier,
false otherwise.
|
static boolean |
isWriteOnly(int mod)
Return true if the integer argument includes the WRITE_ONLY modifier,
false otherwise.
|
public static final int WRITE_ONLY
int
value representing the WRITE_ONLY
modifier. When set: the
entry to be written must not reside in the space, no new entry will be written otherwise and
an EntryAlreadyInSpaceException
will be thrown.
Notice: can't be used in together with UPDATE_OR_WRITE
or UPDATE_ONLY
.public static final int UPDATE_ONLY
int
value representing the UPDATE_OR_ONLY
modifier. When set
alone: the entry to be updated must be reside in the space, no new entry will be written
otherwise and an EntryNotInSpaceException
will be thrown.public static final int UPDATE_OR_WRITE
int
value representing the UPDATE_OR_WRITE
modifier. When set:
if the entry to be updated does not reside in the space, a new entry is written Notice:
can't be used in together with PARTIAL_UPDATE
public static final int PARTIAL_UPDATE
int
value representing the PARTIAL_UPDATE
modifier. If set,
null values in the updated entry are treated as "leave as it is" Notice: can't be used in
together with UPDATE_OR_WRITE
or WRITE_ONLY
.
public static final int NO_RETURN_VALUE
null
instead of the lease
object (write) or previous value (update). Using this option will improve application write
operation performance - null return value yields less network traffic and less memory
consumption. Note: This modifier does not replace ONE_WAY modifierpublic static final int RETURN_PREV_ON_UPDATE
public static final int MEMORY_ONLY_SEARCH
public static boolean isUpdateOrWrite(int mod)
mod
- a set of modifiersmod
includes the public modifier;
false otherwise.public static boolean isPartialUpdate(int mod)
mod
- a set of modifiersmod
includes the PARTIAL_UPDATE modifier;
false otherwise.public static boolean isUpdateOnly(int mod)
mod
- a set of modifiersmod
includes the UPDATE_ONLY modifier;
false otherwise.public static boolean isUpdate(int mod)
mod
- a set of modifiersmod
includes the UPDATE_ONLY modifier or
PARTIAL_UPDATE modifier or UPDATE_OR_WRITE modifier; false
otherwise.public static boolean isWriteOnly(int mod)
mod
- a set of modifiersmod
includes the WRITE_ONLY modifier;
false otherwise.public static boolean isNoReturnValue(int mod)
mod
- a set of modifiersmod
includes the NO_RETURN_VALUE modifier;
false otherwise.public static boolean isReturnPrevOnUpdate(int mod)
mod
- a set of modifiersmod
includes the RETURN_PREV_ON_UPDATE
modifier; false otherwise.public static boolean isMemoryOnlySearch(int mod)
mod
- a set of modifiersmod
includes the MEMORY_ONLY_SEARCH modifier;
false otherwise.public static boolean isPotentialUpdate(int mod)
Copyright © GigaSpaces.