com.arjuna.ats.txoj.Lock.conflictsWith()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.5k)|赞(0)|评价(0)|浏览(91)

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

Lock.conflictsWith介绍

[英]Implementation of Lock conflict check. Returns TRUE if there is conflict FALSE otherwise. Does not take account of relationship in the atomic action hierarchy since this is a function of LockManager.
[中]锁冲突检查的实现。如果存在冲突,则返回TRUE,否则返回FALSE。不考虑原子操作层次结构中的关系,因为这是LockManager的一个功能。

代码示例

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

protected final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
          return ConflictType.CONFLICT;
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

private final int lockConflict (Lock otherLock)
{
  if (txojLogger.logger.isTraceEnabled()) {
    txojLogger.logger.trace("LockManager::lockConflict(" + otherLock.get_uid() + ")");
  }
  boolean matching = false;
  Lock heldLock = null;
  LockListIterator next = new LockListIterator(locksHeld);
  while ((heldLock = next.iterate()) != null)
  {
    if (heldLock.conflictsWith(otherLock))
    {
      if (LockManager.nestedLocking)
      {
        if (!isAncestorOf(heldLock)) /* not quite Moss's rules */
        {
          return ConflictType.CONFLICT;
        }
      }
      else
        return ConflictType.CONFLICT;
    }
    else
    {
      if (heldLock.equals(otherLock))
        matching = true;
    }
  }
  return (matching ? ConflictType.PRESENT : ConflictType.COMPATIBLE);
}

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

if (heldLock.conflictsWith(otherLock))

相关文章