Examples of QueryOptions


Examples of org.apache.cassandra.cql3.QueryOptions

                catch (NumberFormatException e)
                {
                    return null;
                }
            }
            return new QueryMessage(query, new QueryOptions(ConsistencyLevel.ONE, Collections.<ByteBuffer>emptyList(), false, pageSize, null, null));
        }
        else if (msgType.equals("PREPARE"))
        {
            String query = line.substring(8);
            return new PrepareMessage(query);
        }
        else if (msgType.equals("EXECUTE"))
        {
            try
            {
                byte[] id = Hex.hexToBytes(iter.next());
                List<ByteBuffer> values = new ArrayList<ByteBuffer>();
                while(iter.hasNext())
                {
                    String next = iter.next();
                    ByteBuffer bb;
                    try
                    {
                        int v = Integer.parseInt(next);
                        bb = Int32Type.instance.decompose(v);
                    }
                    catch (NumberFormatException e)
                    {
                        bb = UTF8Type.instance.decompose(next);
                    }
                    values.add(bb);
                }
                return new ExecuteMessage(MD5Digest.wrap(id), new QueryOptions(ConsistencyLevel.ONE, values));
            }
            catch (Exception e)
            {
                return null;
            }
View Full Code Here

Examples of org.directwebremoting.io.QueryOptions

     * sorting.
     */
    public MapStoreProvider(Map<String, T> map, Class<T> type, List<SortCriterion> defaultCriteria, ComparatorFactory<T> comparatorFactory)
    {
        super(type);
        this.baseRegion = new StoreRegion(0, -1, defaultCriteria, null, new QueryOptions());
        this.comparatorFactory = comparatorFactory;

        Index index = new Index(baseRegion, map);
        data.put(baseRegion, index);
    }
View Full Code Here

Examples of org.springframework.cassandra.core.QueryOptions

  public void testString_AsynchronousQueryListener_QueryOptions(final ConsistencyLevel cl) throws InterruptedException {
    new AsynchronousQueryListenerTestTemplate() {
      @Override
      void doAsyncQuery(Book b, BasicListener listener) {
        t.queryAsynchronously(cql(b), listener, new QueryOptions(cl, RetryPolicy.LOGGING));
      }
    }.test();
  }
View Full Code Here

Examples of pt.webdetails.cda.query.QueryOptions

      final CdaSettings cdaSettings = new CdaSettings(cda, "cda1", null);

      log.debug("Doing query on Cda - Initializing CdaEngine");
      final CdaEngine engine = CdaEngine.getInstance();
      final QueryOptions queryOptions = new QueryOptions();
      queryOptions.setDataAccessId("1");
      queryOptions.setOutputType("json");
      log.info("Doing query");
      ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
      PrintStream printstream = new PrintStream(outputStream);
      engine.doQuery(printstream, cdaSettings, queryOptions);
      byte[] doc = outputStream.toByteArray();
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.