Package co.cask.tephra.distributed.thrift

Examples of co.cask.tephra.distributed.thrift.TTransactionCouldNotTakeSnapshotException$TTransactionCouldNotTakeSnapshotExceptionTupleScheme


    try {
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      try {
        boolean snapshotTaken = txManager.takeSnapshot(out);
        if (!snapshotTaken) {
          throw new TTransactionCouldNotTakeSnapshotException("Transaction manager could not get a snapshot.");
        }
      } finally {
        out.close();
      }
      // todo find a way to encode directly to the stream, without having the snapshot in memory twice
      return ByteBuffer.wrap(out.toByteArray());
    } catch (IOException e) {
      throw new TTransactionCouldNotTakeSnapshotException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of co.cask.tephra.distributed.thrift.TTransactionCouldNotTakeSnapshotException$TTransactionCouldNotTakeSnapshotExceptionTupleScheme

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.