6.6.8.1.2.1. Operation

public class Operation<V>

A Quasardb batch operation is at least an operation type associate with an alias. Some operation types need a value and/or a compare value. Operation types which doesn’t need a value are :

  • GET
  • REMOVE
  • GET_REMOVE

Operation types which needs a value are :

  • PUT
  • UPDATE
  • GET_UPDATE
  • REMOVE_IF

Operation type which needs a compare value are :

  • CAS

Please note that :

  • one invalid entry in operations array can invalidate all submitted batch operations. For example : if one “PUT operation” is invalid (aka put with null value), all submitted operations will have an error.
  • operation on reserved aliases are not allowed (see previous item)
Author:© quasardb - 2014

6.6.8.1.2.1.1. Constructors

6.6.8.1.2.1.1.1. Operation

public Operation()

6.6.8.1.2.1.1.2. Operation

public Operation(TypeOperation type, String alias)

Copy constructor : build a Quasardb batch operation with an operation type and an alias

Parameters:
  • type – Operation type on alias. See TypeOperation
  • alias – Alias associated with the given operation type

6.6.8.1.2.1.1.3. Operation

public Operation(TypeOperation type, String alias, V value)

Copy constructor : build a Quasardb batch operation with an operation type, an alias and a value

Parameters:
  • type – Operation type on alias. See TypeOperation
  • alias – Alias associated with the given operation type
  • value – Value associated with the given operation type and alias

6.6.8.1.2.1.1.4. Operation

public Operation(TypeOperation type, String alias, V value, V compareValue)

Copy constructor : build a Quasardb batch operation with an operation type, an alias, a value and a compare value

Parameters:
  • type – Operation type on alias. See TypeOperation
  • entry – alias associated with the given operation type
  • value – Value associated with the given operation type and alias
  • compareValue – Value to compare with the given value that is associated with the given operation type and alias.

6.6.8.1.2.1.2. Methods

6.6.8.1.2.1.2.1. getAlias

public String getAlias()

Get operation’s alias

Returns:Alias associated with the current batch operation.

6.6.8.1.2.1.2.2. getCompareValue

public V getCompareValue()

Get the compare value associated with the current batch operation.

Returns:Compare value associated with the current batch operation.

6.6.8.1.2.1.2.3. getType

public TypeOperation getType()

Get operation’s type

Returns:Operation type to associated with the current batch operation. See TypeOperation

6.6.8.1.2.1.2.4. getValue

public V getValue()

Get the value associated with the current batch operation.

Returns:Value associated with the current batch operation.

6.6.8.1.2.1.2.5. setAlias

public void setAlias(String alias)

Set operation’s alias

Parameters:
  • alias – Alias associated with the current batch operation.

6.6.8.1.2.1.2.6. setCompareValue

public void setCompareValue(V compareValue)

Set the compare value associated with the current batch operation.

Parameters:
  • compareValue – Compare value associated with the current batch operation.

6.6.8.1.2.1.2.7. setType

public void setType(TypeOperation type)

Set operation’s type

Parameters:
  • type – Operation type to associated with the current batch operation. See TypeOperation

6.6.8.1.2.1.2.8. setValue

public void setValue(V value)

Set the value associated with the current batch operation.

Parameters:
  • value – Value associated with the current batch operation.