Examples of executeAsync()


Examples of com.basho.riak.client.api.RiakClient.executeAsync()

        ip2.bucketName = bucketName.toString();
        ip2.indexKey = "index_test_index_key";
        ip2.value = "My Object Value!";
       
        sv = new StoreValue.Builder(ip2).build();
        svFuture = client.executeAsync(sv);
       
        svFuture.await();
        assertTrue(svFuture.isSuccess());
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
View Full Code Here

Examples of com.basho.riak.client.api.RiakClient.executeAsync()

        ip.bucketName = bucketName.toString();
        ip.indexKey = "index_test_index_key1";
        ip.value = "My Object Value!";
       
        StoreValue sv = new StoreValue.Builder(ip).build();
        RiakFuture<StoreValue.Response, Location> svFuture = client.executeAsync(sv);
       
        svFuture.await();
        assertTrue(svFuture.isSuccess());
       
        IndexedPojo ip2 = new IndexedPojo();
View Full Code Here

Examples of com.basho.riak.client.api.RiakClient.executeAsync()

        ip2.bucketName = bucketName.toString();
        ip2.indexKey = "index_test_index_key2";
        ip2.value = "My Object Value!";
       
        sv = new StoreValue.Builder(ip2).build();
        svFuture = client.executeAsync(sv);
       
        svFuture.await();
        assertTrue(svFuture.isSuccess());
       
        Namespace ns = new Namespace(Namespace.DEFAULT_BUCKET_TYPE, bucketName.toString());
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

    String partitionKey = tm.getPartitionKey().get(0).getName();
   
    Query query = QueryBuilder.select(colName.toString()).from(cfName).where(QueryBuilder.eq(partitionKey, rkey)).limit(1000000)
        .setConsistencyLevel(ConsistencyLevel.valueOf(com.netflix.jmeter.properties.Properties.instance.cassandra.getReadConsistency()));
   
    ResultSetFuture rs = session.executeAsync(query);

    int size = 0;
    try {
      Row row = rs.getUninterruptibly(1000000, TimeUnit.MILLISECONDS).one();
      size = row != null ? row.getBytesUnsafe(colName.toString()).capacity() : 0;
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

    String clusteredValue = colList[1];
    String colName = colList[2];
   
    Long start = System.nanoTime();
   
    ResultSetFuture rs = session.executeAsync(QueryBuilder.select(colName).from(cfName).where(QueryBuilder.eq(partitionKey, partitionValue))
        .and(QueryBuilder.eq(clusteredKey, clusteredValue)).limit(1000000));
   
    int size = 0;
   
    try {
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

            when(mockDataSource.getData(eq(0), anyInt())).thenReturn(resultList);
            when(mockDataSource.getData(eq(2), anyInt())).thenReturn(new ArrayList<Object[]>());
        }

        ResultSetFuture mockResultSetFuture = mock(ResultSetFuture.class);
        when(mockCassandraSession.executeAsync(any(Query.class))).thenReturn(mockResultSetFuture);

        //create object to test and inject required dependencies
        AggregateDataMigrator objectUnderTest = new AggregateDataMigrator(MigrationTable.ONE_HOUR, mockConfig);

        //run code under test
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

            when(mockDataSource.getData(eq(0), anyInt())).thenReturn(resultList);
            when(mockDataSource.getData(eq(2), anyInt())).thenReturn(new ArrayList<Object[]>());
        }

        ResultSetFuture mockResultSetFuture = mock(ResultSetFuture.class);
        when(mockCassandraSession.executeAsync(any(Query.class))).thenReturn(mockResultSetFuture);

        //create object to test and inject required dependencies
        RawDataMigrator objectUnderTest = new RawDataMigrator(mockConfig);

        //run code under test
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

            }

            Session session = driverSession();
            BoundStatement bStmt = entity.updateBoundStatement(statementOptions, session, instance, binder);
            ExecutionTracer tracer = executionTracer(PersistenceSessionTrackingImpl.this, entity);
            return new ModifyFutureImpl<T>(PersistenceSessionTrackingImpl.this, tracer, null, session.executeAsync(bStmt), entity, instance,
                PersistMode.UPDATE);
        }

        boolean filterUnmodifiedForUpdate(Binder binder) {
            for (CqlColumn col : binder.getColumnsForStatement()) {
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

            if (preModify != null) {
                preModify.invoke(future.instance, future.entity, future.mode);
            }
        }

        BatchFutureImpl future = new BatchFutureImpl(session.executeAsync(batchStatement));
        return future;
    }

    @Override public <T> BatchPartFuture<T> insert(T instance, PersistOption... persistOptions) {
        MappedEntityBase entity = persistenceSession.modifyBatch(this, instance, PersistMode.INSERT, persistOptions);
View Full Code Here

Examples of com.datastax.driver.core.Session.executeAsync()

    PreparedStatement preparedStatement = cpsc.createPreparedStatement(getSession());
    addPreparedStatementOptions(preparedStatement, options);

    Session s = getSession();
    while (rowIterator.hasNext()) {
      s.executeAsync(preparedStatement.bind(rowIterator.next()));
    }
  }

  @Override
  public void ingest(String cql, RowIterator rowIterator) {
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.