Interface IndexStoreStrategy

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long count​(Filter filter, NodeState root, NodeState indexMeta, java.util.Set<java.lang.String> values, int max)
      Count the occurrence of a given set of values.
      long count​(NodeState root, NodeState indexMeta, java.util.Set<java.lang.String> values, int max)
      Count the occurrence of a given set of values.
      boolean exists​(Supplier<NodeBuilder> index, java.lang.String key)
      Check whether an entry for the given key exists.
      java.lang.String getIndexNodeName()  
      java.lang.Iterable<java.lang.String> query​(Filter filter, java.lang.String indexName, NodeState indexMeta, java.lang.Iterable<java.lang.String> values)
      Search for a given set of values.
      void update​(Supplier<NodeBuilder> index, java.lang.String path, java.lang.String indexName, NodeBuilder indexMeta, java.util.Set<java.lang.String> beforeKeys, java.util.Set<java.lang.String> afterKeys)
      Updates the index for the given path.
    • Method Detail

      • update

        void update​(Supplier<NodeBuilder> index,
                    java.lang.String path,
                    java.lang.String indexName,
                    NodeBuilder indexMeta,
                    java.util.Set<java.lang.String> beforeKeys,
                    java.util.Set<java.lang.String> afterKeys)
             throws CommitFailedException
        Updates the index for the given path.
        Parameters:
        index - the index node supplier
        path - path stored in the index
        indexName - the name of the index. May be null.
        indexMeta - the definition of the index. May be null.
        beforeKeys - keys that no longer apply to the path
        afterKeys - keys that now do apply to the path
        Throws:
        CommitFailedException
      • exists

        boolean exists​(Supplier<NodeBuilder> index,
                       java.lang.String key)
        Check whether an entry for the given key exists.
        Parameters:
        index - the index node supplier
        key - the key
        Returns:
        true if at least one entry exists
      • query

        java.lang.Iterable<java.lang.String> query​(Filter filter,
                                                   java.lang.String indexName,
                                                   NodeState indexMeta,
                                                   java.lang.Iterable<java.lang.String> values)
        Search for a given set of values.
        Parameters:
        filter - the filter (can optionally be used for optimized query execution)
        indexName - the name of the index (for logging)
        indexMeta - the index metadata node (may not be null)
        values - values to look for (null to check for property existence)
        Returns:
        an iterator of paths
      • count

        long count​(NodeState root,
                   NodeState indexMeta,
                   java.util.Set<java.lang.String> values,
                   int max)
        Count the occurrence of a given set of values. Used in calculating the cost of an index.
        Parameters:
        root - the root node (may not be null)
        indexMeta - the index metadata node (may not be null)
        values - values to look for (null to check for property existence)
        max - the maximum value to return
        Returns:
        the aggregated count of occurrences for each provided value
      • count

        long count​(Filter filter,
                   NodeState root,
                   NodeState indexMeta,
                   java.util.Set<java.lang.String> values,
                   int max)
        Count the occurrence of a given set of values. Used in calculating the cost of an index.
        Parameters:
        filter - the filter which can be used to estimate better cost
        root - the root node (may not be null)
        indexMeta - the index metadata node (may not be null)
        values - values to look for (null to check for property existence)
        max - the maximum value to return
        Returns:
        the aggregated count of occurrences for each provided value
      • getIndexNodeName

        java.lang.String getIndexNodeName()