Package org.apache.activemq.store.kahadb.disk.page.PageFile

Examples of org.apache.activemq.store.kahadb.disk.page.PageFile.PageWrite


        if (pageId < 0) {
            throw new InvalidPageIOException("Page id is not valid", pageId);
        }

        // It might be a page this transaction has modified...
        PageWrite update = writes.get(pageId);
        if (update != null) {
            page.copy(update.getPage());
            return;
        }

        // We may be able to get it from the cache...
        Page<T> t = pageFile.getFromCache(pageId);
View Full Code Here


        Long key = page.getPageId();

        // how much pages we have for this transaction
        size = writes.size() * pageFile.getPageSize();

        PageWrite write;

        if (size > maxTransactionSize) {
            if (tmpFile == null) {
                tmpFile = new RandomAccessFile(getTempFile(), "rw");
            }
            long location = nextLocation;
            tmpFile.seek(nextLocation);
            tmpFile.write(data);
            nextLocation = location + data.length;
            write = new PageWrite(page, location, data.length, getTempFile());
        } else {
            write = new PageWrite(page, data);
        }
        writes.put(key, write);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.store.kahadb.disk.page.PageFile.PageWrite

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.