Package xbird.storage

Examples of xbird.storage.DbException


            Page p = getPage(pageNum);
            dataPage = new DataPage(p);
            try {
                dataPage.read();
            } catch (IOException e) {
                throw new DbException("failed to read page#" + pageNum, e);
            }
            dataCache.put(pageNum, dataPage);
        }
        return dataPage;
    }
View Full Code Here


            _rootNode.ph.setStatus(LEAF);
            _rootNode.set(new Value[0], new long[0]);
            try {
                _rootNode.write();
            } catch (IOException e) {
                throw new DbException(e);
            }
            synchronized(_cache) {
                _cache.put(_rootNode.page.getPageNum(), _rootNode);
            }
            if(close) {
View Full Code Here

     */
    public long addValue(Value value, long pointer) throws DbException {
        try {
            return getRootNode().addValue(value, pointer);
        } catch (IOException e) {
            throw new DbException(e);
        }
    }
View Full Code Here

     */
    public long addValue(BTreeRootInfo root, Value value, long pointer) throws DbException {
        try {
            return getRootNode(root).addValue(value, pointer);
        } catch (IOException e) {
            throw new DbException(e);
        }
    }
View Full Code Here

     */
    public long removeValue(Value value) throws DbException {
        try {
            return getRootNode().removeValue(value);
        } catch (IOException e) {
            throw new DbException(e);
        }
    }
View Full Code Here

    public long[] removeValue(Value value, long pointer) throws DbException {
        try {
            return getRootNode().removeValue(value, pointer);
        } catch (IOException e) {
            throw new DbException(e);
        }
    }
View Full Code Here

     */
    public long removeValue(BTreeRootInfo root, Value value) throws DbException {
        try {
            return getRootNode(root).removeValue(value);
        } catch (IOException e) {
            throw new DbException(e);
        }
    }
View Full Code Here

                    scanRange(leftmost, rightmost, query, callback);
                    break;
                }
            }
        } catch (IOException e) {
            throw new DbException(e);
        }
    }
View Full Code Here

            if(node == null) {
                node = new BTreeNode(root, getPage(page), parent);
                try {
                    node.read();
                } catch (IOException e) {
                    throw new DbException("failed to read page#" + page, e);
                }
                if(LOG.isDebugEnabled()) {
                    LOG.debug("read node page#" + page + ", keys: " + node.keys.length);
                }
                _cache.put(node.page.getPageNum(), node);
View Full Code Here

                    continue;
                }
                try {
                    node.write();
                } catch (IOException ioe) {
                    throw new DbException(ioe);
                }
            }
        }
        if(clear) {
            _cache.clear();
View Full Code Here

TOP

Related Classes of xbird.storage.DbException

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.