Package co.cask.tephra

Examples of co.cask.tephra.TransactionCouldNotTakeSnapshotException


            public InputStream execute(TransactionServiceThriftClient client)
                throws Exception {
              try {
                return client.getSnapshotStream();
              } catch (TTransactionCouldNotTakeSnapshotException e) {
                throw new TransactionCouldNotTakeSnapshotException(e.getMessage());
              }
            }
          });
    } catch (TransactionCouldNotTakeSnapshotException e) {
      throw e;
View Full Code Here


    try {
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      try {
        boolean snapshotTaken = txManager.takeSnapshot(out);
        if (!snapshotTaken) {
          throw new TransactionCouldNotTakeSnapshotException("Transaction manager did not take a snapshot.");
        }
      } finally {
        out.close();
      }
      return new ByteArrayInputStream(out.toByteArray());
    } catch (IOException e) {
      LOG.error("Snapshot could not be taken", e);
      throw new TransactionCouldNotTakeSnapshotException(e.getMessage());
    }
  }
View Full Code Here

    return true;
  }

  @Override
  public InputStream getSnapshotInputStream() throws TransactionCouldNotTakeSnapshotException {
    throw new TransactionCouldNotTakeSnapshotException("Not snapshot to take.");
  }
View Full Code Here

    return true;
  }

  @Override
  public InputStream getSnapshotInputStream() throws TransactionCouldNotTakeSnapshotException {
    throw new TransactionCouldNotTakeSnapshotException(
        "Snapshot not implemented in detached transaction system client");
  }
View Full Code Here

TOP

Related Classes of co.cask.tephra.TransactionCouldNotTakeSnapshotException

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.