Class OpenSearchIndexManager
java.lang.Object
org.apache.syncope.ext.opensearch.client.OpenSearchIndexManager
Listen to any create / update and delete in order to keep the OpenSearch indexes consistent.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.opensearch.client.opensearch.OpenSearchClient
protected final String
protected final String
protected final OpenSearchUtils
-
Constructor Summary
ConstructorDescriptionOpenSearchIndexManager
(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchUtils ppenSearchUtils, String numberOfShards, String numberOfReplicas) -
Method Summary
Modifier and TypeMethodDescriptionvoid
audit
(String domain, AuditEvent auditEvent) void
createAnyIndex
(String domain, AnyTypeKind kind, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) void
createAuditIndex
(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) void
createRealmIndex
(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) org.opensearch.client.opensearch._types.mapping.TypeMapping
org.opensearch.client.opensearch._types.mapping.TypeMapping
org.opensearch.client.opensearch._types.mapping.TypeMapping
org.opensearch.client.opensearch.indices.IndexSettings
protected org.opensearch.client.opensearch.indices.CreateIndexResponse
doCreateAnyIndex
(String domain, AnyTypeKind kind, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) protected org.opensearch.client.opensearch.indices.CreateIndexResponse
doCreateAuditIndex
(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) protected org.opensearch.client.opensearch.indices.CreateIndexResponse
doCreateRealmIndex
(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) void
entity
(EntityLifecycleEvent<Entity> event) boolean
existsAnyIndex
(String domain, AnyTypeKind kind) boolean
existsAuditIndex
(String domain) boolean
existsRealmIndex
(String domain) void
removeAnyIndex
(String domain, AnyTypeKind kind) void
removeAuditIndex
(String domain) void
removeRealmIndex
(String domain)
-
Field Details
-
client
protected final org.opensearch.client.opensearch.OpenSearchClient client -
openSearchUtils
-
numberOfShards
-
numberOfReplicas
-
-
Constructor Details
-
OpenSearchIndexManager
public OpenSearchIndexManager(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchUtils ppenSearchUtils, String numberOfShards, String numberOfReplicas)
-
-
Method Details
-
existsAnyIndex
- Throws:
IOException
-
existsRealmIndex
- Throws:
IOException
-
existsAuditIndex
- Throws:
IOException
-
defaultSettings
public org.opensearch.client.opensearch.indices.IndexSettings defaultSettings() -
defaultAnyMapping
public org.opensearch.client.opensearch._types.mapping.TypeMapping defaultAnyMapping() -
defaultRealmMapping
public org.opensearch.client.opensearch._types.mapping.TypeMapping defaultRealmMapping() -
defaultAuditMapping
public org.opensearch.client.opensearch._types.mapping.TypeMapping defaultAuditMapping() -
doCreateAnyIndex
protected org.opensearch.client.opensearch.indices.CreateIndexResponse doCreateAnyIndex(String domain, AnyTypeKind kind, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) throws IOException - Throws:
IOException
-
createAnyIndex
public void createAnyIndex(String domain, AnyTypeKind kind, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) throws IOException - Throws:
IOException
-
removeAnyIndex
- Throws:
IOException
-
doCreateRealmIndex
protected org.opensearch.client.opensearch.indices.CreateIndexResponse doCreateRealmIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) throws IOException - Throws:
IOException
-
createRealmIndex
public void createRealmIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) throws IOException - Throws:
IOException
-
removeRealmIndex
- Throws:
IOException
-
doCreateAuditIndex
protected org.opensearch.client.opensearch.indices.CreateIndexResponse doCreateAuditIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) throws IOException - Throws:
IOException
-
createAuditIndex
public void createAuditIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) throws IOException - Throws:
IOException
-
removeAuditIndex
- Throws:
IOException
-
entity
@TransactionalEventListener public void entity(EntityLifecycleEvent<Entity> event) throws IOException - Throws:
IOException
-
audit
- Throws:
IOException
-