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

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


                        store.getDocChildrenCacheStats().getName())
        );

        DocumentStore ds = store.getDocumentStore();
        if (ds instanceof MongoDocumentStore) {
            MongoDocumentStore mds = (MongoDocumentStore) ds;
            registrations.add(
                    registerMBean(wb,
                            CacheStatsMBean.class,
                            mds.getCacheStats(),
                            CacheStatsMBean.TYPE,
                            mds.getCacheStats().getName())
            );
        }

        //TODO Register JMX bean for Off Heap Cache stats
    }
View Full Code Here


         * @param db the MongoDB connection
         * @return this
         */
        public Builder setMongoDB(DB db) {
            if (db != null) {
                this.documentStore = new MongoDocumentStore(db, this);
                this.blobStore = new MongoBlobStore(db);
            }
            return this;
        }
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

        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

         * @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

         * @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

                        store.getDocChildrenCacheStats().getName())
        );

        DocumentStore ds = store.getDocumentStore();
        if (ds instanceof MongoDocumentStore) {
            MongoDocumentStore mds = (MongoDocumentStore) ds;
            registrations.add(
                    registerMBean(wb,
                            CacheStatsMBean.class,
                            mds.getCacheStats(),
                            CacheStatsMBean.TYPE,
                            mds.getCacheStats().getName())
            );
        }

        //TODO Register JMX bean for Off Heap Cache stats
    }
View Full Code Here

         * @param db the MongoDB connection
         * @return this
         */
        public Builder setMongoDB(DB db) {
            if (db != null) {
                this.documentStore = new MongoDocumentStore(db, this);
                this.blobStore = new MongoBlobStore(db);
            }
            return this;
        }
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) {
                    this.blobStore = new MongoBlobStore(db, blobCacheSizeMB * 1024 * 1024);
                }
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.