- All Implemented Interfaces:
Serializable
,Comparable<AccessMode>
,Constable
Used by Routing Driver to decide if a transaction should be routed to a write server or a read server in a cluster.
When running a transaction, a write transaction requires a server that supports writes.
A read transaction, on the other hand, requires a server that supports read operations.
This classification is key for routing driver to route transactions to a cluster correctly.
While any AccessMode
will be ignored while running transactions via a driver towards a single server.
As the single server serves both read and write operations at the same time.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccessMode
Returns the enum constant of this class with the specified name.static AccessMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ
Use this for transactions that requires a read server in a cluster -
WRITE
Use this for transactions that requires a write server in a cluster
-
-
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
-