gpt4 book ai didi

org.objectweb.howl.log.xa.XALogger.putCommit()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 12:43:05 28 4
gpt4 key购买 nike

本文整理了Java中org.objectweb.howl.log.xa.XALogger.putCommit()方法的一些代码示例,展示了XALogger.putCommit()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XALogger.putCommit()方法的具体详情如下:
包路径:org.objectweb.howl.log.xa.XALogger
类名称:XALogger
方法名:putCommit

XALogger.putCommit介绍

[英]Write a begin COMMIT record to the log.

Call blocks until the data is forced to disk.
[中]将开始提交记录写入日志。
调用阻塞,直到数据被强制存储到磁盘。

代码示例

代码示例来源:origin: org.kuali.jotm/jotm-core

/**
 * write the Commit record to the Howl Log
 * @param xaCmRec the Commit Record
 * @return the XACommittingTx returned by putCommit
 * @throws LogException could not log the record
 * @throws IOException
 * @throws InterruptedException
 */
public XACommittingTx howlCommitLog(byte [][] xaCmRec) throws LogException, IOException, InterruptedException {
  if (TraceTm.recovery.isDebugEnabled()) {
    TraceTm.recovery.debug("Commit howl log");
  }
  return xaLog.putCommit(xaCmRec);
}

代码示例来源:origin: org.ow2.jotm/jotm-core

/**
 * write the Commit record to the Howl Log
 * @param xaCmRec the Commit Record
 * @return the XACommittingTx returned by putCommit
 * @throws LogException could not log the record
 * @throws IOException
 * @throws InterruptedException
 */
public XACommittingTx howlCommitLog(byte [][] xaCmRec) throws LogException, IOException, InterruptedException {
  if (TraceTm.recovery.isDebugEnabled()) {
    TraceTm.recovery.debug("Commit howl log");
  }
  return xaLog.putCommit(xaCmRec);
}

代码示例来源:origin: org.apache.servicemix.transaction/org.apache.servicemix.transaction

public Object prepare(Xid xid, List branches) throws LogException {
  int branchCount = branches.size();
  byte[][] data = new byte[3 + 2 * branchCount][];
  data[0] = intToBytes(xid.getFormatId());
  data[1] = xid.getGlobalTransactionId();
  data[2] = xid.getBranchQualifier();
  int i = 3;
  for (Iterator iterator = branches.iterator(); iterator.hasNext();) {
    TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) iterator.next();
    data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier();
    data[i++] = transactionBranchInfo.getResourceName().getBytes();
  }
  try {
    XACommittingTx committingTx = logger.putCommit(data);
    return committingTx;
  } catch (LogClosedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogRecordSizeException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogFileOverflowException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (InterruptedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (IOException e) {
    throw new LogException(e);
  }
}

代码示例来源:origin: org.apache.geronimo/com.springsource.org.apache.geronimo.transaction

public Object prepare(Xid xid, List branches) throws LogException {
  int branchCount = branches.size();
  byte[][] data = new byte[3 + 2 * branchCount][];
  data[0] = intToBytes(xid.getFormatId());
  data[1] = xid.getGlobalTransactionId();
  data[2] = xid.getBranchQualifier();
  int i = 3;
  for (Iterator iterator = branches.iterator(); iterator.hasNext();) {
    TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) iterator.next();
    data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier();
    data[i++] = transactionBranchInfo.getResourceName().getBytes();
  }
  try {
    XACommittingTx committingTx = logger.putCommit(data);
    return committingTx;
  } catch (LogClosedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogRecordSizeException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogFileOverflowException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (InterruptedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (IOException e) {
    throw new LogException(e);
  }
}

代码示例来源:origin: apache/felix

public Object prepare(Xid xid, List branches) throws LogException {
  int branchCount = branches.size();
  byte[][] data = new byte[3 + 2 * branchCount][];
  data[0] = intToBytes(xid.getFormatId());
  data[1] = xid.getGlobalTransactionId();
  data[2] = xid.getBranchQualifier();
  int i = 3;
  for (Iterator iterator = branches.iterator(); iterator.hasNext();) {
    TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) iterator.next();
    data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier();
    data[i++] = transactionBranchInfo.getResourceName().getBytes();
  }
  try {
    XACommittingTx committingTx = logger.putCommit(data);
    return committingTx;
  } catch (LogClosedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogRecordSizeException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogFileOverflowException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (InterruptedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (IOException e) {
    throw new LogException(e);
  }
}

代码示例来源:origin: org.apache.geronimo.components/geronimo-transaction

public Object prepare(Xid xid, List<? extends TransactionBranchInfo> branches) throws LogException {
  int branchCount = branches.size();
  byte[][] data = new byte[3 + 2 * branchCount][];
  data[0] = intToBytes(xid.getFormatId());
  data[1] = xid.getGlobalTransactionId();
  data[2] = xid.getBranchQualifier();
  int i = 3;
  for (TransactionBranchInfo transactionBranchInfo : branches) {
    data[i++] = transactionBranchInfo.getBranchXid().getBranchQualifier();
    data[i++] = transactionBranchInfo.getResourceName().getBytes();
  }
  try {
    XACommittingTx committingTx = logger.putCommit(data);
    return committingTx;
  } catch (LogClosedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogRecordSizeException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (LogFileOverflowException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (InterruptedException e) {
    throw (IllegalStateException) new IllegalStateException().initCause(e);
  } catch (IOException e) {
    throw new LogException(e);
  }
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com