public class TwitterSearchDataset extends AbstractTwitterSearchDataset<twitter4j.Status>
AbstractTwitterSearchDataset which pushes
the Statuss into the stream.config, logger, query, twitter| Constructor and Description |
|---|
TwitterSearchDataset(twitter4j.Query query,
TwitterAPIToken token)
Construct the dataset from the given API token and query.
|
TwitterSearchDataset(twitter4j.Query query,
TwitterAPIToken token,
BlockingDroppingQueue<twitter4j.Status> buffer)
Construct the dataset from the given API token, query and buffer.
|
| Modifier and Type | Method and Description |
|---|---|
twitter4j.Query |
getQuery()
Get the current query
|
protected void |
registerStatus(twitter4j.Query query,
twitter4j.Status status,
String rawjson)
Handle the given incoming status and optionally
BlockingDroppingBufferedStream.register(Object)
it with the stream. |
getRandomInstance, makeConfiguration, numInstancesclose, getBuffer, hasNext, next, registerfilter, forEach, forEach, forEach, iterator, map, map, parallelForEach, parallelForEach, remove, transformclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilter, forEach, forEach, forEach, map, map, parallelForEach, parallelForEach, transformforEachRemaining, hasNext, next, removeforEach, iterator, spliteratorpublic TwitterSearchDataset(twitter4j.Query query, TwitterAPIToken token)
ArrayBlockingDroppingQueue with a single item
capacity.query - the Twitter search querytoken - the Twitter api authentication credentialspublic TwitterSearchDataset(twitter4j.Query query, TwitterAPIToken token, BlockingDroppingQueue<twitter4j.Status> buffer)
query - the Twitter search querytoken - the Twitter api authentication credentialsbuffer - the buffer to hold Statuss before they are consumed.protected void registerStatus(twitter4j.Query query, twitter4j.Status status, String rawjson) throws InterruptedException
AbstractTwitterSearchDatasetBlockingDroppingBufferedStream.register(Object)
it with the stream.registerStatus in class AbstractTwitterSearchDataset<twitter4j.Status>query - the querystatus - the parsed Statusrawjson - the raw json stringInterruptedExceptionpublic twitter4j.Query getQuery()
AbstractTwitterSearchDatasetgetQuery in class AbstractTwitterSearchDataset<twitter4j.Status>