All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.cassandra.hints.CompressedChecksummedDataInputBuilder Maven / Gradle / Ivy

Go to download

The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model.

There is a newer version: 5.0.5
Show newest version
package org.apache.cassandra.hints;

import org.apache.cassandra.io.compress.ICompressor;
import org.apache.cassandra.io.util.ChannelProxy;

public class CompressedChecksummedDataInputBuilder extends ChecksummedDataInput.Builder
{
    long position;
    ICompressor compressor;

    public CompressedChecksummedDataInputBuilder(ChannelProxy channel)
    {
        super(channel);
        bufferType = null;
    }

    public ChecksummedDataInput build()
    {
        assert position >= 0;
        assert compressor != null;
        return new CompressedChecksummedDataInput(this);
    }

    public CompressedChecksummedDataInputBuilder withCompressor(ICompressor compressor)
    {
        this.compressor = compressor;
        bufferType = compressor.preferredBufferType();
        return this;
    }

    public CompressedChecksummedDataInputBuilder withPosition(long position)
    {
        this.position = position;
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy