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
Enumeration of transaction persistence protocols. These govern which protocol is executed between the frontend
and backend to drive persistence of a particular transaction.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAbort protocol.Transaction is ready.Simple commit protocol.Three-phase commit protocol (3PC). -
Method Summary
Modifier and TypeMethodDescriptionstatic PersistenceProtocol
static PersistenceProtocol
Returns the enum constant of this class with the specified name.static PersistenceProtocol[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.final void
writeTo
(DataOutput out)
-
Enum Constant Details
-
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
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
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
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
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
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 nameNullPointerException
- if the argument is null
-
writeTo
- Specified by:
writeTo
in interfaceWritableObject
- Throws:
IOException
-
readFrom
- Throws:
IOException
-