com.datastax.driver.stress
Class Consumer

java.lang.Object
  extended by java.lang.Thread
      extended by com.datastax.driver.stress.Consumer
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
Consumer.Asynchronous

public class Consumer
extends Thread


Nested Class Summary
static class Consumer.Asynchronous
           
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  Reporter reporter
           
protected  Session session
           
protected  BlockingQueue<QueryGenerator.Request> workQueue
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Consumer(Session session, BlockingQueue<QueryGenerator.Request> workQueue, Reporter reporter)
           
 
Method Summary
protected  void handle(QueryGenerator.Request request)
           
 void run()
           
protected  void shutdown()
           
 
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, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

session

protected final Session session

workQueue

protected final BlockingQueue<QueryGenerator.Request> workQueue

reporter

protected final Reporter reporter
Constructor Detail

Consumer

public Consumer(Session session,
                BlockingQueue<QueryGenerator.Request> workQueue,
                Reporter reporter)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

shutdown

protected void shutdown()

handle

protected void handle(QueryGenerator.Request request)
               throws NoHostAvailableException
Throws:
NoHostAvailableException


Copyright © 2013. All Rights Reserved.