public class StorageConfig
extends java.lang.Object
storage.yml configuration file parser| Modifier and Type | Class and Description |
|---|---|
class |
StorageConfig.Cache
Options for the
DataManager.dataCache |
static class |
StorageConfig.Method
The storage 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 StorageConfig.Method |
method
The
storage 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 java.lang.String |
getMigrationName()
Friendly name when migrating between methods
Format: FILE_PATH (METHOD) |
@NotNull public final @NotNull AnnoyingFile<?> file
storage configuration file@NotNull public final @NotNull StorageConfig.Method method
storage method@NotNull public final @NotNull StorageConfig.Cache cache
data cache options@Nullable public final @Nullable StorageConfig.RemoteConnection remoteConnection
remote connection details/propertiespublic StorageConfig(@NotNull
@NotNull AnnoyingFile<?> file)
StorageConfig instance to parse a storage configuration filefile - file@NotNull public @NotNull java.lang.String getMigrationName()
FILE_PATH (METHOD)@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