Package co.cask.tephra

Examples of co.cask.tephra.TransactionExecutor.execute()


      }

      @Override
      public void flush() throws IOException {
        try {
          txExecutor.execute(new TransactionExecutor.Subroutine() {
            @Override
            public void apply() throws Exception {
              for (StreamEvent event : events) {
                producer.enqueue(new QueueEntry(STREAM_EVENT_CODEC.encodePayload(event)));
              }
View Full Code Here


      }
    }

    TransactionExecutor txExecutor = new DefaultTransactionExecutor(txClient, txAwares);

    RETURN_TYPE result = txExecutor.execute(new Callable<RETURN_TYPE>() {
      @Override
      public RETURN_TYPE call() throws Exception {
        return tx.call(context);
      }
    });
View Full Code Here

      }
    });

    TransactionExecutor executor = txFactory.createExecutor(txAwares);
    try {
      return executor.execute(func, it);
    } finally {
      for (V t : it) {
        if (t instanceof Closeable) {
          ((Closeable) t).close();
        }
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.