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:
Serializable, Comparable<RecordExistsAction>

public enum RecordExistsAction
extends Enum<RecordExistsAction>

How to handle writes when the record already exists.


Enum Constant Summary
CREATE_ONLY
          Create only.
DUPLICATE
          Deprecated. Use GenerationPolicy.DUPLICATE in WritePolicy.generationPolicy instead.
EXPECT_GEN_EQUAL
          Deprecated. Use GenerationPolicy.EXPECT_GEN_EQUAL in WritePolicy.generationPolicy instead.
EXPECT_GEN_GT
          Deprecated. Use GenerationPolicy.EXPECT_GEN_GT in WritePolicy.generationPolicy instead.
FAIL
          Deprecated. Use CREATE_ONLY instead.
REPLACE
          Create or update record.
REPLACE_ONLY
          Update record only.
UPDATE
          Create or update record.
UPDATE_ONLY
          Update record only.
 
Method Summary
static RecordExistsAction valueOf(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
Create or update record. Merge write command bins with existing bins.


UPDATE_ONLY

public static final RecordExistsAction UPDATE_ONLY
Update record only. Fail if record does not exist. Merge write command bins with existing bins.


REPLACE

public static final RecordExistsAction REPLACE
Create or update record. Delete existing bins not referenced by write command bins. Supported by Aerospike 2 server versions >= 2.7.5 and Aerospike 3 server versions >= 3.1.6.


REPLACE_ONLY

public static final RecordExistsAction REPLACE_ONLY
Update record only. Fail if record does not exist. Delete existing bins not referenced by write command bins. Supported by Aerospike 2 server versions >= 2.7.5 and Aerospike 3 server versions >= 3.1.6.


CREATE_ONLY

public static final RecordExistsAction CREATE_ONLY
Create only. Fail if record exists.


FAIL

@Deprecated
public static final RecordExistsAction FAIL
Deprecated. Use CREATE_ONLY instead.

EXPECT_GEN_EQUAL

@Deprecated
public static final RecordExistsAction EXPECT_GEN_EQUAL
Deprecated. Use GenerationPolicy.EXPECT_GEN_EQUAL in WritePolicy.generationPolicy instead.

EXPECT_GEN_GT

@Deprecated
public static final RecordExistsAction EXPECT_GEN_GT
Deprecated. Use GenerationPolicy.EXPECT_GEN_GT in WritePolicy.generationPolicy instead.

DUPLICATE

@Deprecated
public static final RecordExistsAction DUPLICATE
Deprecated. Use GenerationPolicy.DUPLICATE in WritePolicy.generationPolicy instead.
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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2012–2014 Aerospike, Inc. All rights reserved.