use of org.apache.jackrabbit.oak.segment.memory.MemoryStore in project jackrabbit-oak by apache.
the class MergeTest method testSequentialMergeWithRebase.
@Test
public void testSequentialMergeWithRebase() throws CommitFailedException, IOException {
NodeStore store = SegmentNodeStoreBuilders.builder(new MemoryStore()).build();
NodeBuilder a = store.getRoot().builder();
a.setProperty("foo", "abc");
NodeBuilder b = store.getRoot().builder();
b.setProperty("bar", "xyz");
assertFalse(store.getRoot().hasProperty("foo"));
assertFalse(store.getRoot().hasProperty("bar"));
store.merge(a, EmptyHook.INSTANCE, CommitInfo.EMPTY);
assertTrue(store.getRoot().hasProperty("foo"));
assertFalse(store.getRoot().hasProperty("bar"));
store.merge(b, EmptyHook.INSTANCE, CommitInfo.EMPTY);
assertTrue(store.getRoot().hasProperty("foo"));
assertTrue(store.getRoot().hasProperty("bar"));
}
use of org.apache.jackrabbit.oak.segment.memory.MemoryStore in project jackrabbit-oak by apache.
the class OakSolrNodeStateConfigurationTest method setUp.
@Before
public void setUp() throws Exception {
store = SegmentNodeStoreBuilders.builder(new MemoryStore()).build();
NodeBuilder builder = store.getRoot().builder();
builder.setProperty("a", 1).setProperty("b", 2).setProperty("c", 3);
builder.setChildNode("x");
builder.setChildNode("y");
builder.setChildNode("z");
builder.setChildNode("oak:index").setChildNode("solrIdx").setProperty("type", "solr").setProperty("rows", "100");
store.merge(builder, EmptyHook.INSTANCE, CommitInfo.EMPTY);
}
use of org.apache.jackrabbit.oak.segment.memory.MemoryStore in project jackrabbit-oak by apache.
the class NodeStateTestUtils method createNodeStoreWithContent.
public static NodeStore createNodeStoreWithContent(String... paths) throws CommitFailedException, IOException {
final SegmentNodeStore store = SegmentNodeStoreBuilders.builder(new MemoryStore()).build();
final NodeBuilder builder = store.getRoot().builder();
for (String path : paths) {
create(builder, path);
}
commit(store, builder);
return store;
}
use of org.apache.jackrabbit.oak.segment.memory.MemoryStore in project jackrabbit-oak by apache.
the class CompositeSegmentStoreFixture method createNodeStore.
@Override
public NodeStore createNodeStore() {
try {
MountInfoProvider mip = Mounts.newBuilder().readOnlyMount("temp", MOUNT_PATH).build();
NodeStore globalStore = SegmentNodeStoreBuilders.builder(new MemoryStore()).build();
NodeStore tempMount = SegmentNodeStoreBuilders.builder(new MemoryStore()).build();
return new CompositeNodeStore.Builder(mip, globalStore).addMount("temp", tempMount).build();
} catch (IOException e) {
throw new RuntimeException();
}
}
use of org.apache.jackrabbit.oak.segment.memory.MemoryStore in project jackrabbit-oak by apache.
the class SegmentParserTest method setup.
@Before
public void setup() throws IOException {
store = new MemoryStore();
writer = segmentWriterBuilder("").build(store);
}
Aggregations