gpt4 book ai didi

org.apache.geronimo.transaction.manager.XidImpl类的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 17:45:40 26 4
gpt4 key购买 nike

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

XidImpl介绍

[英]Unique id for a transaction.
[中]事务的唯一id。

代码示例

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

public Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier) {
  return new XidImpl(formatId, globalTransactionid, branchQualifier);
}

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

public int hashCode() {
  if (hash == 0) {
    hash = hash(hash(0, globalId), branchId);
  }
  return hash;
}

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

/**
 * Constructor taking a global id (for the main transaction)
 * @param globalId the global transaction id
 */
public XidImpl(byte[] globalId) {
  this.formatId = FORMAT_ID;
  this.globalId = globalId;
  //this.hash = hash(0, globalId);
  branchId = new byte[Xid.MAXBQUALSIZE];
  check();
}

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

private void check() {
  if (globalId.length > Xid.MAXGTRIDSIZE) {
    throw new IllegalStateException("Global id is too long: " + toString());
  }
  if (branchId.length > Xid.MAXBQUALSIZE) {
    throw new IllegalStateException("Branch id is too long: " + toString());
  }
}

代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-management-jtajca

public static String id(Object key) {
  if (key instanceof XidImpl) {
    byte[] globalId = ((XidImpl) key).getGlobalTransactionId();
    StringBuilder buffer = new StringBuilder();
    for (byte aGlobalId : globalId) {
      buffer.append(Integer.toHexString(aGlobalId));
    }
    return buffer.toString().replaceAll("0*$", "");
  }
  return key.toString();
}

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

public Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier) {
  return new XidImpl(formatId, globalTransactionid, branchQualifier);
}

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

public int hashCode() {
  if (hash == 0) {
    hash = hash(hash(0, globalId), branchId);
  }
  return hash;
}

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

public XidImpl(int formatId, byte[] globalId, byte[] branchId) {
  this.formatId = formatId;
  this.globalId = globalId;
  this.branchId = branchId;
  check();
}

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

public Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier) {
  return new XidImpl(formatId, globalTransactionid, branchQualifier);
}

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

public int hashCode() {
  if (hash == 0) {
    hash = hash(hash(0, globalId), branchId);
  }
  return hash;
}

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

/**
 * Constructor for a branch id
 * @param global the xid of the global transaction this branch belongs to
 * @param branch the branch id
 */
public XidImpl(Xid global, byte[] branch) {
  this.formatId = FORMAT_ID;
  //int hash;
  if (global instanceof XidImpl) {
    globalId = ((XidImpl) global).globalId;
    //hash = ((XidImpl) global).hash;
  } else {
    globalId = global.getGlobalTransactionId();
    //hash = hash(0, globalId);
  }
  branchId = branch;
  //this.hash = hash(hash, branchId);
  check();
}

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

public Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier) {
  return new XidImpl(formatId, globalTransactionid, branchQualifier);
}

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

public int hashCode() {
  if (hash == 0) {
    hash = hash(hash(0, globalId), branchId);
  }
  return hash;
}

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

public Xid recover(int formatId, byte[] globalTransactionid, byte[] branchQualifier) {
  return new XidImpl(formatId, globalTransactionid, branchQualifier);
}

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

public Xid createBranch(Xid globalId, int branch) {
  byte[] branchId = (byte[]) baseId.clone();
  branchId[0] = (byte) branch;
  branchId[1] = (byte) (branch >>> 8);
  branchId[2] = (byte) (branch >>> 16);
  branchId[3] = (byte) (branch >>> 24);
  return new XidImpl(globalId, branchId);
}

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

public Xid createBranch(Xid globalId, int branch) {
  byte[] branchId = (byte[]) baseId.clone();
  branchId[0] = (byte) branch;
  branchId[1] = (byte) (branch >>> 8);
  branchId[2] = (byte) (branch >>> 16);
  branchId[3] = (byte) (branch >>> 24);
  return new XidImpl(globalId, branchId);
}

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

public Xid createBranch(Xid globalId, int branch) {
  byte[] branchId = (byte[]) baseId.clone();
  branchId[0] = (byte) branch;
  branchId[1] = (byte) (branch >>> 8);
  branchId[2] = (byte) (branch >>> 16);
  branchId[3] = (byte) (branch >>> 24);
  return new XidImpl(globalId, branchId);
}

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

public Xid createXid() {
  byte[] globalId = (byte[]) baseId.clone();
  long id;
  synchronized (this) {
    id = count++;
  }
  globalId[0] = (byte) id;
  globalId[1] = (byte) (id >>> 8);
  globalId[2] = (byte) (id >>> 16);
  globalId[3] = (byte) (id >>> 24);
  globalId[4] = (byte) (id >>> 32);
  globalId[5] = (byte) (id >>> 40);
  globalId[6] = (byte) (id >>> 48);
  globalId[7] = (byte) (id >>> 56);
  return new XidImpl(globalId);
}

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

public Xid createXid() {
  byte[] globalId = (byte[]) baseId.clone();
  long id;
  synchronized (this) {
    id = count++;
  }
  globalId[0] = (byte) id;
  globalId[1] = (byte) (id >>> 8);
  globalId[2] = (byte) (id >>> 16);
  globalId[3] = (byte) (id >>> 24);
  globalId[4] = (byte) (id >>> 32);
  globalId[5] = (byte) (id >>> 40);
  globalId[6] = (byte) (id >>> 48);
  globalId[7] = (byte) (id >>> 56);
  return new XidImpl(globalId);
}

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

public Xid createXid() {
  byte[] globalId = (byte[]) baseId.clone();
  long id;
  synchronized (this) {
    id = count++;
  }
  globalId[0] = (byte) id;
  globalId[1] = (byte) (id >>> 8);
  globalId[2] = (byte) (id >>> 16);
  globalId[3] = (byte) (id >>> 24);
  globalId[4] = (byte) (id >>> 32);
  globalId[5] = (byte) (id >>> 40);
  globalId[6] = (byte) (id >>> 48);
  globalId[7] = (byte) (id >>> 56);
  return new XidImpl(globalId);
}

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