public class StorageConfig
extends java.lang.Object
storage.yml configuration file parser| Modifier and Type | Class and Description |
|---|---|
class |
StorageConfig.Cache
Options for the data cache (stored differently per method)
|
class |
StorageConfig.RemoteConnection
The remote connection details/properties
|
static class |
StorageConfig.SaveOn
Valid values for
storage.yml's cache.save-on option |
| Modifier and Type | Field and Description |
|---|---|
@NotNull StorageConfig.Cache |
cache
The
data cache options |
@NotNull AnnoyingFile<?> |
file
The
storage configuration file |
@NotNull StorageMethod |
method
The
storage method |
@NotNull java.lang.String |
migrationLogPrefix
Friendly name when migrating between methods for logging
Format: FILE_PATH (METHOD) |
@Nullable StorageConfig.RemoteConnection |
remoteConnection
The
remote connection details/properties |
| Constructor and Description |
|---|
StorageConfig(@NotNull AnnoyingFile<?> file)
Construct a new
StorageConfig instance to parse a storage configuration file |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.sql.Connection |
createConnection()
Create a new
Connection to the configured database |
@NotNull public final @NotNull AnnoyingFile<?> file
storage configuration file@NotNull public final @NotNull StorageMethod method
storage method@NotNull public final @NotNull StorageConfig.Cache cache
data cache options@Nullable public final @Nullable StorageConfig.RemoteConnection remoteConnection
remote connection details/properties@NotNull public final @NotNull java.lang.String migrationLogPrefix
FILE_PATH (METHOD)public StorageConfig(@NotNull
@NotNull AnnoyingFile<?> file)
StorageConfig instance to parse a storage configuration filefile - file@NotNull
public @NotNull java.sql.Connection createConnection()
throws ConnectionException
Connection to the configured databaseConnection to the databaseConnectionException - if the connection to the database fails for any reason