Class CascadesPlanner

    • Method Detail

      • plan

        @Nonnull
        public RecordQueryPlan plan​(@Nonnull
                                    RecordQuery query)
        Description copied from interface: QueryPlanner
        Create a plan to get the results of the provided query.
        Specified by:
        plan in interface QueryPlanner
        Parameters:
        query - a query for records on this planner's metadata
        Returns:
        a plan that will return the results of the provided query when executed
      • setIndexScanPreference

        public void setIndexScanPreference​(@Nonnull
                                           QueryPlanner.IndexScanPreference indexScanPreference)
        Description copied from interface: QueryPlanner
        Set whether RecordQueryIndexPlan is preferred over RecordQueryScanPlan even when it does not satisfy any additional conditions. Scanning without an index is more efficient, but will have to skip over unrelated record types. For that reason, it is safer to use an index, except when there is only one record type. If the meta-data has more than one record type but the record store does not, this can be overridden.
        Specified by:
        setIndexScanPreference in interface QueryPlanner
        Parameters:
        indexScanPreference - whether to prefer index scan over record scan
      • setMaxTaskQueueSize

        public void setMaxTaskQueueSize​(int maxTaskQueueSize)
        Set the size limit of the Cascades planner task queue. If the planner tries to add a task to the queue beyond the maximum size, planning will fail. Default value is 0, which means "unbound".
        Parameters:
        maxTaskQueueSize - the maximum size of the queue.
      • setMaxTotalTaskCount

        public void setMaxTotalTaskCount​(int maxTotalTaskCount)
        Set a limit on the number of tasks that can be executed as part of the Cascades planner planning. If the planner tries to execute a task after the maximum number was exceeded, planning will fail. Default value is 0, which means "unbound".
        Parameters:
        maxTotalTaskCount - the maximum number of tasks.