GigaSpaces XAP 9.0 API

com.gigaspaces.client
Class ReadModifiers

java.lang.Object
  extended by com.gigaspaces.client.SpaceProxyOperationModifiers
      extended by com.gigaspaces.client.ReadModifiers

public class ReadModifiers
extends SpaceProxyOperationModifiers

Provides modifiers to customize the behavior of read operations.

Since:
9.0.1
Author:
Niv Ingberg

Field Summary
static ReadModifiers DIRTY_READ
          When a search for matching entries encounters an entry locked under a different uncommitted transaction, the lock is ignored and matching is performed on the uncommitted state.
static ReadModifiers EXCLUSIVE_READ_LOCK
          The resulting entries are locked, blocking update/remove from other transactions.
static ReadModifiers FIFO
          Search for matching entries using First-In-First-Out order.
static ReadModifiers FIFO_GROUPING_POLL
          Search for matching entries in the FIFO group indicated in the template.
static ReadModifiers IGNORE_PARTIAL_FAILURE
          If one or more partitions are not available during the operation, ignore them and return partial results based on the available partitions (instead of throwing an ReadMultipleException which contains the partial results, which is the default behavior).
static ReadModifiers MEMORY_ONLY_SEARCH
          Search for matching entries in cache memory only (do not use the underlying EDS).
static ReadModifiers NONE
          Empty - use operation default behavior.
static ReadModifiers READ_COMMITTED
          When a search for matching entries encounters an entry locked under a different uncommitted transaction, the lock is honored and matching is performed on the committed state.
static ReadModifiers REPEATABLE_READ
          When a search for matching entries encounters an entry locked under a different uncommitted transaction, the lock is honored and the entry is skipped (if the operation is invoked with a timeout it will block until the entry will be released or the timeout expires).
 
Constructor Summary
ReadModifiers(ReadModifiers... modifiers)
          Creates a new modifiers from the specified modifiers.
ReadModifiers(ReadModifiers modifiers1, ReadModifiers modifiers2)
          Creates a new modifiers from the specified modifiers.
ReadModifiers(ReadModifiers modifiers1, ReadModifiers modifiers2, ReadModifiers modifiers3)
          Creates a new modifiers from the specified modifiers.
 
Method Summary
 ReadModifiers add(ReadModifiers modifiers)
          Creates a new modifiers instance which is a union of the specified modifiers and this instance.
 boolean contains(ReadModifiers modifiers)
          Checks if the specified modifier is set.
 boolean isDirtyRead()
          Checks if this instance contains the DIRTY_READ setting.
 boolean isExclusiveReadLock()
          Checks if this instance contains the EXCLUSIVE_READ_LOCK setting.
 boolean isFifo()
          Checks if this instance contains the FIFO setting.
 boolean isFifoGroupingPoll()
          Checks if this instance contains the FIFO_GROUPING_POLL setting.
 boolean isIgnorePartialFailure()
          Checks if this instance contains the IGNORE_PARTIAL_FAILURE setting.
 boolean isMemoryOnlySearch()
          Checks if this instance contains the MEMORY_ONLY_SEARCH setting.
 boolean isReadCommitted()
          Checks if this instance contains the READ_COMMITTED setting.
 boolean isRepeatableRead()
          Checks if this instance contains the REPEATABLE_READ setting.
 ReadModifiers remove(ReadModifiers modifiers)
          Creates a new modifiers instance which excludes the specified modifiers from this instance.
 
Methods inherited from class com.gigaspaces.client.SpaceProxyOperationModifiers
add, contains, getCode, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final ReadModifiers NONE
Empty - use operation default behavior.


REPEATABLE_READ

public static final ReadModifiers REPEATABLE_READ
When a search for matching entries encounters an entry locked under a different uncommitted transaction, the lock is honored and the entry is skipped (if the operation is invoked with a timeout it will block until the entry will be released or the timeout expires). If the operation is invoked in a transactional context, the resulting entries will be locked, blocking update/remove from other transactions.


READ_COMMITTED

public static final ReadModifiers READ_COMMITTED
When a search for matching entries encounters an entry locked under a different uncommitted transaction, the lock is honored and matching is performed on the committed state.


DIRTY_READ

public static final ReadModifiers DIRTY_READ
When a search for matching entries encounters an entry locked under a different uncommitted transaction, the lock is ignored and matching is performed on the uncommitted state.


EXCLUSIVE_READ_LOCK

public static final ReadModifiers EXCLUSIVE_READ_LOCK
The resulting entries are locked, blocking update/remove from other transactions.


IGNORE_PARTIAL_FAILURE

public static final ReadModifiers IGNORE_PARTIAL_FAILURE
If one or more partitions are not available during the operation, ignore them and return partial results based on the available partitions (instead of throwing an ReadMultipleException which contains the partial results, which is the default behavior). Relevant only for read multiple operations when the result set maximum size is not reached.


FIFO

public static final ReadModifiers FIFO
Search for matching entries using First-In-First-Out order.


FIFO_GROUPING_POLL

public static final ReadModifiers FIFO_GROUPING_POLL
Search for matching entries in the FIFO group indicated in the template. The template must have a property marked with the SpaceFifoGroupingProperty.

See Also:
SpaceFifoGroupingProperty}

MEMORY_ONLY_SEARCH

public static final ReadModifiers MEMORY_ONLY_SEARCH
Search for matching entries in cache memory only (do not use the underlying EDS).

Constructor Detail

ReadModifiers

public ReadModifiers(ReadModifiers modifiers1,
                     ReadModifiers modifiers2)
Creates a new modifiers from the specified modifiers.

Parameters:
modifiers1 -
modifiers2 -

ReadModifiers

public ReadModifiers(ReadModifiers modifiers1,
                     ReadModifiers modifiers2,
                     ReadModifiers modifiers3)
Creates a new modifiers from the specified modifiers.

Parameters:
modifiers1 -
modifiers2 -
modifiers3 -

ReadModifiers

public ReadModifiers(ReadModifiers... modifiers)
Creates a new modifiers from the specified modifiers.

Parameters:
modifiers -
Method Detail

contains

public boolean contains(ReadModifiers modifiers)
Checks if the specified modifier is set.

Parameters:
modifiers -
Returns:
true if the specified modifier is set, false otherwise.

add

public ReadModifiers add(ReadModifiers modifiers)
Creates a new modifiers instance which is a union of the specified modifiers and this instance.

Parameters:
modifiers - Modifiers to add.
Returns:
A union of the current modifiers and the specified modifiers.

remove

public ReadModifiers remove(ReadModifiers modifiers)
Creates a new modifiers instance which excludes the specified modifiers from this instance.

Parameters:
modifiers - Modifiers to remove.
Returns:
The modifiers from this instance without the modifiers from the specified instance.

isRepeatableRead

public boolean isRepeatableRead()
Checks if this instance contains the REPEATABLE_READ setting.

Returns:
true if this instance contains the REPEATABLE_READ setting, false otherwise.

isReadCommitted

public boolean isReadCommitted()
Checks if this instance contains the READ_COMMITTED setting.

Returns:
true if this instance contains the READ_COMMITTED setting, false otherwise.

isDirtyRead

public boolean isDirtyRead()
Checks if this instance contains the DIRTY_READ setting.

Returns:
true if this instance contains the DIRTY_READ setting, false otherwise.

isExclusiveReadLock

public boolean isExclusiveReadLock()
Checks if this instance contains the EXCLUSIVE_READ_LOCK setting.

Returns:
true if this instance contains the EXCLUSIVE_READ_LOCK setting, false otherwise.

isIgnorePartialFailure

public boolean isIgnorePartialFailure()
Checks if this instance contains the IGNORE_PARTIAL_FAILURE setting.

Returns:
true if this instance contains the IGNORE_PARTIAL_FAILURE setting, false otherwise.

isFifo

public boolean isFifo()
Checks if this instance contains the FIFO setting.

Returns:
true if this instance contains the FIFO setting, false otherwise.

isFifoGroupingPoll

public boolean isFifoGroupingPoll()
Checks if this instance contains the FIFO_GROUPING_POLL setting.

Returns:
true if this instance contains the FIFO_GROUPING_POLL setting, false otherwise.

isMemoryOnlySearch

public boolean isMemoryOnlySearch()
Checks if this instance contains the MEMORY_ONLY_SEARCH setting.

Returns:
true if this instance contains the MEMORY_ONLY_SEARCH setting, false otherwise.

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.