org.apache.storm.cassandra

## Class BaseExecutionResultHandler

- java.lang.Object
- - org.apache.storm.cassandra.AbstractExecutionResultHandler
  - - org.apache.storm.cassandra.BaseExecutionResultHandler

- All Implemented Interfaces:
    Serializable, ExecutionResultHandler

      public class BaseExecutionResultHandler
      extends AbstractExecutionResultHandler

  Simple `ExecutionResultHandler` which fail the incoming tuple when an `DriverException` is thrown. The exception is then automatically report to storm.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseExecutionResultHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `onDriverException(com.datastax.driver.core.exceptions.DriverException e, OutputCollector collector, Tuple tuple)` This method is called when an one of the methods of the `BaseExecutionResultHandler` is not overridden.
    `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` | `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.

    - ### Methods inherited from class org.apache.storm.cassandra.AbstractExecutionResultHandler

      `onThrowable, onThrowable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseExecutionResultHandler

          public BaseExecutionResultHandler()

  - ### Method Detail

    - #### onQueryValidationException

          public 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

          public 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

          public 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

          public 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

          public 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.

    - #### onDriverException

          protected void onDriverException(com.datastax.driver.core.exceptions.DriverException e,
                                           OutputCollector collector,
                                           Tuple tuple)

      This method is called when an one of the methods of the `BaseExecutionResultHandler` is not overridden. It can be practical if you want to bundle some/all of the methods to a single method.

      Parameters:
        `e` - the exception throws
        `collector` - the output collector
        `tuple` - the tuple in failure

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