Examples of PageFile


Examples of org.apache.kahadb.page.PageFile

        assertNull(index.getLast(tx));
    }

    public void testLargeValue() throws Exception {
        //System.setProperty("maxKahaDBTxSize", "" + (1024*1024*1024));
        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        //pf.setEnablePageCaching(false);
        pf.load();
        tx = pf.tx();
        long id = tx.allocate().getPageId();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

        }
        tx.commit();
    }

    public void testLargeValueOverflow() throws Exception {
        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        pf.setWriteBatchSize(1);
        pf.load();
        tx = pf.tx();
        long id = tx.allocate().getPageId();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

    public void testListIndexConsistancyOverTime() throws Exception {

        final int NUM_ITERATIONS = 50;

        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        //pf.setEnablePageCaching(false);
        pf.setWriteBatchSize(1);
        pf.load();
        tx = pf.tx();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

            pf.delete();
        }
    }

    protected void createPageFileAndIndex(int pageSize) throws Exception {
        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(pageSize);
        pf.load();
        tx = pf.tx();
        this.index = createIndex();
    }
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

    private int getMessageSize(int min, int max) {
        return min + (int)(Math.random() * ((max - min) + 1));
    }

    public void testLargeValueOverflow() throws Exception {
        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        pf.setEnablePageCaching(false);
        pf.setWriteBatchSize(1);
        pf.load();
        tx = pf.tx();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

    public void testListIndexConsistancyOverTime() throws Exception {

        final int NUM_ITERATIONS = 100;

        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        pf.setEnablePageCaching(false);
        pf.setWriteBatchSize(1);
        pf.load();
        tx = pf.tx();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

    public void testListLargeDataAddWithReverseRemove() throws Exception {

        final int NUM_ITERATIONS = 100;

        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        pf.setEnablePageCaching(false);
        pf.setWriteBatchSize(1);
        pf.load();
        tx = pf.tx();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

    public void testListLargeDataAddAndNonSequentialRemove() throws Exception {

        final int NUM_ITERATIONS = 100;

        pf = new PageFile(directory, getClass().getName());
        pf.setPageSize(4*1024);
        pf.setEnablePageCaching(false);
        pf.setWriteBatchSize(1);
        pf.load();
        tx = pf.tx();
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

    public void setUp() throws Exception {
        ROOT_DIR = new File(IOHelper.getDefaultDataDirectory());
        IOHelper.delete(ROOT_DIR);

        pf = new PageFile(ROOT_DIR, getClass().getName());
        pf.load();
    }
View Full Code Here

Examples of org.apache.kahadb.page.PageFile

                this.journal = new Journal();
                this.journal.setDirectory(directory);
                this.journal.setMaxFileLength(getJournalMaxFileLength());
                this.journal.setWriteBatchSize(getJournalMaxWriteBatchSize());
                this.journal.start();
                this.pageFile = new PageFile(directory, "tmpDB");
                this.pageFile.load();

                this.pageFile.tx().execute(new Transaction.Closure<IOException>() {
                    public void execute(Transaction tx) throws IOException {
                        if (pageFile.getPageCount() == 0) {
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.