Class Selector.InputRow
- java.lang.Object
-
- org.apache.cassandra.cql3.selection.Selector.InputRow
-
- Enclosing class:
- Selector
public static final class Selector.InputRow extends java.lang.ObjectA row of data that need to be processed by aSelector
-
-
Constructor Summary
Constructors Constructor Description InputRow(int size, boolean collectTimestamps, boolean collectTTLs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.nio.ByteBuffer v)voidadd(Cell<?> c, int nowInSec)longgetTimestamp(int index)Return the timestamp of the column with the specified index.intgetTtl(int index)Return the ttl of the column with the specified index.java.nio.ByteBuffergetValue(int index)Return the value of the column with the specified index.java.util.List<java.nio.ByteBuffer>getValues()Returns the column values as list.voidreset(boolean deep)Reset the row internal state.
-
-
-
Method Detail
-
add
public void add(java.nio.ByteBuffer v)
-
add
public void add(Cell<?> c, int nowInSec)
-
getValue
public java.nio.ByteBuffer getValue(int index)
Return the value of the column with the specified index.- Parameters:
index- the column index- Returns:
- the value of the column with the specified index
-
reset
public void reset(boolean deep)
Reset the row internal state.If the reset is not a deep one only the index will be reset. If the reset is a deep one a new array will be created to store the column values. This allow to reduce object creation when it is not necessary.
- Parameters:
deep-trueif the reset must be a deep one.
-
getTimestamp
public long getTimestamp(int index)
Return the timestamp of the column with the specified index.- Parameters:
index- the column index- Returns:
- the timestamp of the column with the specified index
-
getTtl
public int getTtl(int index)
Return the ttl of the column with the specified index.- Parameters:
index- the column index- Returns:
- the ttl of the column with the specified index
-
getValues
public java.util.List<java.nio.ByteBuffer> getValues()
Returns the column values as list.This content of the list will be shared with the
InputRowunless a deep reset has been done.- Returns:
- the column values as list.
-
-