gpt4 book ai didi

bitronix.tm.internal.XAResourceHolderState.getTwoPcOrderingPosition()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 17:55:05 27 4
gpt4 key购买 nike

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

XAResourceHolderState.getTwoPcOrderingPosition介绍

暂无

代码示例

代码示例来源:origin: bitronix/btm

if (flag != XAResource.TMJOIN && xaResourceHolderState.getTwoPcOrderingPosition() == Scheduler.ALWAYS_LAST_POSITION &&
    !TransactionManagerServices.getConfiguration().isAllowMultipleLrc()) {
  List<XAResourceHolderState> alwaysLastResources = resources.getByNaturalOrderForPosition(Scheduler.ALWAYS_LAST_POSITION);
resources.add(xaResourceHolderState, xaResourceHolderState.getTwoPcOrderingPosition());

代码示例来源:origin: org.codehaus.btm/btm

if (flag != XAResource.TMJOIN && xaResourceHolderState.getTwoPcOrderingPosition() == Scheduler.ALWAYS_LAST_POSITION &&
    !TransactionManagerServices.getConfiguration().isAllowMultipleLrc()) {
  List<XAResourceHolderState> alwaysLastResources = resources.getByNaturalOrderForPosition(Scheduler.ALWAYS_LAST_POSITION);
resources.add(xaResourceHolderState, xaResourceHolderState.getTwoPcOrderingPosition());

代码示例来源:origin: com.github.marcus-nl.btm/btm

if (flag != XAResource.TMJOIN && xaResourceHolderState.getTwoPcOrderingPosition() == Scheduler.ALWAYS_LAST_POSITION &&
    !TransactionManagerServices.getConfiguration().isAllowMultipleLrc()) {
  List<XAResourceHolderState> alwaysLastResources = resources.getByNaturalOrderForPosition(Scheduler.ALWAYS_LAST_POSITION);
resources.add(xaResourceHolderState, xaResourceHolderState.getTwoPcOrderingPosition());

代码示例来源:origin: org.mule.btm/mule-btm

if (flag != XAResource.TMJOIN && xaResourceHolderState.getTwoPcOrderingPosition() == Scheduler.ALWAYS_LAST_POSITION &&
    !TransactionManagerServices.getConfiguration().isAllowMultipleLrc()) {
  List<XAResourceHolderState> alwaysLastResources = resources.getByNaturalOrderForPosition(Scheduler.ALWAYS_LAST_POSITION);
resources.add(xaResourceHolderState, xaResourceHolderState.getTwoPcOrderingPosition());

代码示例来源:origin: com.github.marcus-nl.btm/btm

public void testReverseRemove() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  resourceScheduler.remove(xarhs0);
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  Iterator<XAResourceHolderState> it = resourceScheduler.reverseIterator();
  assertTrue(it.hasNext());
  assertTrue(xarhs1 == it.next());
  it.remove();
  assertTrue(xarhs0 == it.next());
  it.remove();
}

代码示例来源:origin: bitronix/btm

public void testRemove() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  resourceScheduler.remove(xarhs0);
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  Iterator<XAResourceHolderState> it = resourceScheduler.iterator();
  assertTrue(it.hasNext());
  assertTrue(xarhs0 == it.next());
  it.remove();
  assertTrue(xarhs1 == it.next());
  it.remove();
}

代码示例来源:origin: bitronix/btm

public void testReverseRemove() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  resourceScheduler.remove(xarhs0);
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  Iterator<XAResourceHolderState> it = resourceScheduler.reverseIterator();
  assertTrue(it.hasNext());
  assertTrue(xarhs1 == it.next());
  it.remove();
  assertTrue(xarhs0 == it.next());
  it.remove();
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

public void testRemove() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  resourceScheduler.remove(xarhs0);
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  Iterator<XAResourceHolderState> it = resourceScheduler.iterator();
  assertTrue(it.hasNext());
  assertTrue(xarhs0 == it.next());
  it.remove();
  assertTrue(xarhs1 == it.next());
  it.remove();
}

代码示例来源:origin: bitronix/btm

public void testHasNext() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(10));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  Iterator<XAResourceHolderState> it = resourceScheduler.iterator();
  for (int i=0; i<10 ;i++) {
    assertTrue(it.hasNext());
  }
  it.next();
  for (int i=0; i<10 ;i++) {
    assertTrue(it.hasNext());
  }
  it.next();
  for (int i=0; i<10 ;i++) {
    assertFalse(it.hasNext());
  }
  try {
    it.next();
    fail("expected NoSuchElementException");
  } catch (NoSuchElementException ex) {
    // expected
  }
}

代码示例来源:origin: com.github.marcus-nl.btm/btm

public void testHasNext() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(10));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  Iterator<XAResourceHolderState> it = resourceScheduler.iterator();
  for (int i=0; i<10 ;i++) {
    assertTrue(it.hasNext());
  }
  it.next();
  for (int i=0; i<10 ;i++) {
    assertTrue(it.hasNext());
  }
  it.next();
  for (int i=0; i<10 ;i++) {
    assertFalse(it.hasNext());
  }
  try {
    it.next();
    fail("expected NoSuchElementException");
  } catch (NoSuchElementException ex) {
    // expected
  }
}

代码示例来源:origin: bitronix/btm

public void testReverseIterator() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(1));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
  XAResourceHolderState xarhs2 = new XAResourceHolderState(null, new MockResourceBean(1));
  XAResourceHolderState xarhs3 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());
  assertEquals("a Scheduler with 5 object(s) in 3 position(s)", resourceScheduler.toString());
  Iterator it = resourceScheduler.reverseIterator();
  assertTrue(it.hasNext());
  assertTrue(xarhs4 == it.next());
  assertTrue(xarhs0 == it.next());
  assertTrue(xarhs1 == it.next());
  assertTrue(xarhs2 == it.next());
  assertTrue(xarhs3 == it.next());
  assertFalse(it.hasNext());
}

代码示例来源:origin: bitronix/btm

XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());

代码示例来源:origin: com.github.marcus-nl.btm/btm

public void testReverseIterator() {
  Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
  XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(1));
  XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
  XAResourceHolderState xarhs2 = new XAResourceHolderState(null, new MockResourceBean(1));
  XAResourceHolderState xarhs3 = new XAResourceHolderState(null, new MockResourceBean(0));
  XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
  resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
  resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());
  assertEquals("a Scheduler with 5 object(s) in 3 position(s)", resourceScheduler.toString());
  Iterator it = resourceScheduler.reverseIterator();
  assertTrue(it.hasNext());
  assertTrue(xarhs4 == it.next());
  assertTrue(xarhs0 == it.next());
  assertTrue(xarhs1 == it.next());
  assertTrue(xarhs2 == it.next());
  assertTrue(xarhs3 == it.next());
  assertFalse(it.hasNext());
}

代码示例来源:origin: bitronix/btm

XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());

代码示例来源:origin: com.github.marcus-nl.btm/btm

XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());

代码示例来源:origin: com.github.marcus-nl.btm/btm

XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());

代码示例来源:origin: bitronix/btm

XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());

代码示例来源:origin: com.github.marcus-nl.btm/btm

XAResourceHolderState xarhs4 = new XAResourceHolderState(null, new MockResourceBean(10));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs2, xarhs2.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs3, xarhs3.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs4, xarhs4.getTwoPcOrderingPosition());

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