public class org.apache.zookeeper.test.MultiAsyncTransactionTest extends org.apache.zookeeper.test.ClientBase
{
private org.apache.zookeeper.ZooKeeper zk;
private final java.util.concurrent.atomic.AtomicInteger pendingOps;
public void <init>()
{
org.apache.zookeeper.test.MultiAsyncTransactionTest v;
java.util.concurrent.atomic.AtomicInteger v;
v := @this: org.apache.zookeeper.test.MultiAsyncTransactionTest;
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void <init>()>();
v = new java.util.concurrent.atomic.AtomicInteger;
specialinvoke v.<java.util.concurrent.atomic.AtomicInteger: void <init>(int)>(0);
v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps> = v;
return;
}
public void setUp() throws java.lang.Exception
{
org.apache.zookeeper.test.MultiAsyncTransactionTest v;
org.apache.zookeeper.TestableZooKeeper v;
java.util.concurrent.atomic.AtomicInteger v;
v := @this: org.apache.zookeeper.test.MultiAsyncTransactionTest;
specialinvoke v.<org.apache.zookeeper.test.ClientBase: void setUp()>();
v = virtualinvoke v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: org.apache.zookeeper.TestableZooKeeper createClient()>();
v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: org.apache.zookeeper.ZooKeeper zk> = v;
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: void set(int)>(0);
return;
}
private void finishPendingOps()
{
java.lang.Throwable v;
java.util.concurrent.atomic.AtomicInteger v, v, v;
int v;
org.apache.zookeeper.test.MultiAsyncTransactionTest v;
v := @this: org.apache.zookeeper.test.MultiAsyncTransactionTest;
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int decrementAndGet()>();
if v != 0 goto label;
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
entermonitor v;
label:
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
virtualinvoke v.<java.lang.Object: void notifyAll()>();
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
}
private void waitForPendingOps(int) throws java.lang.Exception
{
java.lang.Throwable v;
java.util.concurrent.atomic.AtomicInteger v, v, v;
int v, v;
org.apache.zookeeper.test.MultiAsyncTransactionTest v;
v := @this: org.apache.zookeeper.test.MultiAsyncTransactionTest;
v := @parameter: int;
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
entermonitor v;
label:
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: int get()>();
if v <= 0 goto label;
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
virtualinvoke v.<java.lang.Object: void wait(long)>(v);
goto label;
label:
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
return;
catch java.lang.Throwable from label to label with label;
}
public void testSequentialNodeCreateInAsyncMulti() throws java.lang.Exception
{
org.apache.zookeeper.CreateMode v, v;
byte[] v, v;
org.apache.zookeeper.ZooKeeper v;
org.apache.zookeeper.test.MultiAsyncTransactionTest$1 v;
java.util.ArrayList v, v, v;
org.apache.zookeeper.test.MultiAsyncTransactionTest v;
java.util.concurrent.atomic.AtomicInteger v;
boolean v;
org.apache.zookeeper.Op v, v;
java.util.List v, v, v, v, v, v, v, v;
org.apache.zookeeper.Op[] v;
org.apache.zookeeper.KeeperException$Code v, v, v, v, v, v, v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.Object v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
v := @this: org.apache.zookeeper.test.MultiAsyncTransactionTest;
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: java.util.concurrent.atomic.AtomicInteger pendingOps>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicInteger: void set(int)>(4);
v = newarray (org.apache.zookeeper.Op)[2];
v = newarray (byte)[0];
v = <org.apache.zookeeper.ZooDefs$Ids: java.util.ArrayList OPEN_ACL_UNSAFE>;
v = <org.apache.zookeeper.CreateMode: org.apache.zookeeper.CreateMode PERSISTENT_SEQUENTIAL>;
v = staticinvoke <org.apache.zookeeper.Op: org.apache.zookeeper.Op create(java.lang.String,byte[],java.util.List,org.apache.zookeeper.CreateMode)>("/node-", v, v, v);
v[0] = v;
v = newarray (byte)[0];
v = <org.apache.zookeeper.ZooDefs$Ids: java.util.ArrayList OPEN_ACL_UNSAFE>;
v = <org.apache.zookeeper.CreateMode: org.apache.zookeeper.CreateMode PERSISTENT>;
v = staticinvoke <org.apache.zookeeper.Op: org.apache.zookeeper.Op create(java.lang.String,byte[],java.util.List,org.apache.zookeeper.CreateMode)>("/dup", v, v, v);
v[1] = v;
v = staticinvoke <java.util.Arrays: java.util.List asList(java.lang.Object[])>(v);
v = 0;
label:
if v >= 4 goto label;
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: org.apache.zookeeper.ZooKeeper zk>;
v = new org.apache.zookeeper.test.MultiAsyncTransactionTest$1;
specialinvoke v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$1: void <init>(org.apache.zookeeper.test.MultiAsyncTransactionTest,java.util.List)>(v, v);
virtualinvoke v.<org.apache.zookeeper.ZooKeeper: void multi(java.lang.Iterable,org.apache.zookeeper.AsyncCallback$MultiCallback,java.lang.Object)>(v, v, null);
v = v + 1;
goto label;
label:
v = <org.apache.zookeeper.test.MultiAsyncTransactionTest: int CONNECTION_TIMEOUT>;
specialinvoke v.<org.apache.zookeeper.test.MultiAsyncTransactionTest: void waitForPendingOps(int)>(v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code OK>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: int rc>;
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code NODEEXISTS>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(1);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: int rc>;
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code NODEEXISTS>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(2);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: int rc>;
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code NODEEXISTS>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(3);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: int rc>;
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = v instanceof org.apache.zookeeper.OpResult$CreateResult;
staticinvoke <org.junit.jupiter.api.Assertions: void assertTrue(boolean)>(v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code OK>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(1);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = virtualinvoke v.<org.apache.zookeeper.OpResult$ErrorResult: int getErr()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code OK>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(2);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = virtualinvoke v.<org.apache.zookeeper.OpResult$ErrorResult: int getErr()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code OK>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(3);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = virtualinvoke v.<org.apache.zookeeper.OpResult$ErrorResult: int getErr()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code NODEEXISTS>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(1);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(1);
v = virtualinvoke v.<org.apache.zookeeper.OpResult$ErrorResult: int getErr()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code NODEEXISTS>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(2);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(1);
v = virtualinvoke v.<org.apache.zookeeper.OpResult$ErrorResult: int getErr()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
v = <org.apache.zookeeper.KeeperException$Code: org.apache.zookeeper.KeeperException$Code NODEEXISTS>;
v = virtualinvoke v.<org.apache.zookeeper.KeeperException$Code: int intValue()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(3);
v = v.<org.apache.zookeeper.test.MultiAsyncTransactionTest$MultiResult: java.util.List results>;
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(1);
v = virtualinvoke v.<org.apache.zookeeper.OpResult$ErrorResult: int getErr()>();
staticinvoke <org.junit.jupiter.api.Assertions: void assertEquals(int,int)>(v, v);
return;
}
}