Package io.deephaven.kv.etcd
Enum EtcdAclRWConnectionFactory
- All Implemented Interfaces:
Serializable,Comparable<EtcdAclRWConnectionFactory>,java.lang.constant.Constable
public enum EtcdAclRWConnectionFactory extends Enum<EtcdAclRWConnectionFactory>
This class manages a single underlying etcd connection (client) instance on behalf of its clients.
The etcd client instance provides the
EtcdAclRWRole
Users of this class transparently share the underlying etcd client.
By calling getClient() they get a wrapper object that should be closed by the caller
when it is no longer necessary; the wrapper ensures that the last active user of the underlying client
closes it. The class creates a new client if a new call to getInstance() happens after that.-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE -
Method Summary
Modifier and Type Method Description static io.deephaven.shadow.jetcd.io.etcd.jetcd.BetterClientgetClient()Get an etcd client with read-write permissions.static io.deephaven.kv.acl.AclContextgetContext()static io.deephaven.shadow.jetcd.io.etcd.jetcd.KVCreatorgetKVCreator()Get aKVCreatorwith read-write permissions.static EtcdAclRWConnectionFactoryvalueOf(String name)Returns the enum constant of this type with the specified name.static EtcdAclRWConnectionFactory[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException- if the argument is null
-
getClient
public static io.deephaven.shadow.jetcd.io.etcd.jetcd.BetterClient getClient()Get an etcd client with read-write permissions. Callers should callclose()on the returned client when they are done with it.- Returns:
- a
BetterClientinstance that should be closed when the caller is done with it.
-
getKVCreator
public static io.deephaven.shadow.jetcd.io.etcd.jetcd.KVCreator getKVCreator()Get aKVCreatorwith read-write permissions. Callers should callclose()on the returned object when they are done with it.- Returns:
- a
KVCreatorinstance that should be closed when the caller is done with it.
-
getContext
public static io.deephaven.kv.acl.AclContext getContext()
-