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
FieldsModifier and TypeFieldDescriptionprotected final org.opensearch.client.opensearch.OpenSearchClientprotected final Integerprotected final Integerprotected final OpenSearchUtils -
Constructor Summary
ConstructorsConstructorDescriptionOpenSearchIndexManager(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchUtils ppenSearchUtils, Integer numberOfShards, Integer numberOfReplicas) -
Method Summary
Modifier and TypeMethodDescriptionvoidaudit(String domain, AuditEvent auditEvent) voidcreateAnyIndex(String domain, AnyTypeKind kind, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) voidcreateAuditIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) voidcreateRealmIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) org.opensearch.client.opensearch._types.mapping.TypeMappingorg.opensearch.client.opensearch._types.mapping.TypeMappingorg.opensearch.client.opensearch._types.mapping.TypeMappingorg.opensearch.client.opensearch.indices.IndexSettingsprotected org.opensearch.client.opensearch.indices.CreateIndexResponsedoCreateAnyIndex(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.CreateIndexResponsedoCreateAuditIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) protected org.opensearch.client.opensearch.indices.CreateIndexResponsedoCreateRealmIndex(String domain, org.opensearch.client.opensearch.indices.IndexSettings settings, org.opensearch.client.opensearch._types.mapping.TypeMapping mappings) voidentity(EntityLifecycleEvent<Entity> event) booleanexistsAnyIndex(String domain, AnyTypeKind kind) booleanexistsAuditIndex(String domain) booleanexistsRealmIndex(String domain) voidremoveAnyIndex(String domain, AnyTypeKind kind) voidremoveAuditIndex(String domain) voidremoveRealmIndex(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, Integer numberOfShards, Integer 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
-