Interface SpeculativeExecutionPolicy.SpeculativeExecutionPlan

  • Enclosing interface:
    SpeculativeExecutionPolicy

    public static interface SpeculativeExecutionPolicy.SpeculativeExecutionPlan
    A plan that governs speculative executions for a given query.

    Each time a host is queried, nextExecution(Host) is invoked to determine if and when a speculative query to the next host will be sent.

    • Method Detail

      • nextExecution

        long nextExecution​(Host lastQueried)
        Returns the time before the next speculative query.
        Parameters:
        lastQueried - the host that was just queried.
        Returns:
        the time (in milliseconds) before a speculative query is sent to the next host. If negative, no speculative query will be sent. If zero, it will immediately send the execution. Note that, prior to version 3.3.1, zero meant "no speculative query", so custom policies written at that time may now start to schedule more executions than expected; make sure you use a negative value, not zero, to stop executions.