Class Selector.InputRow

  • Enclosing class:
    Selector

    public static final class Selector.InputRow
    extends java.lang.Object
    A row of data that need to be processed by a Selector
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.nio.ByteBuffer v)  
      void add​(ColumnData columnData, long nowInSec)  
      ProtocolVersion getProtocolVersion()  
      java.nio.ByteBuffer getValue​(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.
      void reset​(boolean deep)
      Reset the row internal state.
      boolean unmask()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InputRow

        public InputRow​(ProtocolVersion protocolVersion,
                        java.util.List<ColumnMetadata> columns,
                        boolean unmask,
                        boolean collectWritetimes,
                        boolean collectTTLs)
    • Method Detail

      • unmask

        public boolean unmask()
      • add

        public void add​(java.nio.ByteBuffer v)
      • add

        public void add​(ColumnData columnData,
                        long 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 - true if the reset must be a deep one.
      • 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 InputRow unless a deep reset has been done.

        Returns:
        the column values as list.