public abstract class AbstractColumnFamilyRecordWriter.AbstractRangeClient<K>
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
protected org.apache.cassandra.thrift.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 |
Constructor and Description |
---|
AbstractColumnFamilyRecordWriter.AbstractRangeClient(java.util.List<java.net.InetAddress> endpoints)
Constructs an
AbstractColumnFamilyRecordWriter.AbstractRangeClient for the given endpoints. |
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() |
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
protected final java.util.List<java.net.InetAddress> endpoints
protected final java.util.concurrent.BlockingQueue<K> queue
protected volatile boolean run
protected volatile java.io.IOException lastException
protected org.apache.cassandra.thrift.Cassandra.Client client
public AbstractColumnFamilyRecordWriter.AbstractRangeClient(java.util.List<java.net.InetAddress> endpoints)
AbstractColumnFamilyRecordWriter.AbstractRangeClient
for the given endpoints.endpoints
- the possible endpoints to execute the mutations onpublic void put(K value) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
protected void closeInternal()
public abstract void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String toString()
toString
in class java.lang.Thread
Copyright © 2014 The Apache Software Foundation