Package 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
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 ClassesNested 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
ConstructorsModifierConstructorDescriptionprotectedUserExpression(ColumnMetadata column, Operator operator, ByteBuffer value) -
Method Summary
Modifier and TypeMethodDescriptionprotected RowFilter.Expression.Kindkind()static voidregister(Class<? extends RowFilter.UserExpression> expressionClass, RowFilter.UserExpression.Deserializer deserializer) protected abstract voidserialize(DataOutputPlus out, int version) protected abstract longserializedSize(int version) Methods inherited from class org.apache.cassandra.db.filter.RowFilter.Expression
column, equals, getIndexValue, getValue, hashCode, isContains, isContainsKey, isCustom, isSatisfiedBy, isUserDefined, operator, toCQLString, toString, toString, validate, validateForIndexing
-
Constructor Details
-
UserExpression
-
-
Method Details
-
register
public static void register(Class<? extends RowFilter.UserExpression> expressionClass, RowFilter.UserExpression.Deserializer deserializer) -
kind
- Specified by:
kindin classRowFilter.Expression
-
serialize
- Throws:
IOException
-
serializedSize
protected abstract long serializedSize(int version)
-