Class ElasticSearchDBCreator
- java.lang.Object
-
- org.jobrunr.storage.nosql.common.NoSqlDatabaseCreator<ElasticSearchMigration>
-
- org.jobrunr.storage.nosql.elasticsearch.ElasticSearchDBCreator
-
public class ElasticSearchDBCreator extends NoSqlDatabaseCreator<ElasticSearchMigration>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
JOBRUNR_MIGRATIONS_INDEX_NAME
-
Constructor Summary
Constructors Constructor Description ElasticSearchDBCreator(NoSqlStorageProvider noSqlStorageProvider, org.elasticsearch.client.RestHighLevelClient client, java.lang.String indexPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isNewMigration(NoSqlMigration noSqlMigration)
protected boolean
markMigrationAsDone(NoSqlMigration noSqlMigration)
protected void
runMigration(ElasticSearchMigration noSqlMigration)
void
runMigrations()
void
validateIndices()
-
Methods inherited from class org.jobrunr.storage.nosql.common.NoSqlDatabaseCreator
getMigrations, isValidMigration, runMigrationIfNecessary
-
-
-
-
Field Detail
-
JOBRUNR_MIGRATIONS_INDEX_NAME
public static final java.lang.String JOBRUNR_MIGRATIONS_INDEX_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElasticSearchDBCreator
public ElasticSearchDBCreator(NoSqlStorageProvider noSqlStorageProvider, org.elasticsearch.client.RestHighLevelClient client, java.lang.String indexPrefix)
-
-
Method Detail
-
runMigrations
public void runMigrations()
- Overrides:
runMigrations
in classNoSqlDatabaseCreator<ElasticSearchMigration>
-
validateIndices
public void validateIndices()
-
isNewMigration
protected boolean isNewMigration(NoSqlMigration noSqlMigration)
- Specified by:
isNewMigration
in classNoSqlDatabaseCreator<ElasticSearchMigration>
-
runMigration
protected void runMigration(ElasticSearchMigration noSqlMigration) throws java.io.IOException
- Specified by:
runMigration
in classNoSqlDatabaseCreator<ElasticSearchMigration>
- Throws:
java.io.IOException
-
markMigrationAsDone
protected boolean markMigrationAsDone(NoSqlMigration noSqlMigration)
- Specified by:
markMigrationAsDone
in classNoSqlDatabaseCreator<ElasticSearchMigration>
-
-