Enum Class PersistenceProtocol

java.lang.Object
java.lang.Enum<PersistenceProtocol>
org.opendaylight.controller.cluster.access.commands.PersistenceProtocol
All Implemented Interfaces:
Serializable, Comparable<PersistenceProtocol>, Constable, WritableObject

public enum PersistenceProtocol extends Enum<PersistenceProtocol> implements WritableObject
Enumeration of transaction persistence protocols. These govern which protocol is executed between the frontend and backend to drive persistence of a particular transaction.
  • Enum Constant Details

    • ABORT

      public static final PersistenceProtocol ABORT
      Abort protocol. The transaction has been aborted on the frontend and its effects should not be visible in the global history. This is a simple request/reply protocol.
    • SIMPLE

      public static final PersistenceProtocol SIMPLE
      Simple commit protocol. The transaction should be committed to the global history. The receiving backend is the only entity which needs to persist its effects, hence a simple request/reply protocol is sufficient.
    • THREE_PHASE

      public static final PersistenceProtocol THREE_PHASE
      Three-phase commit protocol (3PC). The transaction should be committed to the global history, but it is a part of a transaction spanning multiple entities and coordination is needed to drive persistence.
    • READY

      public static final PersistenceProtocol READY
      Transaction is ready. This is not a really a persistence protocol, but an indication that frontend has completed modifications on the transaction and considers it ready, without deciding the actual commit protocol.
  • Method Details

    • values

      public static PersistenceProtocol[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PersistenceProtocol valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • writeTo

      public final void writeTo(DataOutput out) throws IOException
      Specified by:
      writeTo in interface WritableObject
      Throws:
      IOException
    • readFrom

      public static PersistenceProtocol readFrom(DataInput in) throws IOException
      Throws:
      IOException