Examples of WriteOptions


Examples of org.springframework.cassandra.core.WriteOptions

  }

  @Test
  public void insertBatchAsynchronouslyTest() {

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    List<Book> books = null;

    books = getBookList(20);
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  @Test
  public void updateTest() {

    insertTest();

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    /*
     * Test Single Insert with entity
     */
    Book b1 = new Book();
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  @Test
  public void updateAsynchronouslyTest() {

    insertTest();

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    /*
     * Test Single Insert with entity
     */
    Book b1 = new Book();
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  }

  @Test
  public void updateBatchTest() {

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    List<Book> books = null;

    books = getBookList(20);
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  }

  @Test
  public void updateBatchAsynchronouslyTest() {

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    List<Book> books = null;

    books = getBookList(20);
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  }

  @Test
  public void deleteBatchTest() {

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    List<Book> books = null;

    books = getBookList(20);
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  }

  @Test
  public void deleteBatchAsynchronouslyTest() {

    WriteOptions options = new WriteOptions();
    options.setTtl(60);
    options.setConsistencyLevel(ConsistencyLevel.ONE);
    options.setRetryPolicy(RetryPolicy.DOWNGRADING_CONSISTENCY);

    List<Book> books = null;

    books = getBookList(20);
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  @Test
  @SuppressWarnings("unchecked")
  public void ingestionTestListOfList() {

    WriteOptions options = new WriteOptions();
    options.setTtl(360);

    String cql = "insert into book (isbn, title, author, pages) values (?, ?, ?, ?)";

    List<List<?>> values = new LinkedList<List<?>>();
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  }

  public void testInsertAsynchronously(ConsistencyLevel cl) throws Exception {
    Thing thing = Thing.random();
    ThingWriteListener listener = new ThingWriteListener();
    t.insertAsynchronously(thing, listener, new WriteOptions(cl, RetryPolicy.LOGGING));
    listener.await();
    if (listener.exception != null) {
      throw listener.exception;
    }
    assertEquals(thing, listener.entities.iterator().next());
View Full Code Here

Examples of org.springframework.cassandra.core.WriteOptions

  public void testUpdateAsynchronously(ConsistencyLevel cl) throws Exception {
    Thing thing = Thing.random();
    t.insert(thing);
    thing.number = Thing.random().number;
    ThingWriteListener listener = new ThingWriteListener();
    t.updateAsynchronously(thing, listener, new WriteOptions(cl, RetryPolicy.LOGGING));
    listener.await();
    if (listener.exception != null) {
      throw listener.exception;
    }
    assertEquals(thing, listener.entities.iterator().next());
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.