Package org.apache.jackrabbit.oak.plugins.segment

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit


    private SlingRepository slingRepository;

    @Before
    public void setUp() throws Exception {
        executor = Executors.newSingleThreadExecutor();
        final Oak oak = new Oak(new SegmentNodeStore());
        this.whiteboard = oak.getWhiteboard();
        final Repository repository = new Jcr(oak).createRepository();
        this.slingRepository = new RepositoryWrapper(repository);

        session = this.slingRepository.loginAdministrative(null);
View Full Code Here


                Repository[] cluster = new Repository[n];
                stores = new SegmentStore[cluster.length];
                mongo = new MongoClient(host, port);
                for (int i = 0; i < cluster.length; i++) {
                    stores[i] = new MongoStore(mongo.getDB(unique), cacheSizeMB);
                    Oak oak = new Oak(new SegmentNodeStore(stores[i]));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
View Full Code Here

                stores = new FileStore[cluster.length];
                for (int i = 0; i < cluster.length; i++) {
                    stores[i] = new FileStore(
                            new File(base, unique),
                            maxFileSizeMB, cacheSizeMB, memoryMapping);
                    Oak oak = new Oak(new SegmentNodeStore(stores[i]));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
View Full Code Here

        Session session = null;
        try {
            File directory =
                    new File("target", "tarmk-" + System.currentTimeMillis());
            this.store = new FileStore(directory, 1024 * 1024, false);
            Jcr jcr = new Jcr(new Oak(new SegmentNodeStore(store)));
            this.repository = jcr.createRepository();

            session = getRepository().login(superuser);
            TestContentLoader loader = new TestContentLoader();
            loader.loadTestContent(session);
View Full Code Here

        super(settings);

        Session session = null;
        try {
            this.connection = new Mongo(HOST, PORT);
            Jcr jcr = new Jcr(new Oak(new SegmentNodeStore(
                    new MongoStore(connection.getDB(DB), 4 * 1024 * 1024))));
            this.repository = jcr.createRepository();

            session = getRepository().login(superuser);
            TestContentLoader loader = new TestContentLoader();
View Full Code Here

                Repository[] cluster = new Repository[n];
                stores = new SegmentStore[cluster.length];
                mongo = new Mongo(host, port);
                for (int i = 0; i < cluster.length; i++) {
                    stores[i] = new MongoStore(mongo.getDB(unique), cacheSize);
                    Oak oak = new Oak(new SegmentNodeStore(stores[i]));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
View Full Code Here

                Repository[] cluster = new Repository[n];
                stores = new FileStore[cluster.length];
                for (int i = 0; i < cluster.length; i++) {
                    stores[i] = new FileStore(
                            new File(base, unique), maxFileSize, memoryMapping);
                    Oak oak = new Oak(new SegmentNodeStore(stores[i]));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
View Full Code Here

            }
        } else if ("backup".equals(command)) {
            if (args.length == 2) {
                FileStore store = new FileStore(new File(args[0]), 256, false);
                FileStoreBackup.backup(
                        new SegmentNodeStore(store), new File(args[1]));
                store.close();
            } else {
                System.err.println("usage: backup <repository> <backup>");
                System.exit(1);
            }
View Full Code Here

        RepositoryContext source = RepositoryContext.create(
                RepositoryConfig.create(new File(olddir)));
        try {
            FileStore store = new FileStore(new File(newdir), 256, true);
            try {
                NodeStore target = new SegmentNodeStore(store);
                new RepositoryUpgrade(source, target).copy();
            } finally {
                store.close();
            }
        } finally {
View Full Code Here

        super(settings);

        Session session = null;
        try {
            this.connection = new MongoClient(HOST, PORT);
            Jcr jcr = new Jcr(new Oak(new SegmentNodeStore(
                    new MongoStore(connection.getDB(DB), 4))));
            this.repository = jcr.createRepository();

            session = getRepository().login(superuser);
            TestContentLoader loader = new TestContentLoader();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit

Copyright © 2018 www.massapicom. 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.