GigaSpaces XAP 10.0.1 API

org.openspaces.persistency.cassandra.datasource
Class CassandraTokenRangeJDBCDataIterator

java.lang.Object
  extended by org.openspaces.persistency.cassandra.datasource.CassandraTokenRangeJDBCDataIterator
All Implemented Interfaces:
DataIterator<Object>, Iterator<Object>

public class CassandraTokenRangeJDBCDataIterator
extends Object
implements DataIterator<Object>

Note: the underlying cassandra jdbc implementation brings the entire batch when calling execute, so SQLException exceptions will actually only be thrown during prepare statement and execute statment Moreover, the iteration over the results is currently only logical because the entire result set already lies in memory after execute statement returns.

Since:
9.1.1
Author:
Dan Kilman

Constructor Summary
CassandraTokenRangeJDBCDataIterator(SpaceDocumentColumnFamilyMapper mapper, ColumnFamilyMetadata columnFamilyMetadata, ConnectionResource connectionResource, CQLQueryContext queryContext, Object lastToken, int limit, CassandraConsistencyLevel readConsistencyLevel)
           
 
Method Summary
 void close()
          Clean up after any resources associated with this iterator The iterator can be closed even if the iterator wasn't iterated over all of its elements.
 void closeSelfResources()
           
 int getCurrentTotalCount()
           
 Object getLastToken()
           
 int getLimit()
           
 boolean hasNext()
           
 SpaceDocument next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CassandraTokenRangeJDBCDataIterator

public CassandraTokenRangeJDBCDataIterator(SpaceDocumentColumnFamilyMapper mapper,
                                           ColumnFamilyMetadata columnFamilyMetadata,
                                           ConnectionResource connectionResource,
                                           CQLQueryContext queryContext,
                                           Object lastToken,
                                           int limit,
                                           CassandraConsistencyLevel readConsistencyLevel)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Object>

next

public SpaceDocument next()
Specified by:
next in interface Iterator<Object>

remove

public void remove()
Specified by:
remove in interface Iterator<Object>

closeSelfResources

public void closeSelfResources()

close

public void close()
Description copied from interface: DataIterator
Clean up after any resources associated with this iterator The iterator can be closed even if the iterator wasn't iterated over all of its elements.

Specified by:
close in interface DataIterator<Object>

getLastToken

public Object getLastToken()

getLimit

public int getLimit()

getCurrentTotalCount

public int getCurrentTotalCount()

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.