GigaSpaces XAP 9.0 API

com.gigaspaces.client
Class WriteModifiers

java.lang.Object
  extended by com.gigaspaces.client.SpaceProxyOperationModifiers
      extended by com.gigaspaces.client.WriteModifiers

public class WriteModifiers
extends SpaceProxyOperationModifiers

Provides modifiers to customize the behavior of write operations.

Since:
9.0.1
Author:
Niv Ingberg

Field Summary
static WriteModifiers NONE
          Empty - use operation default behavior.
static WriteModifiers PARTIAL_UPDATE
          Update only non-null properties, ignore null properties.
static WriteModifiers RETURN_PREV_ON_UPDATE
          If the entry already exists in the space, return the old entry in the result.
static WriteModifiers UPDATE_ONLY
          If the entry does not exists in the space throw an EntryNotInSpaceException.
static WriteModifiers UPDATE_OR_WRITE
          If the entry does not exists in the space it is written, otherwise it is updated.
static WriteModifiers WRITE_ONLY
          If the entry already exists in the space throw an EntryAlreadyInSpaceException.
 
Constructor Summary
WriteModifiers(WriteModifiers... modifiers)
          Creates a new modifiers from the specified modifiers.
WriteModifiers(WriteModifiers modifiers1, WriteModifiers modifiers2)
          Creates a new modifiers from the specified modifiers.
WriteModifiers(WriteModifiers modifiers1, WriteModifiers modifiers2, WriteModifiers modifiers3)
          Creates a new modifiers from the specified modifiers.
 
Method Summary
 WriteModifiers add(WriteModifiers modifiers)
          Creates a new modifiers instance which is a union of the specified modifiers and this instance.
 boolean contains(WriteModifiers modifiers)
          Checks if the specified modifier is set.
 boolean isPartialUpdate()
          Checks if this instance contains the PARTIAL_UPDATE setting.
 boolean isReturnPrevOnUpdate()
          Checks if this instance contains the RETURN_PREV_ON_UPDATE setting.
 boolean isUpdateOnly()
          Checks if this instance contains the UPDATE_ONLY setting.
 boolean isUpdateOrWrite()
          Checks if this instance contains the UPDATE_OR_WRITE setting.
 boolean isWriteOnly()
          Checks if this instance contains the WRITE_ONLY setting.
 WriteModifiers remove(WriteModifiers modifiers)
          Creates a new modifiers instance which excludes the specified modifiers from this instance.
 
Methods inherited from class com.gigaspaces.client.SpaceProxyOperationModifiers
add, contains, getCode, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final WriteModifiers NONE
Empty - use operation default behavior.


WRITE_ONLY

public static final WriteModifiers WRITE_ONLY
If the entry already exists in the space throw an EntryAlreadyInSpaceException. Notice: cannot be used in together with UPDATE_OR_WRITE, UPDATE_ONLY, PARTIAL_UPDATE.

See Also:
SpaceId}

UPDATE_ONLY

public static final WriteModifiers UPDATE_ONLY
If the entry does not exists in the space throw an EntryNotInSpaceException. Notice: cannot be used in together with UPDATE_OR_WRITE, WRITE_ONLY.

See Also:
SpaceId}

UPDATE_OR_WRITE

public static final WriteModifiers UPDATE_OR_WRITE
If the entry does not exists in the space it is written, otherwise it is updated. Notice: cannot be used in together with WRITE_ONLY, UPDATE_ONLY.

See Also:
SpaceId}

PARTIAL_UPDATE

public static final WriteModifiers PARTIAL_UPDATE
Update only non-null properties, ignore null properties. Notice: cannot be used in together with WRITE_ONLY.

See Also:
SpaceId}

RETURN_PREV_ON_UPDATE

public static final WriteModifiers RETURN_PREV_ON_UPDATE
If the entry already exists in the space, return the old entry in the result.

Constructor Detail

WriteModifiers

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

Parameters:
modifiers1 -
modifiers2 -

WriteModifiers

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

Parameters:
modifiers1 -
modifiers2 -
modifiers3 -

WriteModifiers

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

Parameters:
modifiers -
Method Detail

contains

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

Parameters:
modifiers -
Returns:
true if the specified modifier is set, false otherwise.

add

public WriteModifiers add(WriteModifiers 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 WriteModifiers remove(WriteModifiers 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.

isWriteOnly

public boolean isWriteOnly()
Checks if this instance contains the WRITE_ONLY setting.

Returns:
true if this instance contains the WRITE_ONLY setting, false otherwise.

isUpdateOnly

public boolean isUpdateOnly()
Checks if this instance contains the UPDATE_ONLY setting.

Returns:
true if this instance contains the UPDATE_ONLY setting, false otherwise.

isUpdateOrWrite

public boolean isUpdateOrWrite()
Checks if this instance contains the UPDATE_OR_WRITE setting.

Returns:
true if this instance contains the UPDATE_OR_WRITE setting, false otherwise.

isPartialUpdate

public boolean isPartialUpdate()
Checks if this instance contains the PARTIAL_UPDATE setting.

Returns:
true if this instance contains the PARTIAL_UPDATE setting, false otherwise.

isReturnPrevOnUpdate

public boolean isReturnPrevOnUpdate()
Checks if this instance contains the RETURN_PREV_ON_UPDATE setting.

Returns:
true if this instance contains the RETURN_PREV_ON_UPDATE setting, false otherwise.

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.