RowFilter.UserExpression (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.filter

## Class RowFilter.UserExpression

- java.lang.Object
- - org.apache.cassandra.db.filter.RowFilter.Expression
  - - org.apache.cassandra.db.filter.RowFilter.UserExpression

- Enclosing class:
    RowFilter

      public abstract static class RowFilter.UserExpression
      extends RowFilter.Expression

  A user defined filtering expression. These may be added to RowFilter programmatically by a QueryHandler implementation. No concrete implementations are provided and adding custom impls to the classpath is a task for operators (needless to say, this is something of a power user feature). Care must also be taken to register implementations, via the static register method during system startup. An implementation and its corresponding Deserializer must be registered before sending or receiving any messages containing expressions of that type. Use of custom filtering expressions in a mixed version cluster should be handled with caution as the order in which types are registered is significant: if continuity of use during upgrades is important, new types should registered last and obsoleted types should still be registered ( or dummy implementations registered in their place) to preserve consistent identifiers across the cluster). During serialization, the identifier for the Deserializer implementation is prepended to the implementation specific payload. To deserialize, the identifier is read first to obtain the Deserializer, which then provides the concrete expression instance.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `RowFilter.UserExpression.Deserializer`

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.db.filter.RowFilter.Expression

      `RowFilter.Expression.Kind`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.db.filter.RowFilter.Expression

      `column, operator, value`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `UserExpression(ColumnDefinition column, Operator operator, java.nio.ByteBuffer value)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected RowFilter.Expression.Kind` | `kind()`
    `static void` | `register(java.lang.Class<? extends RowFilter.UserExpression> expressionClass, RowFilter.UserExpression.Deserializer deserializer)`
    `protected abstract void` | `serialize(DataOutputPlus out, int version)`
    `protected abstract long` | `serializedSize(int version)`

    - ### Methods inherited from class org.apache.cassandra.db.filter.RowFilter.Expression

      `column, equals, getIndexValue, getValue, hashCode, isContains, isContainsKey, isCustom, isSatisfiedBy, isUserDefined, operator, validate, validateForIndexing`

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

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

- - ### Constructor Detail

    - #### UserExpression

          protected UserExpression(ColumnDefinition column,
                                   Operator operator,
                                   java.nio.ByteBuffer value)

  - ### Method Detail

    - #### register

          public static void register(java.lang.Class<? extends RowFilter.UserExpression> expressionClass,
                                      RowFilter.UserExpression.Deserializer deserializer)

    - #### kind

          protected RowFilter.Expression.Kind kind()

      Specified by:
        `kind` in class `RowFilter.Expression`

    - #### serialize

          protected abstract void serialize(DataOutputPlus out,
                                            int version)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### serializedSize

          protected abstract long serializedSize(int version)

Copyright © 2018 The Apache Software Foundation