org.apache.storm.cassandra

## Interface ExecutionResultHandler

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    AbstractExecutionResultHandler, BaseExecutionResultHandler

      public interface ExecutionResultHandler
      extends Serializable

  Default interface to define strategies to apply when a query is either succeed or failed.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onQuerySuccess(OutputCollector collector, Tuple tuple)` Invoked when a query is executed with success.
    `void` | `onQueryValidationException(com.datastax.driver.core.exceptions.QueryValidationException e, OutputCollector collector, Tuple tuple)` Invoked when a `QueryValidationException` is thrown.
    `void` | `onReadTimeoutException(com.datastax.driver.core.exceptions.ReadTimeoutException e, OutputCollector collector, Tuple tuple)` Invoked when a `ReadTimeoutException` is thrown.
    `void` | `onThrowable(Throwable t, OutputCollector collector, List<Tuple> tl)` Default method used to handle any type of exception.
    `void` | `onThrowable(Throwable t, OutputCollector collector, Tuple i)` Default method used to handle any type of exception.
    `void` | `onUnavailableException(com.datastax.driver.core.exceptions.UnavailableException e, OutputCollector collector, Tuple tuple)` Invoked when a `UnavailableException` is thrown.
    `void` | `onWriteTimeoutException(com.datastax.driver.core.exceptions.WriteTimeoutException e, OutputCollector collector, Tuple tuple)` Invoked when a `WriteTimeoutException` is thrown.

- - ### Method Detail

    - #### onQueryValidationException

          void onQueryValidationException(com.datastax.driver.core.exceptions.QueryValidationException e,
                                          OutputCollector collector,
                                          Tuple tuple)

      Invoked when a `QueryValidationException` is thrown.

      Parameters:
        `e` - the cassandra exception.
        `collector` - the storm collector.
        `tuple` - an input tuple.

    - #### onReadTimeoutException

          void onReadTimeoutException(com.datastax.driver.core.exceptions.ReadTimeoutException e,
                                      OutputCollector collector,
                                      Tuple tuple)

      Invoked when a `ReadTimeoutException` is thrown.

      Parameters:
        `e` - the cassandra exception.
        `collector` - the storm collector.
        `tuple` - an input tuple.

    - #### onWriteTimeoutException

          void onWriteTimeoutException(com.datastax.driver.core.exceptions.WriteTimeoutException e,
                                       OutputCollector collector,
                                       Tuple tuple)

      Invoked when a `WriteTimeoutException` is thrown.

      Parameters:
        `e` - the cassandra exception.
        `collector` - the storm collector.
        `tuple` - an input tuple.

    - #### onUnavailableException

          void onUnavailableException(com.datastax.driver.core.exceptions.UnavailableException e,
                                      OutputCollector collector,
                                      Tuple tuple)

      Invoked when a `UnavailableException` is thrown.

      Parameters:
        `e` - the cassandra exception.
        `collector` - the storm collector.
        `tuple` - an input tuple.

    - #### onQuerySuccess

          void onQuerySuccess(OutputCollector collector,
                              Tuple tuple)

      Invoked when a query is executed with success. This method is NOT responsible for acknowledging input tuple.

      Parameters:
        `collector` - the storm collector.
        `tuple` - an input tuple.

    - #### onThrowable

          void onThrowable(Throwable t,
                           OutputCollector collector,
                           Tuple i)

      Default method used to handle any type of exception.

      Parameters:
        `t` - the thrown exception
        `collector` - the storm collector.
        `i` - an input tuple.

    - #### onThrowable

          void onThrowable(Throwable t,
                           OutputCollector collector,
                           List<Tuple> tl)

      Default method used to handle any type of exception.

      Parameters:
        `t` - the thrown exception
        `collector` - the storm collector.
        `tl` - a list of input tuple.

Copyright © 2021 The Apache Software Foundation. All rights reserved.