Examples of MemoryStore


Examples of br.net.woodstock.rockframework.security.store.impl.MemoryStore

  }

  public SignatureRequest(final PrivateKeyHolder privateKeyHolder) {
    super();
    Alias alias = new Alias(SignatureRequest.DEFAULT_ALIAS_NAME);
    this.store = new MemoryStore();
    this.aliases = new Alias[] { alias };
    this.store.add(new PrivateKeyEntry(alias, privateKeyHolder.getPrivateKey(), privateKeyHolder.getChain()));
  }
View Full Code Here

Examples of com.goodow.realtime.store.impl.MemoryStore

  @Override
  public void start() {
    initialize();
    VertxPlatform.register(vertx);

    Store store = new MemoryStore();
    store.load("docId", new Handler<Document>() {
      @Override
      public void handle(Document doc) {
        mod = doc.getModel();
        str = mod.createString(null);
View Full Code Here

Examples of net.sf.ehcache.store.MemoryStore

    public static Store create( Ehcache cache, String diskStorePath, Pool<PoolableStore> onHeapPool,
                                Pool<PoolableStore> onDiskPool )
    {

        CacheConfiguration config = cache.getCacheConfiguration();
        MemoryStore memoryStore = createMemoryStore( cache, onHeapPool );
        DirectMemoryStore offHeapStore = createOffHeapStore( cache, true );
        DiskStore diskStore = null; //need to implement disk backing to store.
        Store store = null;
        if ( diskStore == null )
        {
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

    public SegmentNodeStore(SegmentStore store) {
        this(store, "root");
    }

    public SegmentNodeStore() {
        this(new MemoryStore(), "root");
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

public class MergeTest {

    @Test
    public void testSequentialMerge() throws CommitFailedException {
        NodeStore store = new SegmentNodeStore(new MemoryStore());

        assertFalse(store.getRoot().hasProperty("foo"));
        assertFalse(store.getRoot().hasProperty("bar"));

        NodeBuilder a = store.getRoot().builder();
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

        assertTrue(store.getRoot().hasProperty("bar"));
    }

    @Test
    public void testOptimisticMerge() throws CommitFailedException {
        NodeStore store = new SegmentNodeStore(new MemoryStore());

        NodeBuilder a = store.getRoot().builder();
        a.setProperty("foo", "abc");

        NodeBuilder b = store.getRoot().builder();
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

        assertTrue(store.getRoot().hasProperty("bar"));
    }

    @Test
    public void testPessimisticMerge() throws Exception {
        final SegmentNodeStore store = new SegmentNodeStore(new MemoryStore());
        final Semaphore semaphore = new Semaphore(0);
        final AtomicBoolean running = new AtomicBoolean(true);

        Thread background = new Thread() {
            @Override
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

        assertEquals(136, getAmortizedSize(builder));
    }

    @Test
    public void testFlatNodeUpdate() {
        SegmentStore store = new MemoryStore();
        SegmentWriter writer = store.getWriter();

        NodeBuilder builder = EMPTY_NODE.builder();
        for (int i = 0; i < 1000; i++) {
            builder.child("child" + i);
        }

        SegmentNodeState state = writer.writeNode(builder.getNodeState());
        Segment segment = store.readSegment(state.getRecordId().getSegmentId());
        assertEquals(26784, segment.size());

        writer.flush(); // force flushing of the previous segment

        builder = state.builder();
        builder.child("child1000");
        state = writer.writeNode(builder.getNodeState());
        segment = store.readSegment(state.getRecordId().getSegmentId());
        assertEquals(252, segment.size());
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

        segment = store.readSegment(state.getRecordId().getSegmentId());
        assertEquals(252, segment.size());
    }

    private int getSize(NodeBuilder builder) {
        SegmentStore store = new MemoryStore();
        SegmentWriter writer = store.getWriter();
        RecordId id = writer.writeNode(builder.getNodeState()).getRecordId();
        Segment segment = store.readSegment(id.getSegmentId());
        return segment.size();
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.segment.memory.MemoryStore

        Segment segment = store.readSegment(id.getSegmentId());
        return segment.size();
    }

    private int getAmortizedSize(NodeBuilder builder) {
        SegmentStore store = new MemoryStore();
        SegmentWriter writer = store.getWriter();
        NodeState state = builder.getNodeState();
        RecordId id = writer.writeNode(state).getRecordId();
        int base = store.readSegment(id.getSegmentId()).size();

        store = new MemoryStore(); // avoid cross-segment caching
        writer = store.getWriter();
        writer.writeNode(state);
        id = writer.writeNode(state).getRecordId();
        Segment segment = store.readSegment(id.getSegmentId());
        return segment.size() - base;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.