public class YAMLDialect extends Dialect
Dialect.MigrationDatadataManager| Constructor and Description |
|---|
YAMLDialect(@NotNull DataManager dataManager)
Creates a new H2 dialect
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable Value |
getFromCacheImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String key)
Get a value from the cache
|
protected @NotNull java.util.Optional<java.lang.String> |
getFromDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String key)
Get a value from the database
|
protected @NotNull java.util.Optional<Dialect.MigrationData> |
getMigrationDataFromDatabaseImpl(@NotNull DataManager newManager)
Get migration data from the database
|
void |
markRemovedInCacheImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String key)
Mark a value as removed in the cache
|
protected boolean |
removeFromDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String key)
Remove a value from the database
|
void |
saveCacheImpl()
Save all cache data to the database
|
void |
saveCacheImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target)
Save a specific target in a table to the cache
|
void |
setToCacheImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String key,
@NotNull Value value)
Set a value to the cache
|
protected @NotNull java.util.Set<FailedSet> |
setToDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.util.concurrent.ConcurrentHashMap<java.lang.String,Value> data)
Set multiple values to the database
|
protected @Nullable FailedSet |
setToDatabaseImpl(@NotNull java.lang.String table,
@NotNull java.lang.String target,
@NotNull java.lang.String key,
@NotNull java.lang.String value)
Set a value to the database
|
getFromCache, getFromDatabase, getMigrationDataFromDatabase, markRemovedInCache, removeValueFromDatabase, saveCache, saveCache, setToCache, setToDatabase, setToDatabase, setToDatabasepublic YAMLDialect(@NotNull
@NotNull DataManager dataManager)
dataManager - Dialect.dataManager@Nullable public @Nullable Value getFromCacheImpl(@NotNull @NotNull java.lang.String table, @NotNull @NotNull java.lang.String target, @NotNull @NotNull java.lang.String key)
DialectgetFromCacheImpl in class Dialecttable - the tabletarget - the targetkey - the keyValue, null if it isn't cachedpublic void setToCacheImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.lang.String key,
@NotNull
@NotNull Value value)
DialectsetToCacheImpl in class Dialecttable - the tabletarget - the targetkey - the keyvalue - the value inside a Valuepublic void markRemovedInCacheImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.lang.String key)
DialectmarkRemovedInCacheImpl in class Dialecttable - the tabletarget - the targetkey - the keypublic void saveCacheImpl()
DialectsaveCacheImpl in class Dialectpublic void saveCacheImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target)
DialectsaveCacheImpl in class Dialecttable - the table to save intarget - the target to save@NotNull protected @NotNull java.util.Optional<Dialect.MigrationData> getMigrationDataFromDatabaseImpl(@NotNull @NotNull DataManager newManager)
DialectgetMigrationDataFromDatabaseImpl in class DialectnewManager - the new DataManager to migrate to@NotNull
protected @NotNull java.util.Optional<java.lang.String> getFromDatabaseImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.lang.String key)
DialectgetFromDatabaseImpl in class Dialecttable - the table to get fromtarget - the target to get fromkey - the key to get@Nullable protected @Nullable FailedSet setToDatabaseImpl(@NotNull @NotNull java.lang.String table, @NotNull @NotNull java.lang.String target, @NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.String value)
DialectsetToDatabaseImpl in class Dialecttable - the table to set totarget - the target to set tokey - the key to setvalue - the value to set@NotNull protected @NotNull java.util.Set<FailedSet> setToDatabaseImpl(@NotNull @NotNull java.lang.String table, @NotNull @NotNull java.lang.String target, @NotNull @NotNull java.util.concurrent.ConcurrentHashMap<java.lang.String,Value> data)
DialectsetToDatabaseImpl in class Dialecttable - the table to set totarget - the target to set todata - the data to setFailedSetsprotected boolean removeFromDatabaseImpl(@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String target,
@NotNull
@NotNull java.lang.String key)
DialectremoveFromDatabaseImpl in class Dialecttable - the table to remove fromtarget - the target to remove fromkey - the key to remove