Examples of CQLExecutorIterator


Examples of com.pardot.rhombus.cobject.statement.CQLExecutorIterator

      UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
      CDefinition cDefinition = definition.getDefinitions().get("object2");
      BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize(nDataItems);


      assertTrue(cqlExecutorIterator.hasNext());
      assertNotNull(cqlExecutorIterator.next());
      assertFalse(cqlExecutorIterator.hasNext());
      assertNull(cqlExecutorIterator.next());

    }
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLExecutorIterator

      UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
      CDefinition cDefinition = definition.getDefinitions().get("object2");
      BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize(nDataItems);


      for (int i=0 ; i< nDataItems; i++ ){
        assertTrue(cqlExecutorIterator.hasNext());
        assertNotNull(cqlExecutorIterator.next());
      }

      assertFalse(cqlExecutorIterator.hasNext());
    }
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLExecutorIterator

      CObjectCQLGenerator cqlGenerator = om.getCqlGenerator_ONLY_FOR_TESTING();
      CQLStatementIterator unBoundedIterator = cqlGenerator.makeCQLforList(objectType, criteria, false);

      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize(nDataItems-1);


      for (int i=0 ; i < nDataItems ; i++ ){
        assertTrue(cqlExecutorIterator.hasNext());
        assertNotNull(cqlExecutorIterator.next());
      }

      assertFalse(cqlExecutorIterator.hasNext());
    }
View Full Code Here

Examples of com.pardot.rhombus.cobject.statement.CQLExecutorIterator

      UUID stop = UUID.fromString(uuidList.get(nDataItems-1));
      CDefinition cDefinition = definition.getDefinitions().get("object2");
      BaseCQLStatementIterator unBoundedIterator = (BaseCQLStatementIterator) CObjectCQLGenerator.makeCQLforList(KEYSPACE_NAME, shardIdLists, cDefinition, indexValues, CObjectOrdering.DESCENDING, null, stop, 10l, true, false, false);
      Session session = cm.getRhombusSession(definition);
      CQLExecutor cqlExecutor = new CQLExecutor(session, true, definition.getConsistencyLevel());
      CQLExecutorIterator cqlExecutorIterator = new CQLExecutorIterator(cqlExecutor, unBoundedIterator);
      cqlExecutorIterator.setPageSize((nDataItems/5));


      for (int i=0 ; i< nDataItems; i++ ){
        assertTrue(cqlExecutorIterator.hasNext());
        assertNotNull(cqlExecutorIterator.next());
      }

      assertFalse(cqlExecutorIterator.hasNext());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.