Package com.gigaspaces.client
Class TakeModifiers
java.lang.Object
com.gigaspaces.client.SpaceProxyOperationModifiers
com.gigaspaces.client.TakeModifiers
- All Implemented Interfaces:
SmartExternalizable,Externalizable,Serializable
Provides modifiers to customize the behavior of take operations.
- Since:
- 9.0.1
- Author:
- Niv Ingberg
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TakeModifiersRemove matching entries from memory only (do not remove from the underlying EDS).static final TakeModifiersSearch for matching entries using First-In-First-Out order.static final TakeModifiersSearch for matching entries in the FIFO group indicated in the template.static final TakeModifiersBlocks only if there's a matching entry which is locked by another transaction.static final TakeModifiersIf 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 final TakeModifiersSearch for matching entries in cache memory only (do not use the underlying EDS).static final TakeModifiersEmpty - use operation default behavior. -
Constructor Summary
ConstructorsConstructorDescriptionTakeModifiers(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
Modifier and TypeMethodDescriptionadd(TakeModifiers modifiers) Creates a new modifiers instance which is a union of the specified modifiers and this instance.booleancontains(TakeModifiers modifiers) Checks if the specified modifier is set.protected TakeModifierscreate(int modifiers) protected Map<Integer,SpaceProxyOperationModifiers> getCache()booleanChecks if this instance contains theEVICT_ONLYsetting.booleanisFifo()Checks if this instance contains theFIFOsetting.booleanChecks if this instance contains theFIFO_GROUPING_POLLsetting.booleanChecks if this instance contains theIF_EXISTSsetting.booleanChecks if this instance contains theIGNORE_PARTIAL_FAILUREsetting.booleanChecks if this instance contains theMEMORY_ONLY_SEARCHsetting.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, writeExternalMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.gigaspaces.serialization.SmartExternalizable
enabledSmartExternalizableWithReference
-
Field Details
-
NONE
Empty - use operation default behavior. -
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
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
Search for matching entries using First-In-First-Out order. -
FIFO_GROUPING_POLL
Search for matching entries in the FIFO group indicated in the template. The template must have a property marked with theSpaceFifoGroupingProperty. -
MEMORY_ONLY_SEARCH
Search for matching entries in cache memory only (do not use the underlying EDS). -
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 Details
-
TakeModifiers
public TakeModifiers() -
TakeModifiers
Creates a new modifiers from the specified modifiers. -
TakeModifiers
Creates a new modifiers from the specified modifiers. -
TakeModifiers
Creates a new modifiers from the specified modifiers.
-
-
Method Details
-
contains
Checks if the specified modifier is set.- Returns:
- true if the specified modifier is set, false otherwise.
-
add
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
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 theEVICT_ONLYsetting.- Returns:
- true if this instance contains the
EVICT_ONLYsetting, false otherwise.
-
isIgnorePartialFailure
public boolean isIgnorePartialFailure()Checks if this instance contains theIGNORE_PARTIAL_FAILUREsetting.- Returns:
- true if this instance contains the
IGNORE_PARTIAL_FAILUREsetting, false otherwise.
-
isFifo
public boolean isFifo()Checks if this instance contains theFIFOsetting.- Returns:
- true if this instance contains the
FIFOsetting, false otherwise.
-
isFifoGroupingPoll
public boolean isFifoGroupingPoll()Checks if this instance contains theFIFO_GROUPING_POLLsetting.- Returns:
- true if this instance contains the
FIFO_GROUPING_POLLsetting, false otherwise.
-
isMemoryOnlySearch
public boolean isMemoryOnlySearch()Checks if this instance contains theMEMORY_ONLY_SEARCHsetting.- Returns:
- true if this instance contains the
MEMORY_ONLY_SEARCHsetting, false otherwise.
-
isIfExists
public boolean isIfExists()Checks if this instance contains theIF_EXISTSsetting.- Returns:
- true if this instance contains the
IF_EXISTSsetting, false otherwise.
-
create
- Specified by:
createin classSpaceProxyOperationModifiers
-
getCache
- Specified by:
getCachein classSpaceProxyOperationModifiers
-