public abstract class Selector extends java.lang.Object implements AssignmentTestable
Selector
is used to convert the data returned by the storage engine into the data requested by the
user. They correspond to the <selector> elements from the select clause.
Since the introduction of aggregation, Selector
s cannot be called anymore by multiple threads
as they have an internal state.
Modifier and Type | Class and Description |
---|---|
static class |
Selector.Factory
A factory for
Selector instances. |
AssignmentTestable.TestResult
Constructor and Description |
---|
Selector() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addInput(int protocolVersion,
Selection.ResultSetBuilder rs)
Add the current value from the specified
ResultSetBuilder . |
abstract java.nio.ByteBuffer |
getOutput(int protocolVersion)
Returns the selector output.
|
abstract AbstractType<?> |
getType()
Returns the
Selector output type. |
boolean |
isAggregate()
Checks if this
Selector is creating aggregates. |
abstract void |
reset()
Reset the internal state of this
Selector . |
AssignmentTestable.TestResult |
testAssignment(java.lang.String keyspace,
ColumnSpecification receiver) |
public abstract void addInput(int protocolVersion, Selection.ResultSetBuilder rs) throws InvalidRequestException
ResultSetBuilder
.protocolVersion
- protocol version used for serializationrs
- the ResultSetBuilder
InvalidRequestException
- if a problem occurs while add the input valuepublic abstract java.nio.ByteBuffer getOutput(int protocolVersion) throws InvalidRequestException
protocolVersion
- protocol version used for serializationInvalidRequestException
- if a problem occurs while computing the output valuepublic abstract AbstractType<?> getType()
Selector
output type.Selector
output type.public boolean isAggregate()
Selector
is creating aggregates.true
if this Selector
is creating aggregates false
otherwise.public abstract void reset()
Selector
.public final AssignmentTestable.TestResult testAssignment(java.lang.String keyspace, ColumnSpecification receiver)
testAssignment
in interface AssignmentTestable
Copyright © 2017 The Apache Software Foundation