public class FunnelStreamDatasetImpl extends Object implements StreamDataset
StreamingAccess interface which outlines
methods to access the data streams that are available.Dataset.DatasetType| Constructor and Description |
|---|
FunnelStreamDatasetImpl() |
FunnelStreamDatasetImpl(String datasetIdentifier,
String datasetDescription)
Share the instance of the client service, so that multiple connections
are not created to the same broker.
|
| 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 mFormat) |
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 String MODULE
public FunnelStreamDatasetImpl()
public FunnelStreamDatasetImpl(String datasetIdentifier, String datasetDescription)
datasetIdentifier - The identifier of the datasetdatasetDescription - The descriptor for this dataset.public Dataset.DatasetType getDatasetType()
DatasetgetDatasetType in interface Datasetpublic String getDescription()
DatasetgetDescription in interface Datasetpublic String getDatasetIdentifier()
DatasetgetDatasetIdentifier in interface Datasetpublic void setDatasetDescription(String description)
StreamDatasetsetDatasetDescription in interface StreamDatasetdescription - Descriptionpublic void setDatasetIdentifier(String identifier)
StreamDatasetsetDatasetIdentifier in interface StreamDatasetidentifier - identifierpublic boolean isInitialized()
DatasetisInitialized in interface Datasettrue if the dataset is initialized;
false otherwise.public boolean initializeDataset()
throws DatasetException
DatasetinitializeDataset in interface Datasettrue if the dataset has been initialized;
false otherwise.DatasetExceptionpublic boolean isAvailable()
DatasetisAvailable in interface Datasettrue if the dataset is available;
false otherwise.public boolean isDataAvailable()
DatasetisDataAvailable in interface Datasettrue if data is available on this dataset;
false otherwise.public long getLastModificationTime()
DatasetgetLastModificationTime in interface Datasetpublic boolean supportsDataAvailabilityNotifications()
DatasetsupportsDataAvailabilityNotifications in interface Datasettrue if this dataset supports data availability
notifications;false otherwise.public DataAvailabilityNotifier getDataAvailabilityNotifier()
DatasetgetDataAvailabilityNotifier in interface Datasetpublic ds.funnel.topic.TopicDataEvent getStreamingData()
throws DatasetException
StreamDatasetgetStreamingData in interface StreamDatasetDatasetException - If there are problems performing the operationpublic void writeStreamingData(ds.funnel.topic.TopicDataEvent mtdEvent)
throws DatasetException
StreamDatasetwriteStreamingData in interface StreamDatasetmtdEvent - 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
StreamDatasetwriteStreamingData in interface StreamDatasettopic - 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 StreamDatasetDatasetExceptionpublic int addInputStream(ds.funnel.topic.Topic topic)
throws DatasetException
StreamDatasetaddInputStream in interface StreamDatasettopic - 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
StreamDatasetaddInputStream in interface StreamDatasettopic - 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
StreamDatasetremoveInputStream in interface StreamDatasettopic - 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
StreamDatasetaddInputStreams in interface StreamDatasettopics - 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
StreamDatasetremoveInputStreams in interface StreamDatasettopics - A collection of streams to be removedDatasetException - If there are problems removing these streams to the set of
managed streamspublic boolean hasInputStreams()
StreamDatasethasInputStreams in interface StreamDatasettrue if this dataset has any registered input
streams;false otherwise.public boolean hasInputStream(ds.funnel.topic.Topic topic)
StreamDatasethasInputStream in interface StreamDatasettrue if this dataset has the specified input
stream;false otherwise.public int getNumberOfInputStreams()
StreamDatasetgetNumberOfInputStreams in interface StreamDatasetpublic Collection<ds.funnel.topic.Topic> getInputStreams()
StreamDatasetgetInputStreams in interface StreamDatasetpublic int addOutputStream(ds.funnel.topic.Topic topic)
throws DatasetException
StreamDatasetaddOutputStream in interface StreamDatasettopic - 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
StreamDatasetremoveOutputStream in interface StreamDatasettopic - 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
StreamDatasetaddOutputStreams in interface StreamDatasettopics - 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
StreamDatasetremoveOutputStreams in interface StreamDatasettopics - A collection of streams to be removedDatasetException - If there are problems removing these streams from the set of
managed streamspublic boolean hasOutputStreams()
StreamDatasethasOutputStreams in interface StreamDatasettrue if this dataset has any registered output
streams;false otherwise.public boolean hasOutputStream(ds.funnel.topic.Topic topic)
StreamDatasethasOutputStream in interface StreamDatasettrue if this dataset has the specified output
stream;false otherwise.public int getNumberOfOutputStreams()
StreamDatasetgetNumberOfOutputStreams in interface StreamDatasetpublic Collection<ds.funnel.topic.Topic> getOutputStreams()
StreamDatasetgetOutputStreams in interface StreamDatasetpublic void marshall(ds.funnel.data.format.FormatWriter mFormat)
throws ds.funnel.data.format.FormatException
marshall in interface ds.funnel.data.format.FormatMarshallerds.funnel.data.format.FormatExceptionpublic void unmarshall(ds.funnel.data.format.FormatReader mFormat)
throws ds.funnel.data.format.FormatException
unmarshall in interface StreamDatasetds.funnel.data.format.FormatExceptionpublic boolean close()
throws DatasetException
Datasetclose in interface Datasettrue if a graceful closure of this dataset was
performed;false otherwise.DatasetExceptionCopyright © 2015. All rights reserved.