Package xbird.util.struct

Examples of xbird.util.struct.LongRangeSet


    private final LongRangeSet _ranges;
    private final SortedSet<Long> _textBufAddrs;

    public SerializationContext() {
        this._ranges = new LongRangeSet();
        this._textBufAddrs = new TreeSet<Long>();
    }
View Full Code Here


    }

    public void markReferredBlocks(final long cur, final long last, final long[] textBlocks, final SerializationContext serContext) {
        long firstPage = directToPageOffset(cur);
        long lastPage = directToPageOffset(last);
        LongRangeSet ranges = serContext.ranges();
        if(ranges.isEmpty()) {
            bindSerializationContext(serContext);
        }
        ranges.addRange(firstPage, lastPage + PAGE_SIZE);
        final Set<Long> textBufferAddrs = serContext.textBufferAddresses();
        for(long tb : textBlocks) {
            textBufferAddrs.add(tb);
        }
    }
View Full Code Here

    }

    public void markReferredBlocks(final long cur, final long last, final long[] textBlocks, final SerializationContext serContext) {
        long firstPage = directToPageOffset(cur);
        long lastPage = directToPageOffset(last);
        LongRangeSet ranges = serContext.ranges();
        if(ranges.isEmpty()) {
            bindSerializationContext(serContext);
        }
        ranges.addRange(firstPage, lastPage + PAGE_SIZE);
        final Set<Long> textBufferAddrs = serContext.textBufferAddresses();
        for(long tb : textBlocks) {
            textBufferAddrs.add(tb);
        }
    }
View Full Code Here

TOP

Related Classes of xbird.util.struct.LongRangeSet

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.