public class ElasticsearchIndexManager extends Object
Modifier and Type | Field and Description |
---|---|
protected org.elasticsearch.client.RestHighLevelClient |
client |
protected ElasticsearchUtils |
elasticsearchUtils |
Constructor and Description |
---|
ElasticsearchIndexManager(org.elasticsearch.client.RestHighLevelClient client,
ElasticsearchUtils elasticsearchUtils) |
Modifier and Type | Method and Description |
---|---|
void |
any(AnyLifecycleEvent<Any<?>> event) |
void |
audit(String domain,
long instant,
AuditEntry message) |
void |
createAnyIndex(String domain,
AnyTypeKind kind,
org.elasticsearch.xcontent.XContentBuilder settings,
org.elasticsearch.xcontent.XContentBuilder mapping) |
void |
createAuditIndex(String domain,
org.elasticsearch.xcontent.XContentBuilder settings,
org.elasticsearch.xcontent.XContentBuilder mapping) |
org.elasticsearch.xcontent.XContentBuilder |
defaultAnyMapping() |
org.elasticsearch.xcontent.XContentBuilder |
defaultAuditMapping() |
org.elasticsearch.xcontent.XContentBuilder |
defaultSettings() |
protected org.elasticsearch.client.indices.CreateIndexResponse |
doCreateAnyIndex(String domain,
AnyTypeKind kind,
org.elasticsearch.xcontent.XContentBuilder settings,
org.elasticsearch.xcontent.XContentBuilder mapping) |
protected org.elasticsearch.client.indices.CreateIndexResponse |
doCreateAuditIndex(String domain,
org.elasticsearch.xcontent.XContentBuilder settings,
org.elasticsearch.xcontent.XContentBuilder mapping) |
boolean |
existsAnyIndex(String domain,
AnyTypeKind kind) |
boolean |
existsAuditIndex(String domain) |
void |
removeAnyIndex(String domain,
AnyTypeKind kind) |
void |
removeAuditIndex(String domain) |
protected final org.elasticsearch.client.RestHighLevelClient client
protected final ElasticsearchUtils elasticsearchUtils
public ElasticsearchIndexManager(org.elasticsearch.client.RestHighLevelClient client, ElasticsearchUtils elasticsearchUtils)
public boolean existsAnyIndex(String domain, AnyTypeKind kind) throws IOException
IOException
public boolean existsAuditIndex(String domain) throws IOException
IOException
public org.elasticsearch.xcontent.XContentBuilder defaultSettings() throws IOException
IOException
public org.elasticsearch.xcontent.XContentBuilder defaultAnyMapping() throws IOException
IOException
public org.elasticsearch.xcontent.XContentBuilder defaultAuditMapping() throws IOException
IOException
protected org.elasticsearch.client.indices.CreateIndexResponse doCreateAnyIndex(String domain, AnyTypeKind kind, org.elasticsearch.xcontent.XContentBuilder settings, org.elasticsearch.xcontent.XContentBuilder mapping) throws IOException
IOException
public void createAnyIndex(String domain, AnyTypeKind kind, org.elasticsearch.xcontent.XContentBuilder settings, org.elasticsearch.xcontent.XContentBuilder mapping) throws IOException
IOException
public void removeAnyIndex(String domain, AnyTypeKind kind) throws IOException
IOException
protected org.elasticsearch.client.indices.CreateIndexResponse doCreateAuditIndex(String domain, org.elasticsearch.xcontent.XContentBuilder settings, org.elasticsearch.xcontent.XContentBuilder mapping) throws IOException
IOException
public void createAuditIndex(String domain, org.elasticsearch.xcontent.XContentBuilder settings, org.elasticsearch.xcontent.XContentBuilder mapping) throws IOException
IOException
public void removeAuditIndex(String domain) throws IOException
IOException
@TransactionalEventListener public void any(AnyLifecycleEvent<Any<?>> event) throws IOException
IOException
public void audit(String domain, long instant, AuditEntry message) throws IOException
IOException
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.