com.thinkaurelius.titan.core.schema

## Enum ConsistencyModifier

- java.lang.Object
- - java.lang.Enum<ConsistencyModifier>
  - - com.thinkaurelius.titan.core.schema.ConsistencyModifier

- All Implemented Interfaces:
    Serializable, Comparable<ConsistencyModifier>

      public enum ConsistencyModifier
      extends Enum<ConsistencyModifier>

  Used to control Titan's consistency behavior on eventually consistent or other non-transactional backend systems. The consistency behavior can be defined for individual `TitanSchemaElement`s which then applies to all instances.

  Consistency modifiers are installed on schema elements via `TitanManagement.setConsistency(TitanSchemaElement, ConsistencyModifier)` and can be read using `TitanManagement.getConsistency(TitanSchemaElement)`.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `DEFAULT` Uses the default consistency model guaranteed by the enclosing transaction against the configured storage backend.
    `FORK` Causes Titan to delete and add a new edge/property instead of overwriting an existing one, hence avoiding potential concurrent write conflicts.
    `LOCK` Locks will be explicitly acquired to guarantee consistency if the storage backend supports locks.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ConsistencyModifier` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ConsistencyModifier[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### DEFAULT

          public static final ConsistencyModifier DEFAULT

      Uses the default consistency model guaranteed by the enclosing transaction against the configured storage backend. What this means exactly, depends on the configuration of the storage backend as well as the (optional) configuration of the enclosing transaction.

    - #### LOCK

          public static final ConsistencyModifier LOCK

      Locks will be explicitly acquired to guarantee consistency if the storage backend supports locks. The exact consistency guarantees depend on the configured lock implementation. Note, that locking may be ignored under certain transaction configurations.

    - #### FORK

          public static final ConsistencyModifier FORK

      Causes Titan to delete and add a new edge/property instead of overwriting an existing one, hence avoiding potential concurrent write conflicts. This only applies to multi-edges and list-properties. Note, that this potentially impacts how the data should be read.

  - ### Method Detail

    - #### values

          public static ConsistencyModifier[] 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 (ConsistencyModifier c : ConsistencyModifier.values())
              System.out.println(c);

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

    - #### valueOf

          public static ConsistencyModifier 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. All rights reserved.