GigaSpaces XAP 7.0 API

com.j_spaces.core.client
Class UpdateModifiers

java.lang.Object
  extended by com.j_spaces.core.client.UpdateModifiers

public class UpdateModifiers
extends Object

The Modifier class provides static methods and constants to decode update types modifiers. The sets of modifiers are represented as integers with distinct bit positions representing different modifiers.

Version:
4.0
Author:
Yechiel Fefer, Igor Goldenberg

Field Summary
static int PARTIAL_UPDATE
          The int value representing the PARTIAL_UPDATE modifier.
static int UPDATE_ONLY
          The int value representing the UPDATE_OR_ONLY modifier.
static int UPDATE_OR_WRITE
          The int value representing the UPDATE_OR_WRITE modifier.
static int WRITE_ONLY
          The int value representing the WRITE_ONLY modifier.
 
Constructor Summary
UpdateModifiers()
           
 
Method Summary
static boolean isPartialUpdate(int mod)
          Return true if the integer argument includes the PARTIAL_UPDATE modifier, false otherwise.
static boolean isUpdate(int mod)
          Return true if the integer argument includes the UPDATE_ONLY modifier or PARTIAL_UPDATE modifier or UPDATE_OR_WRITE modifier, false otherwise.
static boolean isUpdateOnly(int mod)
          Return true if the integer argument includes the UPDATE_ONLY modifier, false otherwise.
static boolean isUpdateOrWrite(int mod)
          Return true if the integer argument includes the UPDATE_OR_WRITE modifier, false otherwise.
static boolean isWriteOnly(int mod)
          Return true if the integer argument includes the WRITE_ONLY modifier, false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WRITE_ONLY

public static final int WRITE_ONLY
The int value representing the WRITE_ONLY modifier. When set: the entry to be written must not reside in the space, no new entry will be written otherwise and an EntryAlreadyInSpaceException will be thrown. Notice: can't be used in together with UPDATE_OR_WRITE or UPDATE_ONLY.

See Also:
Constant Field Values

UPDATE_ONLY

public static final int UPDATE_ONLY
The int value representing the UPDATE_OR_ONLY modifier. When set alone: the entry to be updated must be reside in the space, no new entry will be written otherwise and an EntryNotInSpaceException will be thrown.

See Also:
Constant Field Values

UPDATE_OR_WRITE

public static final int UPDATE_OR_WRITE
The int value representing the UPDATE_OR_WRITE modifier. When set: if the entry to be updated does not reside in the space, a new entry is written

Notice: can't be used in together with PARTIAL_UPDATE

See Also:
Constant Field Values

PARTIAL_UPDATE

public static final int PARTIAL_UPDATE
The int value representing the PARTIAL_UPDATE modifier. If set, null values in the updated entry are treated as "leave as it is"

Notice: can't be used in together with UPDATE_OR_WRITE or WRITE_ONLY.

See Also:
Constant Field Values
Constructor Detail

UpdateModifiers

public UpdateModifiers()
Method Detail

isUpdateOrWrite

public static boolean isUpdateOrWrite(int mod)
Return true if the integer argument includes the UPDATE_OR_WRITE modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the public modifier; false otherwise.

isPartialUpdate

public static boolean isPartialUpdate(int mod)
Return true if the integer argument includes the PARTIAL_UPDATE modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the PARTIAL_UPDATE modifier; false otherwise.

isUpdateOnly

public static boolean isUpdateOnly(int mod)
Return true if the integer argument includes the UPDATE_ONLY modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the UPDATE_ONLY modifier; false otherwise.

isUpdate

public static boolean isUpdate(int mod)
Return true if the integer argument includes the UPDATE_ONLY modifier or PARTIAL_UPDATE modifier or UPDATE_OR_WRITE modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the UPDATE_ONLY modifier or PARTIAL_UPDATE modifier or UPDATE_OR_WRITE modifier; false otherwise.

isWriteOnly

public static boolean isWriteOnly(int mod)
Return true if the integer argument includes the WRITE_ONLY modifier, false otherwise.

Parameters:
mod - a set of modifiers
Returns:
true if mod includes the WRITE_ONLY modifier; false otherwise.

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.