Class CountModifiers

All Implemented Interfaces:
SmartExternalizable, Externalizable, Serializable

public class CountModifiers extends IsolationLevelModifiers
Provides modifiers to customize the behavior of count operations.
Since:
9.0.1
Author:
Niv Ingberg
See Also:
  • Field Details

    • NONE

      public static final CountModifiers NONE
      Empty - use operation default behavior.
    • REPEATABLE_READ

      public static final CountModifiers 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 CountModifiers 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 CountModifiers 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 CountModifiers EXCLUSIVE_READ_LOCK
      The resulting entries are locked, blocking update/remove from other transactions.
  • Constructor Details

    • CountModifiers

      public CountModifiers()
      Required for Externalizable
    • CountModifiers

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

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

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

    • contains

      public boolean contains(CountModifiers modifiers)
      Checks if the specified modifier is set.
      Returns:
      true if the specified modifier is set, false otherwise.
    • add

      public CountModifiers add(CountModifiers 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 CountModifiers remove(CountModifiers 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.
    • setIsolationLevel

      public CountModifiers setIsolationLevel(CountModifiers isolationLevel)
      Creates a new modifiers instance with the specified isolation level set and any other isolation level unset.
      Parameters:
      isolationLevel - The isolation level to set.
      Returns:
      The modifiers from this instance with the new isolation level set and any previous one removed.
    • 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.
    • 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.
    • create

      protected CountModifiers create(int modifiers)
      Specified by:
      create in class SpaceProxyOperationModifiers
    • getCache

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