本文整理汇总了Java中org.apache.zookeeper.test.AsyncOps.StringCB类的典型用法代码示例。如果您正苦于以下问题:Java StringCB类的具体用法?Java StringCB怎么用?Java StringCB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StringCB类属于org.apache.zookeeper.test.AsyncOps包,在下文中一共展示了StringCB类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testAsyncCreateThree
import org.apache.zookeeper.test.AsyncOps.StringCB; //导入依赖的package包/类
@Test
public void testAsyncCreateThree() {
CountDownLatch latch = new CountDownLatch(3);
StringCB op1 = new StringCB(zk, latch);
op1.setPath("/op1");
StringCB op2 = new StringCB(zk, latch);
op2.setPath("/op2");
StringCB op3 = new StringCB(zk, latch);
op3.setPath("/op3");
op1.create();
op2.create();
op3.create();
op1.verify();
op2.verify();
op3.verify();
}
示例2: testAsyncCreate
import org.apache.zookeeper.test.AsyncOps.StringCB; //导入依赖的package包/类
@Test
public void testAsyncCreate() {
new StringCB(zk).verifyCreate();
}
示例3: testAsyncCreateFailure_NodeExists
import org.apache.zookeeper.test.AsyncOps.StringCB; //导入依赖的package包/类
@Test
public void testAsyncCreateFailure_NodeExists() {
new StringCB(zk).verifyCreateFailure_NodeExists();
}
示例4: testAsyncCreateFailure_NoNode
import org.apache.zookeeper.test.AsyncOps.StringCB; //导入依赖的package包/类
@Test
public void testAsyncCreateFailure_NoNode() {
new StringCB(zk).verifyCreateFailure_NoNode();
}
示例5: testAsyncCreateFailure_NoChildForEphemeral
import org.apache.zookeeper.test.AsyncOps.StringCB; //导入依赖的package包/类
@Test
public void testAsyncCreateFailure_NoChildForEphemeral() {
new StringCB(zk).verifyCreateFailure_NoChildForEphemeral();
}