Class TakeModifiers

All Implemented Interfaces:
SmartExternalizable, 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:
  • Field Details

    • 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.
    • 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 Details

    • TakeModifiers

      public TakeModifiers()
    • TakeModifiers

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

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

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

    • contains

      public boolean contains(TakeModifiers modifiers)
      Checks if the specified modifier is set.
      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