public class ReadModifiers extends Object
ReadModifiers
class provides static
methods and constants to decode Read
type modifiers. The sets of modifiers are represented as integers with distinct bit positions
representing different modifiers. You could use bitwise or operator "|" to unite different
modifiers.
Note that REPEATABLE_READ
, DIRTY_READ
and READ_COMMITTED
are mutually exclusive (i.e. can't be used together). While EXCLUSIVE_READ_LOCK
can be joined with any of them.
These modifiers can be set either at
the proxy level IJSpace.setReadModifiers(int)
or at the operation level
(e.g. using one of IJSpace
read/readIfExists/readMultiple/count methods
with a modifiers parameter )
The default behavior is that of the REPEATABLE_READ
modifier (as defined by the JavaSpace specification ).
IJSpace.setReadModifiers(int)
Modifier and Type | Field and Description |
---|---|
static int |
DIRTY_READ
Allows non-transactional read operations to have full visibility of the entities in the
space, including entities that are
exclusively-locked . |
static int |
EXCLUSIVE_READ_LOCK
Allows read operations to have exclusive visibility of entities that are not locked by active
transactions.
|
static int |
FIFO
Indicates the operation should comply with First-In-First-Out order.
|
static int |
FIFO_GROUPING_POLL
A modifier passed to take & read operations.
|
static int |
IGNORE_PARTIAL_FAILURE
A modifier passed to read multiple and take multiple operations.
|
static int |
MATCH_BY_ID
Deprecated.
use
GigaSpace.takeById(Class, Object, Object) instead |
static int |
MEMORY_ONLY_SEARCH
Search for matching entries in cache memory only (do not use the underlying EDS).
|
static int |
READ_COMMITTED
Allows read operations to have visibility of already committed entities, regardless of the
fact that these entities might be updated (with a newer version) or taken under an
uncommitted transaction.
|
static int |
REPEATABLE_READ
Allows read operations to have visibility of entities that are not write-locked or
exclusively-locked by active transactions.This is the default read isolation-level. |
static int |
THROW_PARTIAL_FAILURE
Deprecated.
This is the default behavior, for old behavior use
IGNORE_PARTIAL_FAILURE |
Modifier and Type | Method and Description |
---|---|
static boolean |
isDirtyRead(int mod)
Checks if the DIRTY_READ bit was set for this modifier.
|
static boolean |
isExclusiveReadLock(int mod)
Checks if the EXCLUSIVE_READ_LOCK bit was set for this modifier.
|
static boolean |
isFifo(int mod)
Checks if the FIFO bit was set for this modifier.
|
static boolean |
isFifoGroupingPoll(int mod)
Checks if the FIFO_GROUPING_POLL bit was set for this modifier.
|
static boolean |
isMatchByID(int mod)
Deprecated.
use
GigaSpace.takeById(Class, Object, Object) instead |
static boolean |
isMemoryOnlySearch(int mod)
Checks if the MEMORY_ONLY_SEARCH bit was set for this modifier.
|
static boolean |
isReadCommitted(int mod)
Checks if the READ_COMMITTED bit was set for this modifier.
|
static boolean |
isThrowPartialFailure(int mod)
Deprecated.
This is the default behavior, for old behavior use
IGNORE_PARTIAL_FAILURE |
static int |
setIsolationLevelModifier(int modifiers,
int newIsolationModifier) |
public static final int REPEATABLE_READ
exclusively-locked
by active transactions.public static final int DIRTY_READ
exclusively-locked
.public static final int EXCLUSIVE_READ_LOCK
public static final int READ_COMMITTED
@Deprecated public static final int MATCH_BY_ID
GigaSpace.takeById(Class, Object, Object)
insteadint
value required matching to be done only by UID if provided (not in POJO)
modifier.@Deprecated public static final int THROW_PARTIAL_FAILURE
IGNORE_PARTIAL_FAILURE
ReadMultipleException
,TakeMultipleException
to
be thrown when not all of the requested number of entries are returned and one or more
cluster members are not available.public static final int IGNORE_PARTIAL_FAILURE
ReadMultipleException
,TakeMultipleException
when not all of the requested number of
entries are returned and one or more cluster members are not available.public static final int FIFO
public static final int FIFO_GROUPING_POLL
SpaceFifoGroupingProperty
public static final int MEMORY_ONLY_SEARCH
public static int setIsolationLevelModifier(int modifiers, int newIsolationModifier)
public static boolean isDirtyRead(int mod)
mod
- a set of modifierstrue
if mod
includes the DIRTY_READ
bit is set.public static boolean isExclusiveReadLock(int mod)
mod
- a set of modifierstrue
if mod
includes the EXCLUSIVE_READ_LOCK
bit
is set.public static boolean isReadCommitted(int mod)
mod
- a set of modifierstrue
if mod
includes the READ_COMMITTED
bit is
set.@Deprecated public static boolean isMatchByID(int mod)
GigaSpace.takeById(Class, Object, Object)
insteadmod
- a set of modifiersmod
includes the MATCH_BY_UID modifier;
false otherwise.@Deprecated public static boolean isThrowPartialFailure(int mod)
IGNORE_PARTIAL_FAILURE
mod
- a set of modifierspublic static boolean isFifo(int mod)
mod
- a set of modifiersmod
includes the FIFO modifier; false
otherwise.public static boolean isFifoGroupingPoll(int mod)
mod
- a set of modifiersmod
includes the FIFO_GROUPING_POLL modifier;
false otherwise.public static boolean isMemoryOnlySearch(int mod)
mod
- a set of modifiersmod
includes the MEMORY_ONLY_SEARCH modifier;
false otherwise.Copyright © GigaSpaces.