com.aerospike.client.policy
Enum RecordExistsAction

java.lang.Object
  extended by java.lang.Enum<RecordExistsAction>
      extended by com.aerospike.client.policy.RecordExistsAction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RecordExistsAction>

public enum RecordExistsAction
extends java.lang.Enum<RecordExistsAction>

How to handle writes when the record already exists.


Enum Constant Summary
DUPLICATE
          Create duplicate record if expected generation is not equal to server generation.
EXPECT_GEN_EQUAL
          Update/delete record if expected generation is equal to server generation.
EXPECT_GEN_GT
          Update/delete record if expected generation greater than the server generation.
FAIL
          Fail if record exists.
UPDATE
          Update record.
 
Method Summary
static RecordExistsAction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static RecordExistsAction[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UPDATE

public static final RecordExistsAction UPDATE
Update record.


EXPECT_GEN_EQUAL

public static final RecordExistsAction EXPECT_GEN_EQUAL
Update/delete record if expected generation is equal to server generation. Otherwise, fail.


EXPECT_GEN_GT

public static final RecordExistsAction EXPECT_GEN_GT
Update/delete record if expected generation greater than the server generation. Otherwise, fail. This is useful for restore after backup.


FAIL

public static final RecordExistsAction FAIL
Fail if record exists.


DUPLICATE

public static final RecordExistsAction DUPLICATE
Create duplicate record if expected generation is not equal to server generation.

Method Detail

values

public static RecordExistsAction[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RecordExistsAction c : RecordExistsAction.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RecordExistsAction valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null