Class OnlineIndexer.IndexFromIndexPolicy

  • Enclosing class:
    OnlineIndexer

    public static class OnlineIndexer.IndexFromIndexPolicy
    extends Object
    A builder for the indexFromIndex policy. Let the caller set a source index and a fallback policy.
    • Constructor Detail

      • IndexFromIndexPolicy

        public IndexFromIndexPolicy​(@Nonnull
                                    String sourceIndex,
                                    boolean allowRecordScan)
        Build the index from a source index. Source index must be readable, idempotent, and fully cover the target index.
        Parameters:
        sourceIndex - source index
        allowRecordScan - allow fallback to record scan
      • IndexFromIndexPolicy

        public IndexFromIndexPolicy()
        Build a non-active object.
    • Method Detail

      • isActive

        public boolean isActive()
        Check if active.
        Returns:
        True if active
      • getSourceIndex

        @Nullable
        public String getSourceIndex()
        If active, get the source index.
        Returns:
        source index name
      • isAllowRecordScan

        public boolean isAllowRecordScan()
        If source index is not available, check if allowed to scan the records.
        Returns:
        true if a record scan is allowed