public class CassandraPersistReader extends Object implements StreamsPersistReader
| Modifier and Type | Class and Description |
|---|---|
class |
CassandraPersistReader.CassandraPersistReaderTask |
| Modifier and Type | Field and Description |
|---|---|
protected ReadWriteLock |
lock |
static org.slf4j.Logger |
LOGGER |
protected Queue<StreamsDatum> |
persistQueue |
protected Iterator<com.datastax.driver.core.Row> |
rowIterator |
static String |
STREAMS_ID |
| Constructor and Description |
|---|
CassandraPersistReader()
CassandraPersistReader constructor
|
CassandraPersistReader(CassandraConfiguration config)
CassandraPersistReader constructor - uses supplied CassandraConfiguration.
|
CassandraPersistReader(Queue<StreamsDatum> persistQueue)
CassandraPersistReader constructor - uses supplied persistQueue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
String |
getId() |
Queue<StreamsDatum> |
getPersistQueue() |
boolean |
isRunning() |
void |
prepare(Object configurationObject) |
protected StreamsDatum |
prepareDatum(com.datastax.driver.core.Row row) |
StreamsResultSet |
readAll() |
StreamsResultSet |
readCurrent() |
StreamsResultSet |
readNew(BigInteger sequence) |
StreamsResultSet |
readRange(org.joda.time.DateTime start,
org.joda.time.DateTime end) |
void |
setPersistQueue(Queue<StreamsDatum> persistQueue) |
void |
startStream() |
void |
stop() |
protected void |
write(StreamsDatum entry) |
public static final String STREAMS_ID
public static final org.slf4j.Logger LOGGER
protected volatile Queue<StreamsDatum> persistQueue
protected Iterator<com.datastax.driver.core.Row> rowIterator
protected final ReadWriteLock lock
public CassandraPersistReader()
public CassandraPersistReader(CassandraConfiguration config)
config - configpublic CassandraPersistReader(Queue<StreamsDatum> persistQueue)
persistQueue - persistQueuepublic void setPersistQueue(Queue<StreamsDatum> persistQueue)
public Queue<StreamsDatum> getPersistQueue()
public void stop()
public String getId()
getId in interface StreamsOperationpublic void prepare(Object configurationObject)
prepare in interface StreamsOperationpublic void cleanUp()
cleanUp in interface StreamsOperationprotected StreamsDatum prepareDatum(com.datastax.driver.core.Row row)
public StreamsResultSet readAll()
readAll in interface StreamsPersistReaderpublic void startStream()
startStream in interface StreamsProviderpublic StreamsResultSet readCurrent()
readCurrent in interface StreamsProviderprotected void write(StreamsDatum entry)
public StreamsResultSet readNew(BigInteger sequence)
readNew in interface StreamsPersistReaderreadNew in interface StreamsProviderpublic StreamsResultSet readRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
readRange in interface StreamsPersistReaderreadRange in interface StreamsProviderpublic boolean isRunning()
isRunning in interface StreamsProviderCopyright © 2018 The Apache Software Foundation. All rights reserved.