com.netflix.astyanax.thrift.model
Class ThriftRowsSliceImpl<K,C>
java.lang.Object
com.netflix.astyanax.thrift.model.ThriftRowsSliceImpl<K,C>
- Type Parameters:
K - C -
- All Implemented Interfaces:
- com.netflix.astyanax.model.Rows<K,C>, java.lang.Iterable<com.netflix.astyanax.model.Row<K,C>>
public class ThriftRowsSliceImpl<K,C>
- extends java.lang.Object
- implements com.netflix.astyanax.model.Rows<K,C>
Wrapper for a key slice response.
Will lazily create a lookup by key
|
Constructor Summary |
ThriftRowsSliceImpl(java.util.List<org.apache.cassandra.thrift.KeySlice> rows,
com.netflix.astyanax.Serializer<K> keySer,
com.netflix.astyanax.Serializer<C> colSer)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThriftRowsSliceImpl
public ThriftRowsSliceImpl(java.util.List<org.apache.cassandra.thrift.KeySlice> rows,
com.netflix.astyanax.Serializer<K> keySer,
com.netflix.astyanax.Serializer<C> colSer)
iterator
public java.util.Iterator<com.netflix.astyanax.model.Row<K,C>> iterator()
- Specified by:
iterator in interface java.lang.Iterable<com.netflix.astyanax.model.Row<K,C>>
getRow
public com.netflix.astyanax.model.Row<K,C> getRow(K key)
- Specified by:
getRow in interface com.netflix.astyanax.model.Rows<K,C>
size
public int size()
- Specified by:
size in interface com.netflix.astyanax.model.Rows<K,C>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface com.netflix.astyanax.model.Rows<K,C>
getRowByIndex
public com.netflix.astyanax.model.Row<K,C> getRowByIndex(int index)
- Specified by:
getRowByIndex in interface com.netflix.astyanax.model.Rows<K,C>
getKeys
public java.util.Collection<K> getKeys()
- Specified by:
getKeys in interface com.netflix.astyanax.model.Rows<K,C>