Package org.apache.jackrabbit.oak.plugins.segment

Examples of org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit


    private NodeStore store;

    @Before
    public void setUp() throws Exception {
        store = new SegmentNodeStore();
        NodeBuilder builder = store.getRoot().builder();
        builder.setProperty("a", 1)
               .setProperty("b", 2)
               .setProperty("c", 3);
View Full Code Here


    protected EditorHook hook;
    private ContentRepository repository;

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

        private final SegmentStore segmentStore;
        private final SegmentNodeStore nodeStore;

        private SegmentFixture(SegmentStore segmentStore) {
            this.segmentStore = segmentStore;
            this.nodeStore = new SegmentNodeStore(segmentStore);
        }
View Full Code Here

    @Test
    public void luceneWithFSDirectory() throws Exception{
        //Issue is not reproducible with MemoryNodeBuilder and
        //MemoryNodeState as they cannot determine change in childNode without
        //entering
        NodeStore nodeStore = new SegmentNodeStore();
        final IndexTracker tracker = new IndexTracker();
        ((Observable)nodeStore).addObserver(new Observer() {
            @Override
            public void contentChanged(@Nonnull NodeState root, @Nullable CommitInfo info) {
                tracker.update(root);
            }
        });
        builder = nodeStore.getRoot().builder();
        NodeBuilder index = builder.child(INDEX_DEFINITIONS_NAME);
        NodeBuilder idxb = newLuceneIndexDefinition(index, "lucene",
                ImmutableSet.of(TYPENAME_STRING));
        idxb.setProperty(PERSISTENCE_NAME, PERSISTENCE_FILE);
        idxb.setProperty(PERSISTENCE_PATH, getIndexDir());

        nodeStore.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);

        builder = nodeStore.getRoot().builder();
        builder.setProperty("foo", "bar");

        NodeState indexed = nodeStore.merge(builder, HOOK, CommitInfo.EMPTY);

        assertQuery(tracker, indexed, "foo", "bar");

        builder = nodeStore.getRoot().builder();
        builder.setProperty("foo2", "bar2");
        indexed = nodeStore.merge(builder, HOOK, CommitInfo.EMPTY);

        assertQuery(tracker, indexed, "foo2", "bar2");
    }
View Full Code Here

    }

    @Test
    public void testFailover() throws Exception {

        NodeStore store = new SegmentNodeStore(storeS);
        final StandbyServer server = new StandbyServer(port, storeS);
        server.start();
        addTestContent(store, "server");

        StandbyClient cl = new StandbyClient("127.0.0.1", port, storeC);
View Full Code Here

        closeServerAndTwoClients();
    }

    @Test
    public void testMultipleClients() throws Exception {
        NodeStore store = new SegmentNodeStore(storeS);
        final StandbyServer server = new StandbyServer(port, storeS);
        server.start();
        SegmentTestUtils.addTestContent(store, "server");
        storeS.flush()// this speeds up the test a little bit...
View Full Code Here

            this.store = store;
        }

        @Override
        public NodeStore createNodeStore() {
            return new SegmentNodeStore(store == null ? new MemoryStore() : store);
        }
View Full Code Here

    }

    @Test
    public void testFailoverSecure() throws Exception {

        NodeStore store = new SegmentNodeStore(storeS);
        final StandbyServer server = new StandbyServer(port, storeS, true);
        server.start();
        addTestContent(store, "server");
        storeS.flush()// this speeds up the test a little bit...
View Full Code Here

    }

    @Test
    public void testFailoverSecureServerPlainClient() throws Exception {

        NodeStore store = new SegmentNodeStore(storeS);
        final StandbyServer server = new StandbyServer(port, storeS, true);
        server.start();
        addTestContent(store, "server");
        storeS.flush()// this speeds up the test a little bit...
View Full Code Here

    }

    @Test
    public void testFailoverPlainServerSecureClient() throws Exception {

        NodeStore store = new SegmentNodeStore(storeS);
        final StandbyServer server = new StandbyServer(port, storeS);
        server.start();
        addTestContent(store, "server");
        storeS.flush()// this speeds up the test a little bit...
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore$Commit

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.