gpt4 book ai didi

com.arjuna.ats.jta.xa.XidImple.equals()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 23:43:05 26 4
gpt4 key购买 nike

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

XidImple.equals介绍

[英]Is the specified object equal to this one?
[中]指定的对象是否等于此对象?

代码示例

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

/**
 * Is the specified object equal to this one?
 * @param obj The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj)
{
  if (obj instanceof Xid)
  {
    return equals((Xid)obj) ;
  }
  return false ;
}

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

/**
 * Is the specified object equal to this one?
 * 
 * @param obj
 *            The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj) {
  if (obj instanceof Xid) {
    return equals((Xid) obj);
  }
  return false;
}

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

/**
 * Is the specified object equal to this one?
 * 
 * @param obj
 *            The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj) {
  if (obj instanceof Xid) {
    return equals((Xid) obj);
  }
  return false;
}

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

/**
 * Is the specified object equal to this one?
 * 
 * @param obj
 *            The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj) {
  if (obj instanceof Xid) {
    return equals((Xid) obj);
  }
  return false;
}

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

/**
 * Is the specified object equal to this one?
 * 
 * @param obj
 *            The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj) {
  if (obj instanceof Xid) {
    return equals((Xid) obj);
  }
  return false;
}

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

/**
 * Is the specified object equal to this one?
 * 
 * @param obj
 *            The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj) {
  if (obj instanceof Xid) {
    return equals((Xid) obj);
  }
  return false;
}

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

/**
 * Is the specified object equal to this one?
 * 
 * @param obj
 *            The object to test.
 * @return true if they are equal, false otherwise.
 */
public boolean equals(final Object obj) {
  if (obj instanceof Xid) {
    return equals((Xid) obj);
  }
  return false;
}

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

private XARecoveryResourceMBean findJTSXAResourceRecordWrapper(XAResourceRecordBean xarrb) {
  getXARecoveryResourceMBeans(_uidWrapper);
  for (XARecoveryResourceMBean bean : xaRecoveryResourceMBeans) {
    if (xarrb.xares.xidImple.equals(((JTSXAResourceRecordWrapper) bean).xidImple))
      return bean;
  }
  return null;
}

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

@Override
  public int compare(Xid o1, Xid o2) {
    if (((XidImple)o1).equals(o2)) {
      return 0;
    } else {
      return -1;
    }
  }
}) != -1);

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

/**
 * Test equality as being part of the same global transaction
 */
@Override
public boolean equals(Object obj) {
  if (_theXid.formatID != XATxConverter.FORMAT_ID) {
    return super.equals(obj);
  }
  boolean toReturn = false;
  if (obj instanceof SubordinateXidImple) {
    toReturn = isSameTransaction(((SubordinateXidImple) obj));
  }
  return toReturn;
}

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

/**
 * Test equality as being part of the same global transaction
 */
@Override
public boolean equals(Object obj) {
  if (_theXid.formatID != XATxConverter.FORMAT_ID) {
    return super.equals(obj);
  }
  boolean toReturn = false;
  if (obj instanceof SubordinateXidImple) {
    toReturn = isSameTransaction(((SubordinateXidImple) obj));
  }
  return toReturn;
}

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

/**
 * Test equality as being part of the same global transaction
 */
@Override
public boolean equals(Object obj) {
  if (_theXid.formatID != XATxConverter.FORMAT_ID) {
    return super.equals(obj);
  }
  boolean toReturn = false;
  if (obj instanceof SubordinateXidImple) {
    toReturn = isSameTransaction(((SubordinateXidImple) obj));
  }
  return toReturn;
}

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

/**
 * Test equality as being part of the same global transaction
 */
@Override
public boolean equals(Object obj) {
  if (_theXid.formatID != XATxConverter.FORMAT_ID) {
    return super.equals(obj);
  }
  boolean toReturn = false;
  if (obj instanceof SubordinateXidImple) {
    toReturn = isSameTransaction(((SubordinateXidImple) obj));
  }
  return toReturn;
}

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

/**
 * Test equality as being part of the same global transaction
 */
@Override
public boolean equals(Object obj) {
  if (_theXid.formatID != XATxConverter.FORMAT_ID) {
    return super.equals(obj);
  }
  boolean toReturn = false;
  if (obj instanceof SubordinateXidImple) {
    toReturn = isSameTransaction(((SubordinateXidImple) obj));
  }
  return toReturn;
}

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

/**
 * Test equality as being part of the same global transaction
 */
@Override
public boolean equals(Object obj) {
  if (_theXid.formatID != XATxConverter.FORMAT_ID) {
    return super.equals(obj);
  }
  boolean toReturn = false;
  if (obj instanceof SubordinateXidImple) {
    toReturn = isSameTransaction(((SubordinateXidImple) obj));
  }
  return toReturn;
}

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

public final boolean isSameTransaction(Xid xid) {
  if (xid == null)
    return false;
  if (xid instanceof XidImple) {
    return _theXid.isSameTransaction(((XidImple) xid)._theXid);
  }
  if (getFormatId() == xid.getFormatId()) {
    byte[] gtx = xid.getGlobalTransactionId();
    if (_theXid.gtrid_length == gtx.length) {
      if (equals(xid))
        return true;
      else {
        for (int i = 0; i < _theXid.gtrid_length; i++) {
          if (_theXid.data[i] != gtx[i])
            return false;
        }
        return true;
      }
    }
  }
  return false;
}

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

public final boolean isSameTransaction(Xid xid) {
  if (xid == null)
    return false;
  if (xid instanceof XidImple) {
    return _theXid.isSameTransaction(((XidImple) xid)._theXid);
  }
  if (getFormatId() == xid.getFormatId()) {
    byte[] gtx = xid.getGlobalTransactionId();
    if (_theXid.gtrid_length == gtx.length) {
      if (equals(xid))
        return true;
      else {
        for (int i = 0; i < _theXid.gtrid_length; i++) {
          if (_theXid.data[i] != gtx[i])
            return false;
        }
        return true;
      }
    }
  }
  return false;
}

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

public final boolean isSameTransaction(Xid xid) {
  if (xid == null)
    return false;
  if (xid instanceof XidImple) {
    return _theXid.isSameTransaction(((XidImple) xid)._theXid);
  }
  if (getFormatId() == xid.getFormatId()) {
    byte[] gtx = xid.getGlobalTransactionId();
    if (_theXid.gtrid_length == gtx.length) {
      if (equals(xid))
        return true;
      else {
        for (int i = 0; i < _theXid.gtrid_length; i++) {
          if (_theXid.data[i] != gtx[i])
            return false;
        }
        return true;
      }
    }
  }
  return false;
}

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

public final boolean isSameTransaction(Xid xid) {
  if (xid == null)
    return false;
  if (xid instanceof XidImple) {
    return _theXid.isSameTransaction(((XidImple) xid)._theXid);
  }
  if (getFormatId() == xid.getFormatId()) {
    byte[] gtx = xid.getGlobalTransactionId();
    if (_theXid.gtrid_length == gtx.length) {
      if (equals(xid))
        return true;
      else {
        for (int i = 0; i < _theXid.gtrid_length; i++) {
          if (_theXid.data[i] != gtx[i])
            return false;
        }
        return true;
      }
    }
  }
  return false;
}

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

@Test
  public void testPackUnpack () throws Exception
  {
    XidImple xid1 = new XidImple(new Uid());
    OutputObjectState os = new OutputObjectState();
    
    assertTrue(xid1.packInto(os));
    
    InputObjectState is = new InputObjectState(os);
    
    XidImple xid2 = new XidImple();
    
    assertTrue(xid2.unpackFrom(is));
    
    assertTrue(xid1.equals(xid2));
    
    os = new OutputObjectState();
    
    XidImple.pack(os, xid1);
    
    is = new InputObjectState(os);
    
    xid2 = (XidImple) XidImple.unpack(is);
    
    assertTrue(xid1.equals(xid2));
  }
}

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