gpt4 book ai didi

com.arjuna.ats.jta.utils.XAHelper.sameXID()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 10:31:05 33 4
gpt4 key购买 nike

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

XAHelper.sameXID介绍

[英]Compares two Xid instances.
[中]比较两个Xid实例。

代码示例

代码示例来源:origin: jboss.jbossts/jbossjts

public boolean contains (Xid xid)
{
if (_scanN != null)
{
  for (int i = 0; i < _scanN.length; i++)
  {
  if (XAHelper.sameXID(xid, _scanN[i]))
    return true;
  }
}

if (_scanM != null)
{
  for (int i = 0; i < _scanM.length; i++)
  {
  if (XAHelper.sameXID(xid, _scanM[i]))
    return true;
  }
}
return false;
}

代码示例来源:origin: jboss.jbossts/jbossjts

public final java.lang.Object[] toRecover ()
{
  final int numScanN = (_scanN == null ? 0 : _scanN.length) ;
  final int numScanM = (_scanM == null ? 0 : _scanM.length) ;
  final int numScan = Math.min(numScanN, numScanM) ;
  
  if (numScan == 0)
  {
    return null ;
  }
  
  final Vector workingVector = new Vector() ;
  
  for (int count = 0 ; count < numScan ; count++)
  {
    if (XAHelper.sameXID(_scanN[count], _scanM[count]))
    {
      workingVector.add(_scanN[count]);
    }
  }
  
  return workingVector.toArray();
}

代码示例来源:origin: jbosstm/narayana

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: org.jboss.narayana.jta/jta

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: jboss.jbossts/jbossjts

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: org.jboss.jbossts/jbossjta

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: jbosstm/narayana

/**
 * Is the Xid is in the failure list, i.e., the list of those transactions
 * we couldn't recover, possibly because of transient failures. If so,
 * return the uid of (one of) the records and remove it from the list.
 */
private final Uid previousFailure(Xid xid)
{
  if (_failures == null)
  {
    return null;
  }
  Enumeration e = _failures.keys();
  while (e.hasMoreElements())
  {
    Xid theXid = (Xid) e.nextElement();
    if (XAHelper.sameXID(xid, theXid))
    {
      // remove uid from failure list
      Vector failureItem = (Vector) _failures.get(theXid);
      Uid u = (Uid) failureItem.remove(0);
      if (failureItem.size() == 0)
        _failures.remove(theXid);
      return u;
    }
  }
  // not present in the failures list.
  return null;
}

代码示例来源:origin: jbosstm/narayana

XidImple xid3 = new XidImple(xid1);
assertFalse(XAHelper.sameXID(xid1, xid2));
assertTrue(XAHelper.sameXID(xid1, xid3));

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