me.prettyprint.cassandra.model
Class OrderedRowsImpl<K,N,V>

java.lang.Object
  extended by me.prettyprint.cassandra.model.RowsImpl<K,N,V>
      extended by me.prettyprint.cassandra.model.OrderedRowsImpl<K,N,V>
Type Parameters:
N -
V -
All Implemented Interfaces:
Iterable<Row<K,N,V>>, OrderedRows<K,N,V>, Rows<K,N,V>
Direct Known Subclasses:
CqlRows

public class OrderedRowsImpl<K,N,V>
extends RowsImpl<K,N,V>
implements OrderedRows<K,N,V>

Return type from get_range_slices for simple columns

Author:
Ran Tavory, zznate

Field Summary
protected  List<Row<K,N,V>> rowsList
           
 
Fields inherited from class me.prettyprint.cassandra.model.RowsImpl
rows
 
Constructor Summary
protected OrderedRowsImpl()
           
  OrderedRowsImpl(LinkedHashMap<K,List<org.apache.cassandra.thrift.Column>> thriftRet, Serializer<N> nameSerializer, Serializer<V> valueSerializer)
           
 
Method Summary
 List<Row<K,N,V>> getList()
          Preserves rows order
 Row<K,N,V> peekLast()
          Returns the last element in this row result.
 
Methods inherited from class me.prettyprint.cassandra.model.RowsImpl
getByKey, getCount, iterator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface me.prettyprint.hector.api.beans.Rows
getByKey, getCount
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

rowsList

protected final List<Row<K,N,V>> rowsList
Constructor Detail

OrderedRowsImpl

public OrderedRowsImpl(LinkedHashMap<K,List<org.apache.cassandra.thrift.Column>> thriftRet,
                       Serializer<N> nameSerializer,
                       Serializer<V> valueSerializer)

OrderedRowsImpl

protected OrderedRowsImpl()
Method Detail

getList

public List<Row<K,N,V>> getList()
Preserves rows order

Specified by:
getList in interface OrderedRows<K,N,V>
Returns:
an unmodifiable list of Rows

peekLast

public Row<K,N,V> peekLast()
Returns the last element in this row result. Helpful for passing along for paging situations.

Specified by:
peekLast in interface OrderedRows<K,N,V>
Returns:


Copyright © 2011. All Rights Reserved.