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 StreamsOperation
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
public void cleanUp()
cleanUp
in interface StreamsOperation
protected StreamsDatum prepareDatum(com.datastax.driver.core.Row row)
public StreamsResultSet readAll()
readAll
in interface StreamsPersistReader
public void startStream()
startStream
in interface StreamsProvider
public StreamsResultSet readCurrent()
readCurrent
in interface StreamsProvider
protected void write(StreamsDatum entry)
public StreamsResultSet readNew(BigInteger sequence)
readNew
in interface StreamsPersistReader
readNew
in interface StreamsProvider
public StreamsResultSet readRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
readRange
in interface StreamsPersistReader
readRange
in interface StreamsProvider
public boolean isRunning()
isRunning
in interface StreamsProvider
Copyright © 2018 The Apache Software Foundation. All rights reserved.