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

org.apache.cassandra.db.EmptyColumns Maven / Gradle / Ivy

package org.apache.cassandra.db;
/*
 * 
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 * 
 */


import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;

import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.db.filter.ColumnSlice;
import org.apache.cassandra.utils.Allocator;

import com.google.common.base.Function;
import com.google.common.collect.Iterators;

public class EmptyColumns extends AbstractThreadUnsafeSortedColumns
{
    public static final Factory factory = new Factory()
    {
        public EmptyColumns create(CFMetaData metadata, boolean insertReversed)
        {
            assert !insertReversed;
            return new EmptyColumns(metadata, DeletionInfo.live());
        }
    };

    public EmptyColumns(CFMetaData metadata, DeletionInfo info)
    {
        super(metadata, info);
    }

    public ColumnFamily cloneMe()
    {
        return new EmptyColumns(metadata, deletionInfo);
    }

    public void clear()
    {
    }

    public Factory getFactory()
    {
        return factory;
    }

    public void addColumn(Column column, Allocator allocator)
    {
        throw new UnsupportedOperationException();
    }

    public void addAll(ColumnFamily cm, Allocator allocator, Function transformation)
    {
        throw new UnsupportedOperationException();
    }

    public boolean replace(Column oldColumn, Column newColumn)
    {
        throw new UnsupportedOperationException();
    }

    public Column getColumn(ByteBuffer name)
    {
        throw new UnsupportedOperationException();
    }

    public Iterable getColumnNames()
    {
        return Collections.emptyList();
    }

    public Collection getSortedColumns()
    {
        return Collections.emptyList();
    }

    public Collection getReverseSortedColumns()
    {
        return Collections.emptyList();
    }

    public int getColumnCount()
    {
        return 0;
    }

    public Iterator iterator(ColumnSlice[] slices)
    {
        return Iterators.emptyIterator();
    }

    public Iterator reverseIterator(ColumnSlice[] slices)
    {
        return Iterators.emptyIterator();
    }

    public boolean isInsertReversed()
    {
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy