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

Examples of org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore


         * @return this
         */
        public Builder setMongoDB(DB db, int changesSizeMB) {
            if (db != null) {
                if (this.documentStore == null) {
                    this.documentStore = new MongoDocumentStore(db, this);
                }

                if (this.blobStore == null) {
                    this.blobStore = new MongoBlobStore(db);
                }
View Full Code Here


        public DocumentStore createDocumentStore() {
            try {
                MongoConnection connection = new MongoConnection(uri);
                DB db = connection.getDB();
                MongoUtils.dropCollections(db);
                return new MongoDocumentStore(db, new DocumentMK.Builder());
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

    private static final boolean MONGO_DB = false;
    private static final int NODE_COUNT = 10;

    DocumentStore openDocumentStore() {
        if (MONGO_DB) {
            return new MongoDocumentStore(MongoUtils.getConnection().getDB(), new DocumentMK.Builder());
        }
        return new MemoryDocumentStore();
    }
View Full Code Here

            DocumentNodeStore dns = (DocumentNodeStore) store;
            if (!(dns.getDocumentStore() instanceof MongoDocumentStore)) {
                System.err.println("Recovery only available for MongoDocumentStore");
                System.exit(1);
            }
            MongoDocumentStore docStore = (MongoDocumentStore) dns.getDocumentStore();
            LastRevRecoveryAgent agent = new LastRevRecoveryAgent(dns);
            MongoMissingLastRevSeeker seeker = new MongoMissingLastRevSeeker(docStore);
            CloseableIterable<NodeDocument> docs = seeker.getCandidates(0);
            closer.register(docs);
            boolean dryRun = Arrays.asList(args).contains("dryRun");
View Full Code Here

        public DocumentStore createDocumentStore(int clusterId) {
            try {
                MongoConnection connection = new MongoConnection(uri);
                DB db = connection.getDB();
                MongoUtils.dropCollections(db);
                return new MongoDocumentStore(db, new DocumentMK.Builder().setClusterId(clusterId));
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

         * @return this
         */
        public Builder setMongoDB(DB db, int changesSizeMB, int blobCacheSizeMB) {
            if (db != null) {
                if (this.documentStore == null) {
                    this.documentStore = new MongoDocumentStore(db, this);
                }

                if (this.blobStore == null) {
                    GarbageCollectableBlobStore s = new MongoBlobStore(db, blobCacheSizeMB * 1024 * 1024L);
                    PersistentCache p = getPersistentCache();
View Full Code Here

         * @return this
         */
        public Builder setMongoDB(DB db) {
            if (db != null) {
                if (this.documentStore == null) {
                    this.documentStore = new MongoDocumentStore(db, this);
                }

                if (this.blobStore == null) {
                    this.blobStore = new MongoBlobStore(db);
                }
View Full Code Here

         * @return this
         */
        public Builder setMongoDB(DB db) {
            if (db != null) {
                if(this.documentStore == null){
                    this.documentStore = new MongoDocumentStore(db, this);
                }

                if(this.blobStore == null){
                    this.blobStore = new MongoBlobStore(db);
                }
View Full Code Here

    private static final boolean MONGO_DB = false;
    private static final int NODE_COUNT = 10;

    DocumentStore openDocumentStore() {
        if (MONGO_DB) {
            return new MongoDocumentStore(MongoUtils.getConnection().getDB(), new DocumentMK.Builder());
        }
        return new MemoryDocumentStore();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.document.mongo.MongoDocumentStore

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.