tyrex.resource
public final class ReuseOptions extends Object
Field Summary | |
---|---|
static int | REUSE_NO_TRANSACTION_OFF
The reuse option that states if the resources are enlisted
in a transaction then resources are reused after
the transaction commits or rolls back. |
static String | REUSE_NO_TRANSACTION_OFF_NAME
The name of the REUSE_NO_TRANSACTION_OFF option. |
static int | REUSE_OFF
The reuse option that states the resources are not to be
reused. |
static String | REUSE_OFF_NAME
The name of the REUSE_OFF option. |
static int | REUSE_ON
The reuse option that states the resources are to be
reused after they are currently used. |
static String | REUSE_ON_NAME
The name of the REUSE_ON option. |
static int | REUSE_TRANSACTION
The reuse option that states the if resources are enlisted
in a transaction then resources can be reused only after
the transaction commits or rolls back. |
static String | REUSE_TRANSACTION_NAME
The name of the REUSE_TRANSACTION option. |
static int | REUSE_TRANSACTION_OFF
The reuse option that states if the resources are enlisted
in a transaction then resources are destroyed after
the transaction commits or rolls back. |
static String | REUSE_TRANSACTION_OFF_NAME
The name of the REUSE_TRANSACTION_OFF option. |
Method Summary | |
---|---|
static int | fromString(String string)
Convert the specified string to the reuse option.
|
static boolean | isValid(int option)
Return true if the reuse option is valid. |
static String | toString(int option)
Convert the specified option to the reuse option name.
|
static void | validate(int option)
Validate that the option is recognized
|
Parameters: string. One of REUSE_ON_NAME, REUSE_OFF_NAME, REUSE_TRANSACTION_NAME or REUSE_TRANSACTION_OFF_NAME.
Returns: One of REUSE_ON, REUSE_OFF, REUSE_TRANSACTION or REUSE_TRANSACTION_OFF.
Throws: IllegalArgumentException if the string is not recognised or if it's null.
Parameters: option the option
Returns: true if the reuse option is valid. Return false if the reuse option is invalid.
Parameters: option. One of REUSE_ON, REUSE_OFF, REUSE_TRANSACTION or REUSE_TRANSACTION_OFF.
Returns: One of REUSE_ON_NAME, REUSE_OFF_NAME, REUSE_TRANSACTION_NAME or REUSE_TRANSACTION_OFF_NAME.
Throws: IllegalArgumentException if the option is not recognised.
Parameters: option. One of REUSE_ON, REUSE_OFF, REUSE_TRANSACTION or REUSE_TRANSACTION_OFF.
Throws: IllegalArgumentException if the option is not recognised.