GigaSpaces XAP 10.0.1 API

com.gigaspaces.client
Class TakeModifiers

java.lang.Object
  extended by com.gigaspaces.client.SpaceProxyOperationModifiers
      extended by com.gigaspaces.client.TakeModifiers
All Implemented Interfaces:
Externalizable, Serializable

public class TakeModifiers
extends SpaceProxyOperationModifiers

Provides modifiers to customize the behavior of take operations.

Since:
9.0.1
Author:
Niv Ingberg
See Also:
Serialized Form

Field Summary
static TakeModifiers EVICT_ONLY
          Remove matching entries from memory only (do not remove from the underlying EDS).
static TakeModifiers FIFO
          Search for matching entries using First-In-First-Out order.
static TakeModifiers FIFO_GROUPING_POLL
          Search for matching entries in the FIFO group indicated in the template.
static TakeModifiers IF_EXISTS
          Blocks only if there's a matching entry which is locked by another transaction.
static TakeModifiers 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 TakeMultipleException which contains the partial results, which is the default behavior).
static TakeModifiers MEMORY_ONLY_SEARCH
          Search for matching entries in cache memory only (do not use the underlying EDS).
static TakeModifiers NONE
          Empty - use operation default behavior.
 
Constructor Summary
TakeModifiers()
           
TakeModifiers(TakeModifiers... modifiers)
          Creates a new modifiers from the specified modifiers.
TakeModifiers(TakeModifiers modifiers1, TakeModifiers modifiers2)
          Creates a new modifiers from the specified modifiers.
TakeModifiers(TakeModifiers modifiers1, TakeModifiers modifiers2, TakeModifiers modifiers3)
          Creates a new modifiers from the specified modifiers.
 
Method Summary
 TakeModifiers add(TakeModifiers modifiers)
          Creates a new modifiers instance which is a union of the specified modifiers and this instance.
 boolean contains(TakeModifiers modifiers)
          Checks if the specified modifier is set.
protected  TakeModifiers create(int modifiers)
           
protected  Map<Integer,SpaceProxyOperationModifiers> getCache()
           
 boolean isEvictOnly()
          Checks if this instance contains the EVICT_ONLY setting.
 boolean isFifo()
          Checks if this instance contains the FIFO setting.
 boolean isFifoGroupingPoll()
          Checks if this instance contains the FIFO_GROUPING_POLL setting.
 boolean isIfExists()
          Checks if this instance contains the IF_EXISTS 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.
 TakeModifiers remove(TakeModifiers modifiers)
          Creates a new modifiers instance which excludes the specified modifiers from this instance.
 
Methods inherited from class com.gigaspaces.client.SpaceProxyOperationModifiers
add, contains, createIfNeeded, equals, getCode, hashCode, readExternal, remove, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

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


EVICT_ONLY

public static final TakeModifiers EVICT_ONLY
Remove matching entries from memory only (do not remove from the underlying EDS). Ignored if there's no underlying EDS or if the caching policy is ALL_IN_CACHE. If the operation is invoked with a timeout, the timeout is ignored.


IGNORE_PARTIAL_FAILURE

public static final TakeModifiers 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 TakeMultipleException which contains the partial results, which is the default behavior). Relevant only for take multiple operations when the result set maximum size is not reached.


FIFO

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


FIFO_GROUPING_POLL

public static final TakeModifiers 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 TakeModifiers MEMORY_ONLY_SEARCH
Search for matching entries in cache memory only (do not use the underlying EDS).


IF_EXISTS

public static final TakeModifiers IF_EXISTS
Blocks only if there's a matching entry which is locked by another transaction. If the timeout elapses and the matching entry is still locked, an exception will be thrown.

Since:
10.0
Constructor Detail

TakeModifiers

public TakeModifiers()

TakeModifiers

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

Parameters:
modifiers1 -
modifiers2 -

TakeModifiers

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

Parameters:
modifiers1 -
modifiers2 -
modifiers3 -

TakeModifiers

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

Parameters:
modifiers -
Method Detail

contains

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

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

add

public TakeModifiers add(TakeModifiers 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 TakeModifiers remove(TakeModifiers 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.

isEvictOnly

public boolean isEvictOnly()
Checks if this instance contains the EVICT_ONLY setting.

Returns:
true if this instance contains the EVICT_ONLY 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.

isIfExists

public boolean isIfExists()
Checks if this instance contains the IF_EXISTS setting.

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

create

protected TakeModifiers create(int modifiers)
Specified by:
create in class SpaceProxyOperationModifiers

getCache

protected Map<Integer,SpaceProxyOperationModifiers> getCache()
Specified by:
getCache in class SpaceProxyOperationModifiers

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.