Package com.persistit.JournalManager

Examples of com.persistit.JournalManager.TreeDescriptor


        if (volume == null) {
            throw new CorruptJournalException("IT JournalRecord refers to unidentified volume handle " + volumeHandle
                    + " at position " + addressToString(address, timestamp));
        }
        if (!volume.isTemporary()) {
            final TreeDescriptor td = new TreeDescriptor(volumeHandle, treeName);
            _handleToTreeMap.put(handle, td);
            _treeToHandleMap.put(td, handle);
            _persistit.getLogBase().recoveryRecord.log("IT", addressToString(address, timestamp), treeName, timestamp);
        }
    }
View Full Code Here


     *
     * @throws PersistitException
     */
    void convertToLongRecord(final Value value, final int treeHandle, final long from, final long timestamp)
            throws PersistitException {
        final TreeDescriptor td = _handleToTreeMap.get(treeHandle);
        final int volumeHandle = td.getVolumeHandle();
        long page = Buffer.decodeLongRecordDescriptorPointer(value.getEncodedBytes(), 0);
        final int size = Buffer.decodeLongRecordDescriptorSize(value.getEncodedBytes(), 0);
        if (size < 0 || size > Value.MAXIMUM_SIZE) {
            throw new CorruptJournalException("Transactional long record specification " + "exceeds maximum size of "
                    + Value.MAXIMUM_SIZE + ":" + size);
View Full Code Here

    public static String addressToString(final long address, final long timestamp) {
        return String.format("JournalAddress %,d{%,d}", address, timestamp);
    }

    private Exchange getExchange(final int treeHandle, final long from, final long timestamp) throws PersistitException {
        final TreeDescriptor td = _support.getPersistit().getJournalManager().lookupTreeHandle(treeHandle);
        if (td == null) {
            throw new CorruptJournalException("Tree handle " + treeHandle + " is undefined at "
                    + addressToString(from, timestamp));
        }
        final Volume volume = _support.getPersistit().getJournalManager().volumeForHandle(td.getVolumeHandle());
        if (volume == null) {
            throw new CorruptJournalException("Volume handle " + td.getVolumeHandle() + " is undefined at "
                    + addressToString(from, timestamp));
        }
        if (VolumeStructure.DIRECTORY_TREE_NAME.equals(td.getTreeName())) {
            return volume.getStructure().directoryExchange();
        } else {
            final Exchange exchange = _support.getPersistit().getExchange(volume, td.getTreeName(), true);
            exchange.ignoreTransactions();
            return exchange;
        }
    }
View Full Code Here

        if (volume == null) {
            throw new CorruptJournalException("IT JournalRecord refers to unidentified volume handle " + volumeHandle
                    + " at position " + addressToString(address, timestamp));
        }
        if (!volume.isTemporary()) {
            final TreeDescriptor td = new TreeDescriptor(volumeHandle, treeName);
            _handleToTreeMap.put(handle, td);
            _treeToHandleMap.put(td, handle);
            _persistit.getLogBase().recoveryRecord.log("IT", addressToString(address, timestamp), treeName, timestamp);
        }
    }
View Full Code Here

     *
     * @throws PersistitException
     */
    void convertToLongRecord(final Value value, final int treeHandle, final long from, final long timestamp)
            throws PersistitException {
        final TreeDescriptor td = _handleToTreeMap.get(treeHandle);
        final int volumeHandle = td.getVolumeHandle();
        long page = Buffer.decodeLongRecordDescriptorPointer(value.getEncodedBytes(), 0);
        final int size = Buffer.decodeLongRecordDescriptorSize(value.getEncodedBytes(), 0);
        if (size < 0 || size > Value.MAXIMUM_SIZE) {
            throw new CorruptJournalException("Transactional long record specification " + "exceeds maximum size of "
                    + Value.MAXIMUM_SIZE + ":" + size);
View Full Code Here

TOP

Related Classes of com.persistit.JournalManager.TreeDescriptor

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.