Class Constants
- java.lang.Object
-
- com.feedzai.commons.sql.abstraction.util.Constants
-
public final class Constants extends Object
Common constants to be used in PDB.- Since:
- 2.0.0
- Author:
- Rui Vilao (rui.vilao@feedzai.com)
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ALLOW_COLUMN_DROPBy default don't allow column drops.static intDEFAULT_BLOB_BUFFER_SIZEThe default buffer size for blobs.static intDEFAULT_CHECK_CONNECTION_TIMEOUTThe default timeout when checking if a connection is down.static booleanDEFAULT_COMPRESS_LOBSIndicates if the LOB columns should be compressed.static booleanDEFAULT_DISABLE_LOB_CACHINGIndicates if LOB data caching should be disabled, to avoid consuming too much memory and/or disk space in the DB server.static intDEFAULT_FETCH_SIZEThe default fetch size.static IsolationLevelDEFAULT_ISOLATION_LEVELThe default isolation level.static intDEFAULT_LOGIN_TIMEOUTDefault duration (in seconds) to wait for the database connection to be established.static intDEFAULT_MAX_IDENTIFIER_SIZEThe default maximum identifier size.static longDEFAULT_MAXIMUM_TIME_BATCH_SHUTDOWNThe default maximum amount of time to wait when batches are shutting down.static booleanDEFAULT_RECONNECT_ON_LOSTBy default reconnects on connection lost.static longDEFAULT_RETRY_INTERVALThe default retry interval.static StringDEFAULT_SCHEMA_POLICYThe default schema policy.static StringDEFAULT_SECRET_LOCATIONThe default secret location.static intDEFAULT_SELECT_QUERY_TIMEOUTThe default select query timeout (in seconds).static intDEFAULT_SOCKET_TIMEOUTThe default socket connection timeout (in seconds).static intDEFAULT_VARCHAR_SIZEThe default var char size.static intNO_TIMEOUTThe value that represents absence of a timeout.static Set<Class<? extends Throwable>>RETRYABLE_EXCEPTIONSA set of PDB Exceptions that can be considered retryable (when these are thrown, it is possible that a client application will be successfull if it performs again the same actions that resulted in the exception).static StringSQL_STATE_TRANSACTION_FAILUREThe SQL standard State code for "transaction failure".static charUNIT_SEPARATOR_CHARACTERThe unit separator character.
-
Constructor Summary
Constructors Constructor Description Constants()
-
-
-
Field Detail
-
UNIT_SEPARATOR_CHARACTER
public static final char UNIT_SEPARATOR_CHARACTER
The unit separator character.- See Also:
- Constant Field Values
-
NO_TIMEOUT
public static final int NO_TIMEOUT
The value that represents absence of a timeout.- See Also:
- Constant Field Values
-
DEFAULT_VARCHAR_SIZE
public static final int DEFAULT_VARCHAR_SIZE
The default var char size.- See Also:
- Constant Field Values
-
DEFAULT_SCHEMA_POLICY
public static final String DEFAULT_SCHEMA_POLICY
The default schema policy.- See Also:
- Constant Field Values
-
DEFAULT_MAX_IDENTIFIER_SIZE
public static final int DEFAULT_MAX_IDENTIFIER_SIZE
The default maximum identifier size.- See Also:
- Constant Field Values
-
DEFAULT_BLOB_BUFFER_SIZE
public static final int DEFAULT_BLOB_BUFFER_SIZE
The default buffer size for blobs.- See Also:
- Constant Field Values
-
DEFAULT_RETRY_INTERVAL
public static final long DEFAULT_RETRY_INTERVAL
The default retry interval. 10sec.
-
DEFAULT_ISOLATION_LEVEL
public static final IsolationLevel DEFAULT_ISOLATION_LEVEL
The default isolation level.
-
DEFAULT_RECONNECT_ON_LOST
public static final boolean DEFAULT_RECONNECT_ON_LOST
By default reconnects on connection lost.- See Also:
- Constant Field Values
-
DEFAULT_SECRET_LOCATION
public static final String DEFAULT_SECRET_LOCATION
The default secret location.- See Also:
- Constant Field Values
-
DEFAULT_ALLOW_COLUMN_DROP
public static final boolean DEFAULT_ALLOW_COLUMN_DROP
By default don't allow column drops.- See Also:
- Constant Field Values
-
DEFAULT_FETCH_SIZE
public static final int DEFAULT_FETCH_SIZE
The default fetch size.- See Also:
- Constant Field Values
-
DEFAULT_MAXIMUM_TIME_BATCH_SHUTDOWN
public static final long DEFAULT_MAXIMUM_TIME_BATCH_SHUTDOWN
The default maximum amount of time to wait when batches are shutting down. 5 minutes.
-
DEFAULT_COMPRESS_LOBS
public static final boolean DEFAULT_COMPRESS_LOBS
Indicates if the LOB columns should be compressed. This is only possible on implementations that allow this behavior. The default value isfalse.- See Also:
- Constant Field Values
-
DEFAULT_DISABLE_LOB_CACHING
public static final boolean DEFAULT_DISABLE_LOB_CACHING
Indicates if LOB data caching should be disabled, to avoid consuming too much memory and/or disk space in the DB server. This is only possible on implementations that support this behavior. The default value isfalse.- See Also:
- Constant Field Values
-
DEFAULT_LOGIN_TIMEOUT
public static final int DEFAULT_LOGIN_TIMEOUT
Default duration (in seconds) to wait for the database connection to be established. By default, there is no timeout at establishing the connection, so pdb will wait indefinitely for the database.- See Also:
- Constant Field Values
-
DEFAULT_SOCKET_TIMEOUT
public static final int DEFAULT_SOCKET_TIMEOUT
The default socket connection timeout (in seconds). By default, there is no timeout at the socket level, so pdb will wait indefinitely for the database to respond the queries.- See Also:
- Constant Field Values
-
DEFAULT_SELECT_QUERY_TIMEOUT
public static final int DEFAULT_SELECT_QUERY_TIMEOUT
The default select query timeout (in seconds). By default, there is no query timeout, so pdb will wait indefinitely for the database to respond to queries.- See Also:
- Constant Field Values
-
SQL_STATE_TRANSACTION_FAILURE
public static final String SQL_STATE_TRANSACTION_FAILURE
The SQL standard State code for "transaction failure". This may be caused by serialization failures in concurrent transactions in the DB server and possibly deadlocks; this code indicates that the client app may retry the transaction.- See Also:
- Constant Field Values
-
RETRYABLE_EXCEPTIONS
public static final Set<Class<? extends Throwable>> RETRYABLE_EXCEPTIONS
A set of PDB Exceptions that can be considered retryable (when these are thrown, it is possible that a client application will be successfull if it performs again the same actions that resulted in the exception).- Since:
- 2.5.1
-
DEFAULT_CHECK_CONNECTION_TIMEOUT
public static final int DEFAULT_CHECK_CONNECTION_TIMEOUT
The default timeout when checking if a connection is down.- Since:
- 2.7.2
- See Also:
- Constant Field Values
-
-