Package org.lilyproject.repository.model.api

Examples of org.lilyproject.repository.model.api.RepositoryModel.waitUntilRepositoryInState()


    public void createRepository(String repositoryName) {
        try {
            RepositoryModel model = new RepositoryModelImpl(getZooKeeper());
            if (!model.repositoryExistsAndActive(repositoryName)) {
                model.create(repositoryName);
                model.waitUntilRepositoryInState(repositoryName, RepositoryDefinition.RepositoryLifecycleState.ACTIVE,
                        100000);
            }
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
View Full Code Here


    @Test
    public void testTwoRepositoriesSameTableSameId() throws Exception {
        RepositoryModel repositoryModel = repoSetup.getRepositoryModel();
        repositoryModel.create("company1");
        repositoryModel.create("company2");
        assertTrue(repositoryModel.waitUntilRepositoryInState("company1", RepositoryDefinition.RepositoryLifecycleState.ACTIVE, 60000L));
        assertTrue(repositoryModel.waitUntilRepositoryInState("company2", RepositoryDefinition.RepositoryLifecycleState.ACTIVE, 60000L));

        TypeManager typeMgr = repositoryManager.getDefaultRepository().getTypeManager();
        FieldType fieldType1 = typeMgr.createFieldType("STRING", new QName("test", "field1"), Scope.NON_VERSIONED);
        RecordType recordType1 = typeMgr.recordTypeBuilder()
View Full Code Here

    public void testTwoRepositoriesSameTableSameId() throws Exception {
        RepositoryModel repositoryModel = repoSetup.getRepositoryModel();
        repositoryModel.create("company1");
        repositoryModel.create("company2");
        assertTrue(repositoryModel.waitUntilRepositoryInState("company1", RepositoryDefinition.RepositoryLifecycleState.ACTIVE, 60000L));
        assertTrue(repositoryModel.waitUntilRepositoryInState("company2", RepositoryDefinition.RepositoryLifecycleState.ACTIVE, 60000L));

        TypeManager typeMgr = repositoryManager.getDefaultRepository().getTypeManager();
        FieldType fieldType1 = typeMgr.createFieldType("STRING", new QName("test", "field1"), Scope.NON_VERSIONED);
        RecordType recordType1 = typeMgr.recordTypeBuilder()
                .name(new QName("test", "rt1"))
View Full Code Here

    @Test
    public void testBasicTableManagement() throws Exception {
        String repositoryName = "tablemgmttest";
        RepositoryModel repositoryModel = repoSetup.getRepositoryModel();
        repositoryModel.create(repositoryName);
        assertTrue(repositoryModel.waitUntilRepositoryInState(repositoryName, RepositoryDefinition.RepositoryLifecycleState.ACTIVE, 60000L));

        LRepository repository = repositoryManager.getRepository(repositoryName);
        TableManager tableManager = repository.getTableManager();

        List<RepositoryTable> tables = tableManager.getTables();
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.