org.apache.cassandra.cli

## Class CliMain

- java.lang.Object
- - org.apache.cassandra.cli.CliMain

-     public class CliMain
      extends java.lang.Object

  Cassandra Command Line Interface (CLI) Main

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `HISTORYFILE`
    `static java.lang.String` | `OLD_HISTORYFILE`
    `static CliSessionState` | `sessionState`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CliMain()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `connect(java.lang.String server, int port)` Establish a thrift connection to cassandra instance
    `static void` | `disconnect()` Disconnect thrift connection to cassandra instance
    `static boolean` | `isConnected()` Checks whether the thrift client is connected.
    `static void` | `main(java.lang.String[] args)`
    `static void` | `processStatement(java.lang.String query)`
    `static void` | `processStatementInteractive(java.lang.String query)`
    `static void` | `updateCompletor(java.util.Set<java.lang.String> candidates)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### OLD_HISTORYFILE

          public static final java.lang.String OLD_HISTORYFILE

      See Also:
        Constant Field Values

    - #### HISTORYFILE

          public static final java.lang.String HISTORYFILE

      See Also:
        Constant Field Values

    - #### sessionState

          public static final CliSessionState sessionState

  - ### Constructor Detail

    - #### CliMain

          public CliMain()

  - ### Method Detail

    - #### connect

          public static void connect(java.lang.String server,
                     int port)

      Establish a thrift connection to cassandra instance
      Parameters:
        `server` - - hostname or IP of the server
        `port` - - Thrift port number

    - #### disconnect

          public static void disconnect()

      Disconnect thrift connection to cassandra instance

    - #### isConnected

          public static boolean isConnected()

      Checks whether the thrift client is connected.
      Returns:
        boolean - true when connected, false otherwise

    - #### updateCompletor

          public static void updateCompletor(java.util.Set<java.lang.String> candidates)

    - #### processStatement

          public static void processStatement(java.lang.String query)
                                       throws java.nio.charset.CharacterCodingException,
                                              java.lang.ClassNotFoundException,
                                              org.apache.thrift.TException,
                                              TimedOutException,
                                              NotFoundException,
                                              InvalidRequestException,
                                              java.lang.NoSuchFieldException,
                                              UnavailableException,
                                              java.lang.IllegalAccessException,
                                              java.lang.InstantiationException

      Throws:
        `java.nio.charset.CharacterCodingException`
        `java.lang.ClassNotFoundException`
        `org.apache.thrift.TException`
        `TimedOutException`
        `NotFoundException`
        `InvalidRequestException`
        `java.lang.NoSuchFieldException`
        `UnavailableException`
        `java.lang.IllegalAccessException`
        `java.lang.InstantiationException`

    - #### processStatementInteractive

          public static void processStatementInteractive(java.lang.String query)

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2014 The Apache Software Foundation