org.usergrid.persistence.cassandra
Class QueryProcessor

java.lang.Object
  extended by org.usergrid.persistence.cassandra.QueryProcessor

public class QueryProcessor
extends Object


Nested Class Summary
static class QueryProcessor.CursorCache
          Internal cursor parsing
 
Constructor Summary
QueryProcessor(Query query, CollectionInfo collectionInfo)
           
 
Method Summary
 void applyCursorAndSort(QuerySlice slice)
          Apply cursor position and sort order to this slice.
 SliceNode generateSorts()
          Generate a slice node with scan ranges for all the properties in our sort cache
 String getCursor()
          Get the cursor as a string.
 QueryNode getFirstNode()
           
 List<Entity> sort(List<Entity> entities)
          Perform an in memory sort of the entities
 void updateCursor(QuerySlice slice, ByteBuffer value)
          Update the cursor for the slice with the new value
 void updateCursor(QuerySlice slice, String cursorValue)
          Update the cursor cache with the new cursor value for the given slice and value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProcessor

public QueryProcessor(Query query,
                      CollectionInfo collectionInfo)
               throws PersistenceException
Throws:
PersistenceException
Method Detail

getFirstNode

public QueryNode getFirstNode()

sort

public List<Entity> sort(List<Entity> entities)
Perform an in memory sort of the entities

Parameters:
entities -
Returns:

applyCursorAndSort

public void applyCursorAndSort(QuerySlice slice)
Apply cursor position and sort order to this slice. This should only be invoke at evaluation time to ensure that the IR tree has already been fully constructed

Parameters:
slice -

updateCursor

public void updateCursor(QuerySlice slice,
                         ByteBuffer value)
Update the cursor for the slice with the new value

Parameters:
slice -

getCursor

public String getCursor()
Get the cursor as a string. This should only be invoked when

Returns:

updateCursor

public void updateCursor(QuerySlice slice,
                         String cursorValue)
Update the cursor cache with the new cursor value for the given slice and value. The cache can then be serialized to a string and returned to the user after all tree operations have completed.

Parameters:
slice -
cursorValue -

generateSorts

public SliceNode generateSorts()
Generate a slice node with scan ranges for all the properties in our sort cache

Returns:


Copyright © 2013. All Rights Reserved.