Class IndexStateRegistry

java.lang.Object
io.jmix.search.index.impl.IndexStateRegistry

@Component("search_IndexStateRegistry") public class IndexStateRegistry extends Object
Holds markers of search indexes availability. Only entities with available indexes can be used in index-modification operations (to prevent storing data into incorrect indexes or automatic creation of them by ES).

Doesn't affect searching.

Every action that makes or detects index is valid (creation or successful synchronization\validation) marks it as available.

Every action that makes or detects index is invalid (drop or unsuccessful synchronization\validation) marks it as unavailable.

  • Field Details

  • Constructor Details

  • Method Details

    • getIndexAvailabilityStates

      public Map<String,Boolean> getIndexAvailabilityStates()
    • isIndexAvailable

      public boolean isIndexAvailable(String entityName)
    • markIndexAsAvailable

      public void markIndexAsAvailable(String entityName)
    • markIndexAsUnavailable

      public void markIndexAsUnavailable(String entityName)
    • getAllUnavailableIndexedEntities

      public List<String> getAllUnavailableIndexedEntities()
    • setRegistryValue

      protected void setRegistryValue(String entityName, boolean value)