Examples of waitForActive()


Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.waitForActive()

        MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
        boolean running = mainstemMonitor.check();
        want.bool(running).is(true);

        try {
            mainstemMonitor.waitForActive();
        } catch (InterruptedException e) {
            want.fail();
        }

        ArbitrateFactory.destory(pipelineId);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.waitForActive()

        boolean release = mainstemMonitor.releaseMainstem();// 模拟一次断网,
        want.bool(release).is(true);

        long start = System.currentTimeMillis();
        try {
            mainstemMonitor.waitForActive();
        } catch (InterruptedException e) {
            want.fail();
        }
        want.number(System.currentTimeMillis() - start).isLe(1000L);
        ArbitrateFactory.destory(pipelineId);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.waitForActive()

        switchWarmup(channelId, pipelineId);
        sleep(1000L); // 等manual release被响应

        long start = System.currentTimeMillis();
        try {
            mainstemMonitor.waitForActive();
        } catch (InterruptedException e) {
            want.fail();
        }
        want.number(System.currentTimeMillis() - start).isGe(4000L);
        ArbitrateFactory.destory(pipelineId);
View Full Code Here

Examples of com.alibaba.otter.shared.arbitrate.impl.setl.monitor.MainstemMonitor.waitForActive()

        } else if (isRuning == false) {
            if (!status.isStart()) {
                permitMonitor.waitForChannelPermit(); // 阻塞等待挂起
            }
            MainstemMonitor mainstemMonitor = ArbitrateFactory.getInstance(pipelineId, MainstemMonitor.class);
            mainstemMonitor.waitForActive();// 等待自己成为active

            status = permitMonitor.getChannelPermit(false);
            if (status.isStart()) {
                return;
            } else {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.Table.waitForActive()

                    new AttributeDefinition(HASH_KEY, ScalarAttributeType.N),
                    new AttributeDefinition(RANGE_KEY, ScalarAttributeType.S))
                .withProvisionedThroughput(
                    new ProvisionedThroughput(READ_CAPACITY, WRITE_CAPACITY));
            table = dynamo.createTable(createTableRequest);
            table.waitForActive();
        }
    }

    private static void fillInData(DynamoDB dynamo) {
        Table table = dynamo.getTable(TABLE_NAME);
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.Table.waitForActive()

            return;
        }
        // Table doesn't exist.  Let's create it.
        table = dynamo.createTable(newCreateTableRequest(TABLE_NAME));
        // Wait for the table to become active
        desc = table.waitForActive();
        System.out.println("Table is ready for use! " + desc);
    }

    private CreateTableRequest newCreateTableRequest(String tableName) {
        // primary keys
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.