public class DefaultElasticsearchSchemaCreator extends Object implements ElasticsearchSchemaCreator, Startable, Stoppable
ElasticsearchSchemaCreator
implementation.Constructor and Description |
---|
DefaultElasticsearchSchemaCreator() |
Modifier and Type | Method and Description |
---|---|
void |
checkIndexExists(String indexName,
ExecutionOptions executionOptions)
Checks that an index already exists.
|
void |
createIndex(IndexMetadata indexMetadata,
ExecutionOptions executionOptions)
Create an index.
|
boolean |
createIndexIfAbsent(IndexMetadata indexMetadata,
ExecutionOptions executionOptions)
Create an index, but only if the index doesn't already exist.
|
void |
createMappings(IndexMetadata indexMetadata,
ExecutionOptions executionOptions)
Create mappings on a supposedly existing index.
|
void |
start(Properties properties,
BuildContext context)
Start phase notification.
|
void |
stop()
Stop phase notification
|
public void start(Properties properties, BuildContext context)
Startable
public void stop()
Stoppable
public void createIndex(IndexMetadata indexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaCreator
createIndex
in interface ElasticsearchSchemaCreator
indexMetadata
- The expected index metadata.executionOptions
- The execution options, giving more context information.public boolean createIndexIfAbsent(IndexMetadata indexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaCreator
createIndexIfAbsent
in interface ElasticsearchSchemaCreator
indexMetadata
- The expected index metadata.executionOptions
- The execution options, giving more context information.true
if the index had to be created, false
otherwise.public void checkIndexExists(String indexName, ExecutionOptions executionOptions)
ElasticsearchSchemaCreator
checkIndexExists
in interface ElasticsearchSchemaCreator
indexName
- The expected index name.executionOptions
- The execution options, giving more context information.public void createMappings(IndexMetadata indexMetadata, ExecutionOptions executionOptions)
ElasticsearchSchemaCreator
Mappings are supposed to be absent from the index.
createMappings
in interface ElasticsearchSchemaCreator
indexMetadata
- The expected index metadata.executionOptions
- The execution options, giving more context information.Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved