GigaSpaces XAP 9.7.2 API

com.gigaspaces.client
Class CountModifiers

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

public class CountModifiers
extends com.gigaspaces.client.IsolationLevelModifiers

Provides modifiers to customize the behavior of count operations.

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

Field Summary
static 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.
static CountModifiers EXCLUSIVE_READ_LOCK
          The resulting entries are locked, blocking update/remove from other transactions.
static CountModifiers MEMORY_ONLY_SEARCH
          Search for matching entries in cache memory only (do not use the underlying EDS).
static CountModifiers NONE
          Empty - use operation default behavior.
static 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.
static 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).
 
Constructor Summary
CountModifiers()
           
CountModifiers(CountModifiers... modifiers)
          Creates a new modifiers from the specified modifiers.
CountModifiers(CountModifiers modifiers1, CountModifiers modifiers2)
          Creates a new modifiers from the specified modifiers.
CountModifiers(CountModifiers modifiers1, CountModifiers modifiers2, CountModifiers modifiers3)
          Creates a new modifiers from the specified modifiers.
 
Method Summary
 CountModifiers add(CountModifiers modifiers)
          Creates a new modifiers instance which is a union of the specified modifiers and this instance.
 boolean contains(CountModifiers modifiers)
          Checks if the specified modifier is set.
protected  CountModifiers create(int modifiers)
           
protected  Map<Integer,SpaceProxyOperationModifiers> getCache()
           
 boolean isExclusiveReadLock()
          Checks if this instance contains the EXCLUSIVE_READ_LOCK setting.
 boolean isMemoryOnlySearch()
          Checks if this instance contains the MEMORY_ONLY_SEARCH setting.
 CountModifiers remove(CountModifiers modifiers)
          Creates a new modifiers instance which excludes the specified modifiers from this instance.
 CountModifiers setIsolationLevel(CountModifiers isolationLevel)
          Creates a new modifiers instance with the specified isolation level set and any other isolation level unset.
 
Methods inherited from class com.gigaspaces.client.IsolationLevelModifiers
isDirtyRead, isReadCommitted, isRepeatableRead, setIsolationLevel
 
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 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.


MEMORY_ONLY_SEARCH

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

Constructor Detail

CountModifiers

public CountModifiers()

CountModifiers

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

Parameters:
modifiers1 -
modifiers2 -

CountModifiers

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

Parameters:
modifiers1 -
modifiers2 -
modifiers3 -

CountModifiers

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

Parameters:
modifiers -
Method Detail

contains

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

Parameters:
modifiers -
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

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.