Examples of writeLocal()


Examples of org.apache.ace.repository.ext.CachedRepository.writeLocal()

        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from checkout: " + new String(inputBytes);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));

        m_cachedRepository.commit();

        m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(2);
View Full Code Here

Examples of org.apache.ace.repository.ext.CachedRepository.writeLocal()

        m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(1);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));
        input = m_cachedRepository.getLocal(false);
        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, newTestContent) : "We got something different than 'new' from getLocal: " + new String(inputBytes);

        m_cachedRepository.revert();
View Full Code Here

Examples of org.apache.ace.repository.ext.CachedRepository.writeLocal()

        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from checkout: " + new String(inputBytes);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));

        m_cachedRepository.commit();

        m_cachedRepository = new CachedRepositoryImpl(null, m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(2);
View Full Code Here

Examples of org.apache.ace.repository.ext.CachedRepository.writeLocal()

        m_cachedRepository = new CachedRepositoryImpl(null, m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(1);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));
        input = m_cachedRepository.getLocal(false);
        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, newTestContent) : "We got something different than 'new' from getLocal: " + new String(inputBytes);

        m_cachedRepository.revert();
View Full Code Here

Examples of org.apache.ace.repository.ext.impl.CachedRepositoryImpl.writeLocal()

        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from checkout: " + new String(inputBytes);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));

        m_cachedRepository.commit();

        m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(2);
View Full Code Here

Examples of org.apache.ace.repository.ext.impl.CachedRepositoryImpl.writeLocal()

        m_cachedRepository = new CachedRepositoryImpl(m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(1);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));
        input = m_cachedRepository.getLocal(false);
        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, newTestContent) : "We got something different than 'new' from getLocal: " + new String(inputBytes);

        m_cachedRepository.revert();
View Full Code Here

Examples of org.apache.ace.repository.ext.impl.CachedRepositoryImpl.writeLocal()

        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, testContent) : "We got something different than 'initial' from checkout: " + new String(inputBytes);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));

        m_cachedRepository.commit();

        m_cachedRepository = new CachedRepositoryImpl(null, m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(2);
View Full Code Here

Examples of org.apache.ace.repository.ext.impl.CachedRepositoryImpl.writeLocal()

        m_cachedRepository = new CachedRepositoryImpl(null, m_repository, m_backupRepository, 0);
        input = m_cachedRepository.checkout(1);

        byte[] newTestContent = new byte[] {'n', 'e', 'w'};

        m_cachedRepository.writeLocal(new ByteArrayInputStream(newTestContent));
        input = m_cachedRepository.getLocal(false);
        byte[] inputBytes = AdminTestUtil.copy(input);
        assert AdminTestUtil.byteArraysEqual(inputBytes, newTestContent) : "We got something different than 'new' from getLocal: " + new String(inputBytes);

        m_cachedRepository.revert();
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.ContextState.writeLocal()

        left.writeLocal(CounterId.getLocalId(), 7L, 3L);

        ContextState right = ContextState.allocate(0, 1, 2, allocator);
        right.writeRemote(CounterId.fromInt(4), 4L, 4L);
        right.writeRemote(CounterId.fromInt(5), 5L, 5L);
        right.writeLocal(CounterId.getLocalId(), 2L, 9L);

        ByteBuffer merged = cc.merge(left.context, right.context, allocator);
        int hd = 4;

        assertEquals(hd + 5 * stepLength, merged.remaining());
View Full Code Here

Examples of org.apache.cassandra.db.context.CounterContext.ContextState.writeLocal()

        left = ContextState.allocate(2, 0, 0, allocator);
        left.writeGlobal(CounterId.fromInt(1), 1L, 1L);
        left.writeGlobal(CounterId.fromInt(2), 1L, 1L);

        right = ContextState.allocate(0, 1, 1, allocator);
        right.writeLocal(CounterId.fromInt(1), 100L, 100L);
        right.writeRemote(CounterId.fromInt(2), 100L, 100L);

        // global shards should dominate local/remote, even with lower clock and value
        merged = cc.merge(left.context, right.context, allocator);
        headerLength = headerSizeLength + 2 * headerEltLength;
 
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.