public class DirectCommStreamDatasetImpl extends Object implements StreamDataset
Dataset.DatasetType
Modifier and Type | Field and Description |
---|---|
static long |
QUEUE_THRESHOLD |
Constructor and Description |
---|
DirectCommStreamDatasetImpl() |
Modifier and Type | Method and Description |
---|---|
int |
addInputStream(ds.funnel.topic.Topic topic)
Add an input stream to this dataset.
|
int |
addInputStream(ds.funnel.topic.Topic topic,
String instanceIdentifier)
Add an input stream to the data set
|
int |
addInputStreams(Collection<ds.funnel.topic.Topic> topics)
Adds a set of input streams to this dataset.
|
int |
addOutputStream(ds.funnel.topic.Topic topic)
Add an output stream to this dataset.
|
int |
addOutputStreams(Collection<ds.funnel.topic.Topic> topics)
Adds a set of output streams to this dataset.
|
boolean |
close()
Close access to this dataset.
|
DataAvailabilityNotifier |
getDataAvailabilityNotifier()
Retrieve the data availability notifier for this dataset.
|
String |
getDatasetIdentifier()
Retrieve the identifier for this dataset.
|
Dataset.DatasetType |
getDatasetType()
Retrieve the type of the data set
|
String |
getDescription()
Retrieve a description of the dataset
|
Collection<ds.funnel.topic.Topic> |
getInputStreams()
Retrieve a collection of the constituent input streams.
|
long |
getLastModificationTime()
Retrieve the last update to this dataset
|
int |
getNumberOfInputStreams()
Retrieve the number of input streams in this dataset
|
int |
getNumberOfOutputStreams()
Retrieve the number of output streams in this dataset.
|
Collection<ds.funnel.topic.Topic> |
getOutputStreams()
Retrieve a collection of the constituent output streams.
|
ds.funnel.topic.TopicDataEvent |
getStreamingData()
Retrieves a portion of the streaming dataset when data is available.
|
boolean |
hasInputStream(ds.funnel.topic.Topic topic)
Check to see if this dataset has a specified input stream.
|
boolean |
hasInputStreams()
Check to see if this dataset has any registered input streams.
|
boolean |
hasOutputStream(ds.funnel.topic.Topic topic)
Check to see if this dataset has a specified output stream.
|
boolean |
hasOutputStreams()
Check to see if this dataset has any registered output streams.
|
boolean |
initializeDataset()
Invokes the initialization of the dataset.
|
boolean |
isAvailable()
A check to see if the dataset is available
|
boolean |
isDataAvailable()
This polls the dataset to see if data is available for consumption.
|
boolean |
isInitialized()
Check to see if the dataset has been initialized
|
void |
marshall(ds.funnel.data.format.FormatWriter mFormat) |
int |
removeInputStream(ds.funnel.topic.Topic topic)
Removes an input stream from this dataset.
|
int |
removeInputStreams(Collection<ds.funnel.topic.Topic> topics)
Removes a set of input streams from this dataset.
|
int |
removeOutputStream(ds.funnel.topic.Topic topic)
Removes an output stream from this dataset.
|
int |
removeOutputStreams(Collection<ds.funnel.topic.Topic> topics)
Removes a set of output streams from this dataset.
|
void |
setDatasetDescription(String description)
Sets the dataset description
|
void |
setDatasetIdentifier(String identifier)
Sets the dataset identifier
|
boolean |
supportsDataAvailabilityNotifications()
Indicates whether this dataset supports dynamic data availability
notifications
|
void |
unmarshall(ds.funnel.data.format.FormatReader reader) |
void |
writeStreamingData(ds.funnel.topic.Topic topic,
byte[] payload)
This method writes data to the output dataset.
|
void |
writeStreamingData(ds.funnel.topic.TopicDataEvent mtdEvent)
This method writes data to the output dataset.
|
void |
writeStreamingDataAsBatch(ds.funnel.topic.Topic topic,
StreamEvent event) |
public static final long QUEUE_THRESHOLD
public ds.funnel.topic.TopicDataEvent getStreamingData() throws DatasetException
StreamDataset
getStreamingData
in interface StreamDataset
DatasetException
- If there are problems performing the operationpublic void writeStreamingData(ds.funnel.topic.TopicDataEvent mtdEvent) throws DatasetException
StreamDataset
writeStreamingData
in interface StreamDataset
mtdEvent
- The stream fragment that needs to be writtenDatasetException
- If there are problems performing the operationpublic void writeStreamingData(ds.funnel.topic.Topic topic, byte[] payload) throws DatasetException
StreamDataset
writeStreamingData
in interface StreamDataset
topic
- The stream being written topayload
- The payload for the individual stream fragmentsDatasetException
- If there are problems performing the operationpublic void writeStreamingDataAsBatch(ds.funnel.topic.Topic topic, StreamEvent event) throws DatasetException
writeStreamingDataAsBatch
in interface StreamDataset
DatasetException
public int addInputStream(ds.funnel.topic.Topic topic) throws DatasetException
StreamDataset
addInputStream
in interface StreamDataset
topic
- The topic of the stream to be addedDatasetException
- If there are problems adding this stream to the set of
managed streamspublic int addInputStream(ds.funnel.topic.Topic topic, String instanceIdentifier) throws DatasetException
StreamDataset
addInputStream
in interface StreamDataset
topic
- Topic of the data stream to be added.instanceIdentifier
- Instance identifier of the operation baseDatasetException
- If there are problems adding this stream to the set of
managed streamspublic int removeInputStream(ds.funnel.topic.Topic topic) throws DatasetException
StreamDataset
removeInputStream
in interface StreamDataset
topic
- The topic of the stream to be removedDatasetException
- If there are problems removing this stream from the set of
managed streamspublic int addInputStreams(Collection<ds.funnel.topic.Topic> topics) throws DatasetException
StreamDataset
addInputStreams
in interface StreamDataset
topics
- A collection of streams to be addedDatasetException
- If there are problems adding these streams to the set of
managed streamspublic int removeInputStreams(Collection<ds.funnel.topic.Topic> topics) throws DatasetException
StreamDataset
removeInputStreams
in interface StreamDataset
topics
- A collection of streams to be removedDatasetException
- If there are problems removing these streams to the set of
managed streamspublic boolean hasInputStreams()
StreamDataset
hasInputStreams
in interface StreamDataset
true
if this dataset has any registered input
streams;false
otherwise.public boolean hasInputStream(ds.funnel.topic.Topic topic)
StreamDataset
hasInputStream
in interface StreamDataset
true
if this dataset has the specified input
stream;false
otherwise.public int getNumberOfInputStreams()
StreamDataset
getNumberOfInputStreams
in interface StreamDataset
public Collection<ds.funnel.topic.Topic> getInputStreams()
StreamDataset
getInputStreams
in interface StreamDataset
public int addOutputStream(ds.funnel.topic.Topic topic) throws DatasetException
StreamDataset
addOutputStream
in interface StreamDataset
topic
- The topic of the stream to be addedDatasetException
- If there are problems adding this stream to the set of
managed streamspublic int removeOutputStream(ds.funnel.topic.Topic topic) throws DatasetException
StreamDataset
removeOutputStream
in interface StreamDataset
topic
- The topic of the stream to be removedDatasetException
- If there are problems removing this stream from the set of
managed streamspublic int addOutputStreams(Collection<ds.funnel.topic.Topic> topics) throws DatasetException
StreamDataset
addOutputStreams
in interface StreamDataset
topics
- A collection of streams to be addedDatasetException
- If there are problems adding these streams to the set of
managed streamspublic int removeOutputStreams(Collection<ds.funnel.topic.Topic> topics) throws DatasetException
StreamDataset
removeOutputStreams
in interface StreamDataset
topics
- A collection of streams to be removedDatasetException
- If there are problems removing these streams from the set of
managed streamspublic boolean hasOutputStreams()
StreamDataset
hasOutputStreams
in interface StreamDataset
true
if this dataset has any registered output
streams;false
otherwise.public boolean hasOutputStream(ds.funnel.topic.Topic topic)
StreamDataset
hasOutputStream
in interface StreamDataset
true
if this dataset has the specified output
stream;false
otherwise.public int getNumberOfOutputStreams()
StreamDataset
getNumberOfOutputStreams
in interface StreamDataset
public Collection<ds.funnel.topic.Topic> getOutputStreams()
StreamDataset
getOutputStreams
in interface StreamDataset
public void setDatasetDescription(String description)
StreamDataset
setDatasetDescription
in interface StreamDataset
description
- Descriptionpublic void setDatasetIdentifier(String identifier)
StreamDataset
setDatasetIdentifier
in interface StreamDataset
identifier
- identifierpublic void unmarshall(ds.funnel.data.format.FormatReader reader) throws ds.funnel.data.format.FormatException
unmarshall
in interface StreamDataset
ds.funnel.data.format.FormatException
public Dataset.DatasetType getDatasetType()
Dataset
getDatasetType
in interface Dataset
public String getDescription()
Dataset
getDescription
in interface Dataset
public String getDatasetIdentifier()
Dataset
getDatasetIdentifier
in interface Dataset
public boolean isInitialized()
Dataset
isInitialized
in interface Dataset
true
if the dataset is initialized;
false
otherwise.public boolean initializeDataset() throws DatasetException
Dataset
initializeDataset
in interface Dataset
true
if the dataset has been initialized;
false
otherwise.DatasetException
public boolean isAvailable()
Dataset
isAvailable
in interface Dataset
true
if the dataset is available;
false
otherwise.public boolean isDataAvailable()
Dataset
isDataAvailable
in interface Dataset
true
if data is available on this dataset;
false
otherwise.public long getLastModificationTime()
Dataset
getLastModificationTime
in interface Dataset
public boolean supportsDataAvailabilityNotifications()
Dataset
supportsDataAvailabilityNotifications
in interface Dataset
true
if this dataset supports data availability
notifications;false
otherwise.public DataAvailabilityNotifier getDataAvailabilityNotifier()
Dataset
getDataAvailabilityNotifier
in interface Dataset
public boolean close() throws DatasetException
Dataset
close
in interface Dataset
true
if a graceful closure of this dataset was
performed;false
otherwise.DatasetException
public void marshall(ds.funnel.data.format.FormatWriter mFormat) throws ds.funnel.data.format.FormatException
marshall
in interface ds.funnel.data.format.FormatMarshaller
ds.funnel.data.format.FormatException
Copyright © 2015. All rights reserved.