Class CassandraMessageHandlerSpec

All Implemented Interfaces:
DisposableBean, FactoryBean<CassandraMessageHandler>, InitializingBean, Lifecycle, Phased, SmartLifecycle

public class CassandraMessageHandlerSpec extends MessageHandlerSpec<CassandraMessageHandlerSpec,CassandraMessageHandler>
Since:
6.0
Author:
Artem Bilan
  • Constructor Details

    • CassandraMessageHandlerSpec

      protected CassandraMessageHandlerSpec(org.springframework.data.cassandra.core.ReactiveCassandraOperations cassandraOperations)
    • CassandraMessageHandlerSpec

      protected CassandraMessageHandlerSpec(org.springframework.data.cassandra.core.ReactiveCassandraOperations cassandraOperations, CassandraMessageHandler.Type queryType)
  • Method Details

    • producesReply

      protected CassandraMessageHandlerSpec producesReply(boolean producesReply)
    • ingestQuery

      public CassandraMessageHandlerSpec ingestQuery(String ingestQuery)
      Set an ingest query.
      Parameters:
      ingestQuery - ingest query to use.
      Returns:
      this spec
    • writeOptions

      public CassandraMessageHandlerSpec writeOptions(org.springframework.data.cassandra.core.cql.WriteOptions writeOptions)
      Set a WriteOptions for INSERT, UPDATE or DELETE operations.
      Parameters:
      writeOptions - the WriteOptions to use.
      Returns:
      this spec
    • statementExpression

      public CassandraMessageHandlerSpec statementExpression(String statementExpression)
      Set a SpEL expression to evaluate a Statement against request message.
      Parameters:
      statementExpression - the SpEL expression to use.
      Returns:
      this spec
    • statementExpression

      public CassandraMessageHandlerSpec statementExpression(Expression statementExpression)
      Set a SpEL expression to evaluate a Statement against request message.
      Parameters:
      statementExpression - the SpEL expression to use.
      Returns:
      this spec
    • statementFunction

      public CassandraMessageHandlerSpec statementFunction(Function<Message<?>,com.datastax.oss.driver.api.core.cql.Statement<?>> statementFunction)
      Set a Function to evaluate a Statement against request message.
      Parameters:
      statementFunction - the function to use.
      Returns:
      this spec
    • query

      public CassandraMessageHandlerSpec query(String query)
      Set a SELECT query.
      Parameters:
      query - the CQL query to execute
      Returns:
      this spec
    • parameterExpressions

      public CassandraMessageHandlerSpec parameterExpressions(Map<String,Expression> parameterExpressions)
      Set a map for named parameters and expressions for their values against a request message.
      Parameters:
      parameterExpressions - the map to use.
      Returns:
      this spec
    • parameter

      public CassandraMessageHandlerSpec parameter(String name, String expression)
      Add a named bindable parameter with a SpEL expression to evaluate its value against a request message.
      Parameters:
      name - the name of parameter.
      expression - the SpEL expression for parameter value.
      Returns:
      this spec
    • parameter

      public CassandraMessageHandlerSpec parameter(String name, Function<Message<?>,?> function)
      Add a named bindable parameter with a function to evaluate its value against a request message.
      Parameters:
      name - the name of parameter.
      function - the function for parameter value.
      Returns:
      this spec
    • parameter

      public CassandraMessageHandlerSpec parameter(String name, Expression expression)
      Add a named bindable parameter with a SpEL expression to evaluate its value against a request message.
      Parameters:
      name - the name of parameter.
      expression - the SpEL expression for parameter value.
      Returns:
      this spec