- java.lang.Object
-
- java.lang.Enum<AdbaSessionProperty>
-
- jdk.incubator.sql2.AdbaSessionProperty
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AdbaSessionProperty>
,SessionProperty
public enum AdbaSessionProperty extends java.lang.Enum<AdbaSessionProperty> implements SessionProperty
A set ofSessionProperty
commonly supported. Implementations are not required to support all of these properties.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AdbaSessionProperty.Caching
Specifies how much flexibility theDataSource
has in satisfying a request for aSession
possibly by using cached data source resources.static class
AdbaSessionProperty.TransactionIsolation
-
Enum Constant Summary
Enum Constants Enum Constant Description CACHING
COMMIT_ON_CLOSE
EXECUTOR
NETWORK_TIMEOUT
PASSWORD
READ_ONLY
SHARDING_GROUP_KEY
SHARDING_KEY
TRANSACTION_ISOLATION
URL
USER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
defaultValue()
Return the value for this property to use if no other value is set.boolean
isSensitive()
Returns true if thisSessionProperty
contains sensitive information such as a password or encryption key.java.lang.Class<?>
range()
Return the type of the value of thisSessionProperty
.boolean
validate(java.lang.Object value)
Determine whether a value is valid for thisSessionProperty
.static AdbaSessionProperty
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AdbaSessionProperty[]
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 interface jdk.incubator.sql2.SessionProperty
configureOperation, name
-
-
-
-
Enum Constant Detail
-
CACHING
public static final AdbaSessionProperty CACHING
-
COMMIT_ON_CLOSE
public static final AdbaSessionProperty COMMIT_ON_CLOSE
-
EXECUTOR
public static final AdbaSessionProperty EXECUTOR
-
NETWORK_TIMEOUT
public static final AdbaSessionProperty NETWORK_TIMEOUT
-
PASSWORD
public static final AdbaSessionProperty PASSWORD
-
READ_ONLY
public static final AdbaSessionProperty READ_ONLY
-
SHARDING_KEY
public static final AdbaSessionProperty SHARDING_KEY
-
SHARDING_GROUP_KEY
public static final AdbaSessionProperty SHARDING_GROUP_KEY
-
TRANSACTION_ISOLATION
public static final AdbaSessionProperty TRANSACTION_ISOLATION
-
URL
public static final AdbaSessionProperty URL
-
USER
public static final AdbaSessionProperty USER
-
-
Method Detail
-
values
public static AdbaSessionProperty[] 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 (AdbaSessionProperty c : AdbaSessionProperty.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AdbaSessionProperty valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
range
public java.lang.Class<?> range()
Return the type of the value of thisSessionProperty
. Any value set for this property must be assignable to this type.- Specified by:
range
in interfaceSessionProperty
- Returns:
- the type of the values of this
SessionProperty
-
validate
public boolean validate(java.lang.Object value)
Determine whether a value is valid for thisSessionProperty
. Returnstrue
ifvalue
is valid andfalse
otherwise.- Specified by:
validate
in interfaceSessionProperty
- Parameters:
value
- a value for thisSessionProperty
- Returns:
true
iffvalue
is valid for thisSessionProperty
-
defaultValue
public java.lang.Object defaultValue()
Return the value for this property to use if no other value is set. For this to have any meaning for a user defined property the property must be registered with theDataSource
by callingDataSource.Builder.registerSessionProperty(jdk.incubator.sql2.SessionProperty)
.- Specified by:
defaultValue
in interfaceSessionProperty
- Returns:
- the default value or
null
if there is no default value
-
isSensitive
public boolean isSensitive()
Returns true if thisSessionProperty
contains sensitive information such as a password or encryption key.- Specified by:
isSensitive
in interfaceSessionProperty
- Returns:
- true iff this is sensitive
-
-