Class OpenSearchIndexManager

java.lang.Object
org.apache.syncope.ext.opensearch.client.OpenSearchIndexManager

public class OpenSearchIndexManager extends Object
Listen to any create / update and delete in order to keep the OpenSearch indexes consistent.
  • Field Details

    • client

      protected final org.opensearch.client.opensearch.OpenSearchClient client
    • openSearchUtils

      protected final OpenSearchUtils openSearchUtils
    • numberOfShards

      protected final String numberOfShards
    • numberOfReplicas

      protected final String numberOfReplicas
  • Constructor Details

    • OpenSearchIndexManager

      public OpenSearchIndexManager(org.opensearch.client.opensearch.OpenSearchClient client, OpenSearchUtils ppenSearchUtils, String numberOfShards, String numberOfReplicas)
  • Method Details

    • existsAnyIndex

      public boolean existsAnyIndex(String domain, AnyTypeKind kind) throws IOException
      Throws:
      IOException
    • existsRealmIndex

      public boolean existsRealmIndex(String domain) throws IOException
      Throws:
      IOException
    • existsAuditIndex

      public boolean existsAuditIndex(String domain) throws IOException
      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

      public void removeAnyIndex(String domain, AnyTypeKind kind) throws IOException
      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

      public void removeRealmIndex(String domain) throws IOException
      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

      public void removeAuditIndex(String domain) throws IOException
      Throws:
      IOException
    • entity

      Throws:
      IOException
    • audit

      public void audit(String domain, AuditEvent auditEvent) throws IOException
      Throws:
      IOException