Class ElasticsearchIndexManager

java.lang.Object
org.apache.syncope.ext.elasticsearch.client.ElasticsearchIndexManager

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

    • client

      protected final co.elastic.clients.elasticsearch.ElasticsearchClient client
    • elasticsearchUtils

      protected final ElasticsearchUtils elasticsearchUtils
    • numberOfShards

      protected final String numberOfShards
    • numberOfReplicas

      protected final String numberOfReplicas
  • Constructor Details

    • ElasticsearchIndexManager

      public ElasticsearchIndexManager(co.elastic.clients.elasticsearch.ElasticsearchClient client, ElasticsearchUtils elasticsearchUtils, 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 co.elastic.clients.elasticsearch.indices.IndexSettings defaultSettings()
    • defaultAnyMapping

      public co.elastic.clients.elasticsearch._types.mapping.TypeMapping defaultAnyMapping()
    • defaultRealmMapping

      public co.elastic.clients.elasticsearch._types.mapping.TypeMapping defaultRealmMapping()
    • defaultAuditMapping

      public co.elastic.clients.elasticsearch._types.mapping.TypeMapping defaultAuditMapping()
    • doCreateAnyIndex

      protected co.elastic.clients.elasticsearch.indices.CreateIndexResponse doCreateAnyIndex(String domain, AnyTypeKind kind, co.elastic.clients.elasticsearch.indices.IndexSettings settings, co.elastic.clients.elasticsearch._types.mapping.TypeMapping mappings) throws IOException
      Throws:
      IOException
    • createAnyIndex

      public void createAnyIndex(String domain, AnyTypeKind kind, co.elastic.clients.elasticsearch.indices.IndexSettings settings, co.elastic.clients.elasticsearch._types.mapping.TypeMapping mappings) throws IOException
      Throws:
      IOException
    • removeAnyIndex

      public void removeAnyIndex(String domain, AnyTypeKind kind) throws IOException
      Throws:
      IOException
    • doCreateRealmIndex

      protected co.elastic.clients.elasticsearch.indices.CreateIndexResponse doCreateRealmIndex(String domain, co.elastic.clients.elasticsearch.indices.IndexSettings settings, co.elastic.clients.elasticsearch._types.mapping.TypeMapping mappings) throws IOException
      Throws:
      IOException
    • createRealmIndex

      public void createRealmIndex(String domain, co.elastic.clients.elasticsearch.indices.IndexSettings settings, co.elastic.clients.elasticsearch._types.mapping.TypeMapping mappings) throws IOException
      Throws:
      IOException
    • removeRealmIndex

      public void removeRealmIndex(String domain) throws IOException
      Throws:
      IOException
    • doCreateAuditIndex

      protected co.elastic.clients.elasticsearch.indices.CreateIndexResponse doCreateAuditIndex(String domain, co.elastic.clients.elasticsearch.indices.IndexSettings settings, co.elastic.clients.elasticsearch._types.mapping.TypeMapping mappings) throws IOException
      Throws:
      IOException
    • createAuditIndex

      public void createAuditIndex(String domain, co.elastic.clients.elasticsearch.indices.IndexSettings settings, co.elastic.clients.elasticsearch._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