return; COWNodeStore store = new COWNodeStore(nodeStoreProvider.getNodeStore());
return; COWNodeStore store = new COWNodeStore(nodeStoreProvider.getNodeStore());
return; COWNodeStore store = new COWNodeStore(nodeStoreProvider.getNodeStore());
@Activate private void activate(BundleContext context, Configuration config){ bundleContext = context; whiteboard = new OsgiWhiteboard(context); String[] includedPaths = config.includedPaths(); //TODO Support for exclude is not possible as once a NodeState is loaded from secondary //store it assumes that complete subtree is in same store. With exclude it would need to //check for each child access and route to primary pathFilter = new PathFilter(asList(includedPaths), Collections.<String>emptyList()); SecondaryStoreBuilder builder = new SecondaryStoreBuilder(secondaryStoreProvider.getNodeStore()) .differ(differ) .metaPropNames(DocumentNodeStore.META_PROP_NAMES) .statisticsProvider(statisticsProvider) .pathFilter(pathFilter); SecondaryStoreCache cache = builder.buildCache(); SecondaryStoreObserver observer = builder.buildObserver(cache); registerObserver(observer, config); regs.add(bundleContext.registerService(DocumentNodeStateCache.class.getName(), cache, null)); //TODO Need to see OSGi dynamics. Its possible that DocumentNodeStore works after the cache //gets deregistered but the SegmentNodeState instances might still be in use and that would cause //failure }
@Activate private void activate(BundleContext context, Configuration config){ bundleContext = context; whiteboard = new OsgiWhiteboard(context); String[] includedPaths = config.includedPaths(); //TODO Support for exclude is not possible as once a NodeState is loaded from secondary //store it assumes that complete subtree is in same store. With exclude it would need to //check for each child access and route to primary pathFilter = new PathFilter(asList(includedPaths), Collections.<String>emptyList()); SecondaryStoreBuilder builder = new SecondaryStoreBuilder(secondaryStoreProvider.getNodeStore()) .differ(differ) .metaPropNames(DocumentNodeStore.META_PROP_NAMES) .statisticsProvider(statisticsProvider) .pathFilter(pathFilter); SecondaryStoreCache cache = builder.buildCache(); SecondaryStoreObserver observer = builder.buildObserver(cache); registerObserver(observer, config); regs.add(bundleContext.registerService(DocumentNodeStateCache.class.getName(), cache, null)); //TODO Need to see OSGi dynamics. Its possible that DocumentNodeStore works after the cache //gets deregistered but the SegmentNodeState instances might still be in use and that would cause //failure }
CompositeNodeStore.Builder builder = new CompositeNodeStore.Builder(mountInfoProvider, globalNs.getNodeStoreProvider().getNodeStore()); nodeStoresInUse.add(globalNs.getNodeStoreProvider()); builder.addMount(mountName, ns.getNodeStoreProvider().getNodeStore()); LOG.info("Mounting {} as {}", ns.getDescription(), mountName); nodeStoresInUse.add(ns.getNodeStoreProvider()); new InitialContentMigrator(globalNs.nodeStore.getNodeStore(), ns.getNodeStoreProvider().getNodeStore(), mountInfoProvider.getMountByName(seedMount)).migrate();