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

com.netflix.astyanax.test.TestKeyspace Maven / Gradle / Ivy

There is a newer version: 3.10.2
Show newest version
/*******************************************************************************
 * Copyright 2011 Netflix
 * 
 * Licensed 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.
 ******************************************************************************/
package com.netflix.astyanax.test;

import java.util.List;
import java.util.Map;
import java.util.Properties;

import com.netflix.astyanax.AstyanaxConfiguration;
import com.netflix.astyanax.ColumnMutation;
import com.netflix.astyanax.Keyspace;
import com.netflix.astyanax.MutationBatch;
import com.netflix.astyanax.SerializerPackage;
import com.netflix.astyanax.connectionpool.ConnectionPool;
import com.netflix.astyanax.connectionpool.Operation;
import com.netflix.astyanax.connectionpool.OperationResult;
import com.netflix.astyanax.connectionpool.TokenRange;
import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
import com.netflix.astyanax.connectionpool.exceptions.OperationException;
import com.netflix.astyanax.cql.CqlStatement;
import com.netflix.astyanax.ddl.KeyspaceDefinition;
import com.netflix.astyanax.ddl.SchemaChangeResult;
import com.netflix.astyanax.model.ColumnFamily;
import com.netflix.astyanax.partitioner.Partitioner;
import com.netflix.astyanax.query.ColumnFamilyQuery;
import com.netflix.astyanax.retry.RetryPolicy;
import com.netflix.astyanax.serializers.SerializerPackageImpl;

public class TestKeyspace implements Keyspace {
    private String keyspaceName;
    private List tokenRange;

    public TestKeyspace(String name) {
        this.keyspaceName = name;
    }

    public void setTokenRange(List tokens) {
        this.tokenRange = tokens;
    }

    @Override
    public String getKeyspaceName() {
        return this.keyspaceName;
    }

    @Override
    public List describeRing() throws ConnectionException {
        return this.tokenRange;
    }

    @Override
    public MutationBatch prepareMutationBatch() {
        return null;
    }

    @Override
    public  ColumnFamilyQuery prepareQuery(ColumnFamily cf) {
        
        return null;
    }

    @Override
    public  ColumnMutation prepareColumnMutation(
            ColumnFamily columnFamily, K rowKey, C column) {
        
        return null;
    }

    @Override
    public AstyanaxConfiguration getConfig() {
        
        return null;
    }

    @Override
    public KeyspaceDefinition describeKeyspace() throws ConnectionException {
        
        return null;
    }

    @Override
    public SerializerPackage getSerializerPackage(String columnFamily,
            boolean ignoreErrors) {
        return SerializerPackageImpl.DEFAULT_SERIALIZER_PACKAGE;
    }

    @Override
    public OperationResult testOperation(Operation operation)
            throws ConnectionException {
        
        return null;
    }

    @Override
    public  OperationResult truncateColumnFamily(
            ColumnFamily columnFamily) throws OperationException,
            ConnectionException {
        
        return null;
    }

    @Override
    public OperationResult testOperation(Operation operation,
            RetryPolicy retry) throws ConnectionException {
        
        return null;
    }

    @Override
    public List describeRing(boolean cached) throws ConnectionException {
        
        return null;
    }

    @Override
    public List describeRing(String dc) throws ConnectionException {
        return this.tokenRange;
    }

    @Override
    public List describeRing(String dc, String rack) throws ConnectionException {
        return this.tokenRange;
    }

    @Override
    public OperationResult truncateColumnFamily(String columnFamily) throws ConnectionException {
        
        return null;
    }

    @Override
    public String describePartitioner() throws ConnectionException {
        
        return null;
    }

    @Override
    public OperationResult dropColumnFamily(String columnFamilyName) throws ConnectionException {
        
        return null;
    }

    @Override
    public  OperationResult dropColumnFamily(ColumnFamily columnFamily) throws ConnectionException {
        
        return null;
    }

    @Override
    public OperationResult dropKeyspace() throws ConnectionException {
        
        return null;
    }

    @Override
    public  OperationResult createColumnFamily(ColumnFamily columnFamily, Map options)
            throws ConnectionException {
        
        return null;
    }

    @Override
    public  OperationResult updateColumnFamily(ColumnFamily columnFamily, Map options)
            throws ConnectionException {
        
        return null;
    }

    @Override
    public OperationResult createKeyspace(Map options) throws ConnectionException {
        
        return null;
    }

    @Override
    public OperationResult updateKeyspace(Map options) throws ConnectionException {
        
        return null;
    }

    @Override
    public Map> describeSchemaVersions() throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public ConnectionPool getConnectionPool() throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public CqlStatement prepareCqlStatement() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Partitioner getPartitioner() throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult createKeyspace(Map options,
            Map> cfs) throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult createColumnFamily(
            Properties props) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult createKeyspace(
            Properties properties) throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult updateKeyspace(Properties props)
            throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Properties getKeyspaceProperties() throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Properties getColumnFamilyProperties(String columnFamily)
            throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult updateColumnFamily(
            Properties props) throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult updateColumnFamily(
            Map options) throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public OperationResult createColumnFamily(
            Map options) throws ConnectionException {
        // TODO Auto-generated method stub
        return null;
    }

	@Override
	public OperationResult createKeyspaceIfNotExists(
			Map options) throws ConnectionException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public OperationResult createKeyspaceIfNotExists(
			Properties properties) throws ConnectionException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public OperationResult createKeyspaceIfNotExists(
			Map options,
			Map> cfs)
			throws ConnectionException {
		// TODO Auto-generated method stub
		return null;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy