AbstractColumnFamilyRecordWriter.AbstractRangeClient (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.hadoop

## Class AbstractColumnFamilyRecordWriter.AbstractRangeClient<K>

- java.lang.Object
- - java.lang.Thread
  - - org.apache.cassandra.hadoop.AbstractColumnFamilyRecordWriter.AbstractRangeClient<K>

- All Implemented Interfaces:
    java.lang.Runnable
  Enclosing class:
    AbstractColumnFamilyRecordWriter<K,Y>

      public abstract class AbstractColumnFamilyRecordWriter.AbstractRangeClient<K>
      extends java.lang.Thread

  A client that runs in a threadpool and connects to the list of endpoints for a particular range. Mutations for keys in that range are sent to this client via a queue.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Cassandra.Client` | `client`
    `protected java.util.List<java.net.InetAddress>` | `endpoints`
    `protected java.io.IOException` | `lastException`
    `protected java.util.concurrent.BlockingQueue<K>` | `queue`
    `protected boolean` | `run`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractColumnFamilyRecordWriter.AbstractRangeClient(java.util.List<java.net.InetAddress> endpoints)` Constructs an `AbstractColumnFamilyRecordWriter.AbstractRangeClient` for the given endpoints.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `protected void` | `closeInternal()`
    `void` | `put(K value)` enqueues the given value to Cassandra
    `abstract void` | `run()` Loops collecting mutations from the queue and sending to Cassandra
    `java.lang.String` | `toString()`

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

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield`

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

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

- - ### Field Detail

    - #### endpoints

          protected final java.util.List<java.net.InetAddress> endpoints

    - #### queue

          protected final java.util.concurrent.BlockingQueue<K> queue

    - #### run

          protected volatile boolean run

    - #### lastException

          protected volatile java.io.IOException lastException

    - #### client

          protected Cassandra.Client client

  - ### Constructor Detail

    - #### AbstractColumnFamilyRecordWriter.AbstractRangeClient

          public AbstractColumnFamilyRecordWriter.AbstractRangeClient(java.util.List<java.net.InetAddress> endpoints)

      Constructs an `AbstractColumnFamilyRecordWriter.AbstractRangeClient` for the given endpoints.
      Parameters:
        `endpoints` - the possible endpoints to execute the mutations on

  - ### Method Detail

    - #### put

          public void put(K value)
                   throws java.io.IOException

      enqueues the given value to Cassandra
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### closeInternal

          protected void closeInternal()

    - #### run

          public abstract void run()

      Loops collecting mutations from the queue and sending to Cassandra
      Specified by:
        `run` in interface `java.lang.Runnable`
      Overrides:
        `run` in class `java.lang.Thread`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Thread`

Copyright © 2014 The Apache Software Foundation