Package org.fusesource.hawtdb.api

Examples of org.fusesource.hawtdb.api.Transaction


    public <T> T execute(Work<T> work) {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ start +++ " + work);
        }

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ done  +++ " + work);
        }
View Full Code Here


    public <T> T execute(Work<T> work) {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ start +++ " + work);
        }

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ done  +++ " + work);
        }
View Full Code Here

    public <T> T execute(Work<T> work) {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ start +++ " + work);
        }

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ done  +++ " + work);
        }
View Full Code Here

    }

    public <T> T execute(Work<T> work) {
        LOG.trace("Executing work +++ start +++ {}", work);

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        LOG.trace("Executing work +++ done  +++ {}", work);
        return answer;
    }
View Full Code Here

    public <T> T execute(Work<T> work) {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ start +++ " + work);
        }

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ done  +++ " + work);
        }
View Full Code Here

    }

    public <T> T execute(Work<T> work) {
        LOG.trace("Executing work +++ start +++ {}", work);

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        LOG.trace("Executing work +++ done  +++ {}", work);
        return answer;
    }
View Full Code Here

    }

    public <T> T execute(Work<T> work, boolean rollbackOnOptimisticUpdateException) {
        LOG.trace("Executing work +++ start +++ {}", work);

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile, rollbackOnOptimisticUpdateException);

        LOG.trace("Executing work +++ done  +++ {}", work);
        return answer;
    }
View Full Code Here

    public <T> T execute(Work<T> work) {
        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ start +++ " + work);
        }

        Transaction tx = pageFile.tx();
        T answer = doExecute(work, tx, pageFile);

        if (LOG.isTraceEnabled()) {
            LOG.trace("Executing work +++ done  +++ " + work);
        }
View Full Code Here

    protected Index<String, Long> createIndex() {
        BTreeIndexFactory<String, Long> factory = new BTreeIndexFactory<String, Long>();
        factory.setKeyCodec(StringCodec.INSTANCE);
        factory.setValueCodec(LongCodec.INSTANCE);
        //
        Transaction tx = pageFile.tx();
        Index<String, Long> index = factory.create(tx);
        tx.commit();
        return index;
    }
View Full Code Here

   
   
    private void preallocate(final int INITIAL_PAGE_COUNT) {
        benchmark.setSetup(new Callback(){
            public void run(TxPageFileFactory pff) throws Exception {
                Transaction tx = pff.getTxPageFile().tx();
                for (int i = 0; i < INITIAL_PAGE_COUNT; i++) {
                    int page = tx.allocator().alloc(1);
                    tx.write(page, new Buffer(THE_DATA));
                }
                tx.commit();
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.fusesource.hawtdb.api.Transaction

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.