Class Selector
- java.lang.Object
-
- org.apache.cassandra.cql3.selection.Selector
-
- Direct Known Subclasses:
SimpleSelector
,TermSelector
public abstract class Selector extends java.lang.Object
ASelector
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Selector.Factory
A factory forSelector
instances.
-
Constructor Summary
Constructors Constructor Description Selector()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
addFetchedColumns(ColumnFilter.Builder builder)
Add to the provided builder the column (and potential subselections) to fetch for this selection.abstract void
addInput(ProtocolVersion protocolVersion, ResultSetBuilder rs)
Add the current value from the specifiedResultSetBuilder
.abstract java.nio.ByteBuffer
getOutput(ProtocolVersion protocolVersion)
Returns the selector output.abstract AbstractType<?>
getType()
Returns theSelector
output type.abstract void
reset()
Reset the internal state of thisSelector
.
-
-
-
Method Detail
-
addFetchedColumns
public abstract void addFetchedColumns(ColumnFilter.Builder builder)
Add to the provided builder the column (and potential subselections) to fetch for this selection.- Parameters:
builder
- the builder to add columns and subselections to.
-
addInput
public abstract void addInput(ProtocolVersion protocolVersion, ResultSetBuilder rs) throws InvalidRequestException
Add the current value from the specifiedResultSetBuilder
.- Parameters:
protocolVersion
- protocol version used for serializationrs
- theResultSetBuilder
- Throws:
InvalidRequestException
- if a problem occurs while add the input value
-
getOutput
public abstract java.nio.ByteBuffer getOutput(ProtocolVersion protocolVersion) throws InvalidRequestException
Returns the selector output.- Parameters:
protocolVersion
- protocol version used for serialization- Returns:
- the selector output
- Throws:
InvalidRequestException
- if a problem occurs while computing the output value
-
getType
public abstract AbstractType<?> getType()
Returns theSelector
output type.- Returns:
- the
Selector
output type.
-
reset
public abstract void reset()
Reset the internal state of thisSelector
.
-
-