Package org.apache.jackrabbit.oak.plugins.document

Examples of org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore


            try {
                if (dst.startsWith("mongodb://")) {
                    MongoClientURI uri = new MongoClientURI(dst);
                    MongoClient client = new MongoClient(uri);
                    try {
                        DocumentNodeStore target = new DocumentMK.Builder()
                            .setMongoDB(client.getDB(uri.getDatabase()))
                            .getNodeStore();
                        try {
                            RepositoryUpgrade upgrade =
                                    new RepositoryUpgrade(source, target);
                            upgrade.setCopyBinariesByReference(
                                    options.has("datastore"));
                            upgrade.copy(null);
                        } finally {
                            target.dispose();
                        }
                    } finally {
                        client.close();
                    }
                } else {
View Full Code Here


        super(settings);
    }

    @Override
    protected Repository createRepository(MongoConnection connection) {
        DocumentNodeStore store = new DocumentMK.Builder().setClusterId(1).
                memoryCacheSize(64 * 1024 * 1024).
                setMongoDB(connection.getDB()).getNodeStore();
        QueryEngineSettings qs = new QueryEngineSettings();
        qs.setFullTextComparisonWithoutIndex(true);
        return new Jcr(store).with(qs).createRepository();
View Full Code Here

            if (uri.getDatabase() == null) {
                System.err.println("Database missing in MongoDB URI: " + uri.getURI());
                System.exit(1);
            }
            MongoConnection mongo = new MongoConnection(uri.getURI());
            DocumentNodeStore store = new DocumentMK.Builder().
                    setMongoDB(mongo.getDB()).
                    setClusterId(clusterId.value(options)).getNodeStore();
            fixture = new MongoFixture(store);
        } else {
            fixture = new SegmentFixture(new FileStore(
View Full Code Here

        }
        // Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownHook(connection)));
    }

    protected Repository createRepository(String url, String username, String password) {
        DocumentNodeStore m = new DocumentMK.Builder()
                .setClusterId(1)
                .memoryCacheSize(64 * 1024 * 1024)
                .setRDBConnection(RDBDataSourceFactory.forJdbcUrl(url, username, password))
                .getNodeStore();
        QueryEngineSettings qs = new QueryEngineSettings();
View Full Code Here

    }

    @Override
    public Repository getRepository() {
        final DB db = mongoClient.getDB(databaseName);
        final NodeStore store = new DocumentNodeStore(new DocumentMK.Builder().setMongoDB(db));
        return new Jcr(store).createRepository();
    }
View Full Code Here

        }
        // Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownHook(connection)));
    }

    protected Repository createRepository(String url, String username, String password) {
        DocumentNodeStore m = new DocumentMK.Builder()
                .setClusterId(1)
                .memoryCacheSize(64 * 1024 * 1024)
                .setRDBConnection(url, username, password)
                .getNodeStore();
        return new Jcr(m).createRepository();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore

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.