Class NoSqlDatabaseCreator<T extends NoSqlMigration>
- java.lang.Object
-
- cn.boboweike.carrot.storage.nosql.common.NoSqlDatabaseCreator<T>
-
- Direct Known Subclasses:
MongoDBCreator
public abstract class NoSqlDatabaseCreator<T extends NoSqlMigration> extends Object
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNoSqlDatabaseCreator(List<T> migrations)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stream<T>getMigrations()protected abstract booleanisIncreasePartitions(T noSqlMigration)protected abstract booleanisNewMigration(T noSqlMigration)protected booleanisValidMigration(T noSqlMigration)protected abstract booleanmarkMigrationAsDone(T noSqlMigration)protected abstract voidrunMigration(T noSqlMigration)protected voidrunMigrationIfNecessary(T noSqlMigration)voidrunMigrations()
-
-
-
Method Detail
-
runMigrations
public void runMigrations()
-
isValidMigration
protected boolean isValidMigration(T noSqlMigration)
-
isIncreasePartitions
protected abstract boolean isIncreasePartitions(T noSqlMigration)
-
isNewMigration
protected abstract boolean isNewMigration(T noSqlMigration)
-
runMigration
protected abstract void runMigration(T noSqlMigration) throws Exception
- Throws:
Exception
-
markMigrationAsDone
protected abstract boolean markMigrationAsDone(T noSqlMigration)
-
runMigrationIfNecessary
protected void runMigrationIfNecessary(T noSqlMigration)
-
-