Package org.apache.jackrabbit.oak.kernel

Examples of org.apache.jackrabbit.oak.kernel.KernelNodeStore


    public Oak(NodeStore store) {
        this.store = checkNotNull(store);
    }

    public Oak(MicroKernel kernel) {
        this(new KernelNodeStore(checkNotNull(kernel)));
    }
View Full Code Here


    @Override
    public Object addingService(ServiceReference reference) {
        Object service = context.getService(reference);
        if (service instanceof MicroKernel) {
            MicroKernel kernel = (MicroKernel) service;
            KernelNodeStore store = new KernelNodeStore(kernel);
            services.put(reference, context.registerService(
                    NodeStore.class.getName(),
                    store,
                    new Properties()));
            registrations.add(registerMBean(whiteboard, CacheStatsMBean.class,
                store.getCacheStats(), CacheStatsMBean.TYPE, store.getCacheStats().getName()));
        }
        return service;
    }
View Full Code Here

    public Oak(NodeStore store) {
        this.store = checkNotNull(store);
    }

    public Oak(MicroKernel kernel) {
        this(new KernelNodeStore(checkNotNull(kernel)));
    }
View Full Code Here

        registerJMXBeans(mk, context);

        NodeStore store;
        if (useMK) {
            KernelNodeStore kns = new KernelNodeStore(mk);
            store = kns;
            observerTracker = new ObserverTracker(kns);
        } else {
            MongoNodeStore mns = mk.getNodeStore();
            store = mns;
View Full Code Here

            try {
                createSourceContent(repository);
            } finally {
                repository.shutdown();
            }
            NodeStore target = new KernelNodeStore(new MicroKernelImpl());
            RepositoryUpgrade.copy(source, target);
            targetRepository = new Jcr(new Oak(target)).createRepository();
        }
    }
View Full Code Here

            @Override
            protected Repository[] internalSetUpCluster(int n) throws Exception {
                Repository[] cluster = new Repository[n];
                MicroKernel kernel = new MicroKernelImpl();
                for (int i = 0; i < cluster.length; i++) {
                    Oak oak = new Oak(new KernelNodeStore(kernel, cacheSize));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
        };
View Full Code Here

                Repository[] cluster = new Repository[n];
                kernels = new MicroKernelImpl[cluster.length];
                for (int i = 0; i < cluster.length; i++) {
                    kernels[i] = new MicroKernelImpl(
                            new File(base, unique).getPath());
                    Oak oak = new Oak(new KernelNodeStore(kernels[i], cacheSize));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
View Full Code Here

                    MongoConnection mongo =
                            new MongoConnection(host, port, dbName);
                    kernels[i] = new MongoMK.Builder().
                            setMongoDB(mongo.getDB()).
                            setClusterId(i).setLogging(false).open();
                    Oak oak = new Oak(new KernelNodeStore(kernels[i], cacheSize));
                    cluster[i] = new Jcr(oak).createRepository();
                }
                return cluster;
            }
            @Override
View Full Code Here

    private KernelNodeStore store;

    @Before
    public void setup() {
        MicroKernel mk = new MicroKernelImpl();
        store = new KernelNodeStore(mk);
        // initialize node types & index definitions
        OakInitializer.initialize(store, new InitialContent(),
                CompositeIndexEditorProvider
                        .compose(new ArrayList<IndexEditorProvider>()));
    }
View Full Code Here

    private ContentRepository repository;

    @Before
    public void setUp() throws Exception {
        MicroKernel microKernel = new MicroKernelImpl();
        store = new KernelNodeStore(microKernel);
        provider = new TestUtils();
        server = provider.getSolrServer();
        configuration = provider.getConfiguration();
        hook = new EditorHook(new IndexUpdateProvider(
                new SolrIndexEditorProvider(provider, provider)));
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.kernel.KernelNodeStore

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.