Class 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 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_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 is false.
        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 is false.
        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
    • Constructor Detail

      • Constants

        public Constants()