Package org.springframework.cassandra.core

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


  }

  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

  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

  public void testDeleteAsynchronously(ConsistencyLevel cl) throws Exception {
    Thing thing = Thing.random();
    t.insert(thing);
    ThingDeletionListener listener = new ThingDeletionListener();
    t.deleteAsynchronously(thing, listener, new WriteOptions(cl, RetryPolicy.LOGGING));
    listener.await();
    if (listener.exception != null) {
      throw listener.exception;
    }
    assertFalse(t.exists(Thing.class, id("stuff", thing.stuff)));
View Full Code Here

TOP

Related Classes of org.springframework.cassandra.core.WriteOptions

Copyright © 2018 www.massapicom. 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.