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

org.codehaus.mojo.cassandra.ThriftApiOperation Maven / Gradle / Ivy

Go to download

The Mojo Projects plugin for Apache Maven to allow launching a local Apache Cassandra instance from a Maven build

There is a newer version: 2.1.7-z4
Show newest version
package org.codehaus.mojo.cassandra;

import org.apache.cassandra.thrift.Cassandra;
import org.apache.cassandra.thrift.InvalidRequestException;
import org.apache.cassandra.thrift.SchemaDisagreementException;
import org.apache.thrift.TException;

public abstract class ThriftApiOperation {
  
  private String keyspace;
  private final String rpcAddress;
  private final int rpcPort;
  private String cqlVersion = "2.0.0";

  public ThriftApiOperation(String rpcAddress, int rpcPort)
  {
      this.rpcAddress = rpcAddress;
      this.rpcPort = rpcPort;
  }
  
  abstract void executeOperation(Cassandra.Client client) throws ThriftApiExecutionException;

  public String getKeyspace()
  {
      return keyspace;
  }

  public void setKeyspace(String keyspace)
  {
      this.keyspace = keyspace;
  }

  public String getRpcAddress()
  {
      return rpcAddress;
  }


  public int getRpcPort()
  {
      return rpcPort;
  }

    public String getCqlVersion()
    {
        return cqlVersion;
    }

    public void setCqlVersion( String cqlVersion )
    {
        this.cqlVersion = cqlVersion;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy