Promotion background
Easter Season IS HERE!
10% off limited time offer!
Ends in
00
H
00
M
00
S
limited time offer SAVE 10% NOW →
Packages com.phoenixplugins.sdk.api config
com.phoenixplugins.sdk.api.config

Interface DatabaseConfiguration



  • public interface DatabaseConfiguration
    Represents the configuration for a database connection, including both basic database settings and HikariCP connection pool settings.
    • Method Summary

      Modifier and Type Method and Description
      String getAddress()
      Returns the address of the database server.
      long getConnectionTimeout()
      Returns the maximum time to wait for a connection from the pool (in milliseconds).
      long getFetchTimeout()
      Returns the maximum time to wait for a database query (in milliseconds).
      long getIdleTimeout()
      Returns the maximum amount of time that a connection is allowed to sit idle in the pool (in milliseconds).
      int getMaximumPoolSize()
      Returns the maximum number of connections in the HikariCP connection pool.
      long getMaxLifetime()
      Returns the maximum lifetime of a connection in the HikariCP pool (in milliseconds).
      int getMinimumIdle()
      Returns the minimum number of idle connections in the HikariCP pool.
      String getName()
      Returns the name of the database.
      String getPassword()
      Returns the password for database authentication.
      int getPort()
      Returns the port on which the database server is listening.
      String getTablePrefix()
      Returns the prefix to use for table names.
      String getType()
      Returns the database type (e.g., "MYSQL", "SQLITE").
      String getUsername()
      Returns the username for database authentication.
      static DatabaseConfiguration sqlite()
      Returns a default SQLite database configuration.
    • Method Detail

      • sqlite

        static DatabaseConfiguration sqlite()
        Returns a default SQLite database configuration.

        The default configuration uses:

        • Type: "SQLITE"
        • Address: "localhost"
        • Database name: "phoenixtest_db"
        • Port: 3306
        • Maximum pool size: 10
        • Minimum idle connections: 5
        • Idle timeout: 300,000 ms
        • Maximum lifetime: 1,700,000 ms
        • Connection timeout: 30,000 ms
        Returns:
        a DatabaseConfiguration instance with default SQLite settings
      • getType

        String getType()
        Returns the database type (e.g., "MYSQL", "SQLITE").
        Returns:
        the type of the database
      • getAddress

        String getAddress()
        Returns the address of the database server.
        Returns:
        the database server address
      • getName

        String getName()
        Returns the name of the database.
        Returns:
        the database name
      • getPort

        int getPort()
        Returns the port on which the database server is listening.
        Returns:
        the database port
      • getUsername

        String getUsername()
        Returns the username for database authentication.
        Returns:
        the database username
      • getPassword

        String getPassword()
        Returns the password for database authentication.
        Returns:
        the database password
      • getTablePrefix

        String getTablePrefix()
        Returns the prefix to use for table names.
        Returns:
        the table name prefix
      • getMaximumPoolSize

        int getMaximumPoolSize()
        Returns the maximum number of connections in the HikariCP connection pool.
        Returns:
        the maximum pool size
      • getMinimumIdle

        int getMinimumIdle()
        Returns the minimum number of idle connections in the HikariCP pool.
        Returns:
        the minimum number of idle connections
      • getIdleTimeout

        long getIdleTimeout()
        Returns the maximum amount of time that a connection is allowed to sit idle in the pool (in milliseconds).
        Returns:
        the idle timeout in milliseconds
      • getMaxLifetime

        long getMaxLifetime()
        Returns the maximum lifetime of a connection in the HikariCP pool (in milliseconds).
        Returns:
        the maximum connection lifetime in milliseconds
      • getConnectionTimeout

        long getConnectionTimeout()
        Returns the maximum time to wait for a connection from the pool (in milliseconds).
        Returns:
        the connection timeout in milliseconds
      • getFetchTimeout

        long getFetchTimeout()
        Returns the maximum time to wait for a database query (in milliseconds).
        Returns:
        the fetch timeout in milliseconds
Last updated about 4 hours ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy
This site uses cookies to personalize content, enhance your experience. By continuing, you agree to our cookie use. Learn more