Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * See the file LICENSE for redistribution information.
  * Copyright (c) 2002, 2013 Oracle and/or its affiliates.  All rights reserved.
A sequence of obsolete info. To save memory, a TupleOutput is used to contain a sequence of {LSN-file, LSN-offset, isLN, size} tuples. Packed integers are used and memory is saved by not using an Object for each tuple, as would be needed in a Java collection. An OffsetList was not used because it does not use packed integers. PackedOffsets was not used because it depends on offsets being sorted in ascending order.
public class PackedObsoleteInfo extends TupleOutput {
    public PackedObsoleteInfo() {
    public int getMemorySize() {
        return MemoryBudget.tupleOutputSize(this);
    public void copyObsoleteInfo(final PackedObsoleteInfo other) {
    public void addObsoleteInfo(final long obsoleteLsn,
                                final boolean isObsoleteLN,
                                final int obsoleteSize) {
    public void countObsoleteInfo(final UtilizationTracker tracker,
                                  final DatabaseImpl nodeDb) {
        final TupleInput in = new TupleInput(this);
        while (in.available() > 0) {
            final long fileNumber = in.readPackedLong();
            long fileOffset = in.readPackedLong();
            final boolean isObsoleteLN = in.readBoolean();
            final int obsoleteSize = in.readPackedInt();
                 isObsoleteLN ? 
                 . /* Any LN type will do */ : 
New to GrepCode? Check out our FAQ X