Package | Description |
---|---|
org.apache.edgent.analytics.sensors |
Analytics focused on handling sensor data.
|
org.apache.edgent.connectors.file |
File stream connector.
|
org.apache.edgent.connectors.http |
HTTP stream connector.
|
org.apache.edgent.connectors.iot |
Edgent device connector API to a message hub.
|
org.apache.edgent.connectors.iotp |
IBM Watson IoT Platform stream connector.
|
org.apache.edgent.connectors.kafka |
Apache Kafka enterprise messing hub stream connector.
|
org.apache.edgent.connectors.mqtt |
MQTT (lightweight messaging protocol for small sensors and mobile devices) stream connector.
|
org.apache.edgent.connectors.mqtt.iot |
An MQTT based IotDevice connector.
|
org.apache.edgent.connectors.serial |
Serial port connector API.
|
org.apache.edgent.function |
Functional interfaces for lambda expressions.
|
org.apache.edgent.oplet.functional |
Oplets that process tuples using functions.
|
org.apache.edgent.oplet.plumbing |
Oplets that control the flow of tuples.
|
org.apache.edgent.providers.iot |
Iot provider that allows multiple applications to
share an
IotDevice . |
org.apache.edgent.samples.apps |
Support for some more complex Edgent application samples.
|
org.apache.edgent.samples.connectors |
General support for connector samples.
|
org.apache.edgent.topology |
Functional api to build a streaming topology.
|
org.apache.edgent.topology.json |
Utilities for use of JSON in a streaming topology.
|
org.apache.edgent.topology.plumbing |
Plumbing for a streaming topology.
|
org.apache.edgent.topology.spi.graph | |
org.apache.edgent.window |
Window API.
|
Modifier and Type | Method and Description |
---|---|
static <T,V> TStream<T> |
Filters.deadband(TStream<T> stream,
Function<T,V> value,
Predicate<V> inBand)
Deadband filter.
|
static <T,V> TStream<T> |
Filters.deadband(TStream<T> stream,
Function<T,V> value,
Predicate<V> inBand,
long maximumSuppression,
java.util.concurrent.TimeUnit unit)
Deadband filter with maximum suppression time.
|
static <T extends java.lang.Comparable<?>> |
Range.valueOf(java.lang.String toStringValue,
Function<java.lang.String,T> fromString)
Create a Range from a String produced by toString().
|
Modifier and Type | Method and Description |
---|---|
static TStream<java.lang.String> |
FileStreams.textFileReader(TStream<java.lang.String> pathnames,
Function<java.lang.String,java.lang.String> preFn,
BiFunction<java.lang.String,java.lang.Exception,java.lang.String> postFn)
Declare a stream containing the lines read from the files
whose pathnames correspond to each tuple on the
pathnames
stream. |
Modifier and Type | Method and Description |
---|---|
static TStream<com.google.gson.JsonObject> |
HttpStreams.deleteJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri)
Make an HTTP DELETE request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.getJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri)
Make an HTTP GET request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.postJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri,
UnaryOperator<com.google.gson.JsonObject> body)
Make an HTTP POST request with JsonObject.
|
static TStream<com.google.gson.JsonObject> |
HttpStreams.putJson(TStream<com.google.gson.JsonObject> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<com.google.gson.JsonObject,java.lang.String> uri,
UnaryOperator<com.google.gson.JsonObject> body)
Make an HTTP PUT request with JsonObject.
|
static <T,R> TStream<R> |
HttpStreams.requests(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request for each tuple on a stream.
|
static <T,R> TStream<R> |
HttpStreams.requests(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request for each tuple on a stream.
|
static <T,R> TStream<R> |
HttpStreams.requestsWithBody(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
Function<T,org.apache.http.HttpEntity> body,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request with body for each tuple.
|
static <T,R> TStream<R> |
HttpStreams.requestsWithBody(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
Function<T,org.apache.http.HttpEntity> body,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request with body for each tuple.
|
static <T,R> TStream<R> |
HttpStreams.requestsWithBody(TStream<T> stream,
Supplier<org.apache.http.impl.client.CloseableHttpClient> clientCreator,
Function<T,java.lang.String> method,
Function<T,java.lang.String> uri,
Function<T,org.apache.http.HttpEntity> body,
BiFunction<T,org.apache.http.client.methods.CloseableHttpResponse,R> response)
Make an HTTP request with body for each tuple.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
IotDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos)
Publish a stream's tuples as device events.
|
TSink<com.google.gson.JsonObject> |
IotDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos)
Publish a stream's tuples as device events.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
IotpDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos)
Publish a stream's tuples as device events.
|
TSink<com.google.gson.JsonObject> |
IotpDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos)
Publish a stream's tuples as device events.
|
Modifier and Type | Method and Description |
---|---|
<T> TSink<T> |
KafkaProducer.publish(TStream<T> stream,
Function<T,java.lang.String> keyFn,
Function<T,java.lang.String> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified partitions of the specified topics.
|
<T> TSink<T> |
KafkaProducer.publish(TStream<T> stream,
Function<T,java.lang.String> keyFn,
Function<T,java.lang.String> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified partitions of the specified topics.
|
<T> TSink<T> |
KafkaProducer.publish(TStream<T> stream,
Function<T,java.lang.String> keyFn,
Function<T,java.lang.String> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified partitions of the specified topics.
|
<T> TSink<T> |
KafkaProducer.publish(TStream<T> stream,
Function<T,java.lang.String> keyFn,
Function<T,java.lang.String> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified partitions of the specified topics.
|
<T> TSink<T> |
KafkaProducer.publishBytes(TStream<T> stream,
Function<T,byte[]> keyFn,
Function<T,byte[]> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified topic partitions.
|
<T> TSink<T> |
KafkaProducer.publishBytes(TStream<T> stream,
Function<T,byte[]> keyFn,
Function<T,byte[]> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified topic partitions.
|
<T> TSink<T> |
KafkaProducer.publishBytes(TStream<T> stream,
Function<T,byte[]> keyFn,
Function<T,byte[]> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified topic partitions.
|
<T> TSink<T> |
KafkaProducer.publishBytes(TStream<T> stream,
Function<T,byte[]> keyFn,
Function<T,byte[]> valueFn,
Function<T,java.lang.String> topicFn,
Function<T,java.lang.Integer> partitionFn)
Publish the stream of tuples as Kafka key/value records
to the specified topic partitions.
|
<T> TStream<T> |
KafkaConsumer.subscribe(Function<KafkaConsumer.StringConsumerRecord,T> toTupleFn,
java.lang.String... topics)
Subscribe to the specified topics and yield a stream of tuples
from the published Kafka records.
|
<T> TStream<T> |
KafkaConsumer.subscribeBytes(Function<KafkaConsumer.ByteConsumerRecord,T> toTupleFn,
java.lang.String... topics)
Subscribe to the specified topics and yield a stream of tuples
from the published Kafka records.
|
Modifier and Type | Method and Description |
---|---|
<T> TSink<T> |
MqttStreams.publish(TStream<T> stream,
Function<T,java.lang.String> topic,
Function<T,byte[]> payload,
Function<T,java.lang.Integer> qos,
Function<T,java.lang.Boolean> retain)
Publish a stream's tuples as MQTT messages.
|
<T> TSink<T> |
MqttStreams.publish(TStream<T> stream,
Function<T,java.lang.String> topic,
Function<T,byte[]> payload,
Function<T,java.lang.Integer> qos,
Function<T,java.lang.Boolean> retain)
Publish a stream's tuples as MQTT messages.
|
<T> TSink<T> |
MqttStreams.publish(TStream<T> stream,
Function<T,java.lang.String> topic,
Function<T,byte[]> payload,
Function<T,java.lang.Integer> qos,
Function<T,java.lang.Boolean> retain)
Publish a stream's tuples as MQTT messages.
|
<T> TSink<T> |
MqttStreams.publish(TStream<T> stream,
Function<T,java.lang.String> topic,
Function<T,byte[]> payload,
Function<T,java.lang.Integer> qos,
Function<T,java.lang.Boolean> retain)
Publish a stream's tuples as MQTT messages.
|
Modifier and Type | Method and Description |
---|---|
TSink<com.google.gson.JsonObject> |
MqttDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos) |
TSink<com.google.gson.JsonObject> |
MqttDevice.events(TStream<com.google.gson.JsonObject> stream,
Function<com.google.gson.JsonObject,java.lang.String> eventId,
UnaryOperator<com.google.gson.JsonObject> payload,
Function<com.google.gson.JsonObject,java.lang.Integer> qos) |
Modifier and Type | Method and Description |
---|---|
<T> Supplier<T> |
SerialDevice.getSource(Function<SerialPort,T> driver)
Create a function that can be used to source a
stream from a serial port device.
|
Modifier and Type | Interface and Description |
---|---|
interface |
UnaryOperator<T>
Function that returns the same type as its argument.
|
Modifier and Type | Method and Description |
---|---|
static <T,R> Function<T,R> |
Functions.synchronizedFunction(Function<T,R> function)
Return a thread-safe version of a
Function function. |
static <T> Function<T,java.lang.Integer> |
Functions.unpartitioned()
Returns a constant function that returns zero (0).
|
static <T> Function<T,java.lang.Integer> |
Functions.zero()
Returns a constant function that returns zero (0).
|
Modifier and Type | Method and Description |
---|---|
static <T,R> Function<T,R> |
Functions.synchronizedFunction(Function<T,R> function)
Return a thread-safe version of a
Function function. |
Constructor and Description |
---|
FlatMap(Function<I,java.lang.Iterable<O>> function) |
Map(Function<I,O> function) |
Constructor and Description |
---|
PressureReliever(int count,
Function<T,K> keyFunction)
Pressure reliever that maintains up to
count most recent tuples per key. |
Constructor and Description |
---|
IotProvider(Function<Topology,IotDevice> iotDeviceCreator)
Create an
IotProvider that uses its own DirectProvider . |
IotProvider(java.lang.String name,
DirectProvider provider,
Function<Topology,IotDevice> iotDeviceCreator)
Create an
IotProvider that uses the passed in DirectProvider . |
IotProvider(java.lang.String name,
Function<Topology,IotDevice> iotDeviceCreator)
Create an
IotProvider that uses its own DirectProvider . |
IotProvider(java.lang.String name,
TopologyProvider provider,
DirectSubmitter<Topology,Job> submitter,
Function<Topology,IotDevice> iotDeviceCreator)
Create an
IotProvider . |
Modifier and Type | Method and Description |
---|---|
static Function<com.google.gson.JsonObject,java.lang.String> |
JsonTuples.keyFn()
The partition key function for wrapped sensor samples.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
Options.addHandler(java.lang.String opt,
Function<java.lang.String,T> cvtFn) |
<T> void |
Options.addHandler(java.lang.String opt,
Function<java.lang.String,T> cvtFn,
T dflt) |
Modifier and Type | Method and Description |
---|---|
Function<T,K> |
TWindow.getKeyFunction()
Returns the key function used to map tuples to partitions.
|
Modifier and Type | Method and Description |
---|---|
<U> TStream<U> |
TStream.flatMap(Function<T,java.lang.Iterable<U>> mapper)
Declare a new stream that maps tuples from this stream into one or
more (or zero) tuples of a different type
U . |
<J,U,K> TStream<J> |
TStream.join(Function<T,K> keyer,
TWindow<U,K> window,
BiFunction<T,java.util.List<U>,J> joiner)
Join this stream with a partitioned window of type
U with key type K . |
<J,U,K> TStream<J> |
TStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner)
Join this stream with the last tuple seen on a stream of type
U
with partitioning. |
<J,U,K> TStream<J> |
TStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner)
Join this stream with the last tuple seen on a stream of type
U
with partitioning. |
<K> TWindow<T,K> |
TStream.last(int count,
Function<T,K> keyFunction)
Declare a partitioned window that continually represents the last
count
tuples on this stream for each partition. |
<K> TWindow<T,K> |
TStream.last(long time,
java.util.concurrent.TimeUnit unit,
Function<T,K> keyFunction)
Declare a partitioned window that continually represents the last
time seconds of
tuples on this stream for each partition. |
<U> TStream<U> |
TStream.map(Function<T,U> mapper)
Declare a new stream that maps (or transforms) each tuple from this stream into one
(or zero) tuple of a different type
U . |
<E extends java.lang.Enum<E>> |
TStream.split(java.lang.Class<E> enumClass,
Function<T,E> splitter)
Split a stream's tuples among
enumClass.size streams as specified by
splitter . |
Modifier and Type | Method and Description |
---|---|
static Function<com.google.gson.JsonObject,byte[]> |
JsonFunctions.asBytes()
Get the UTF-8 bytes representation of the JSON for a JsonObject.
|
static Function<com.google.gson.JsonObject,java.lang.String> |
JsonFunctions.asString()
Get the JSON for a JsonObject.
|
static Function<byte[],com.google.gson.JsonObject> |
JsonFunctions.fromBytes()
Create a new JsonObject from the UTF8 bytes representation of JSON
|
static Function<java.lang.String,com.google.gson.JsonObject> |
JsonFunctions.fromString()
Create a new JsonObject from JSON
|
Modifier and Type | Method and Description |
---|---|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrent(TStream<T> stream,
java.util.List<Function<TStream<T>,TStream<U>>> pipelines,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrentMap(TStream<T> stream,
java.util.List<Function<T,U>> mappers,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,K> TStream<T> |
PlumbingStreams.pressureReliever(TStream<T> stream,
Function<T,K> keyFunction,
int count)
Relieve pressure on upstream processing by discarding tuples.
|
Modifier and Type | Method and Description |
---|---|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrent(TStream<T> stream,
java.util.List<Function<TStream<T>,TStream<U>>> pipelines,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
static <T,U,R> TStream<R> |
PlumbingStreams.concurrentMap(TStream<T> stream,
java.util.List<Function<T,U>> mappers,
Function<java.util.List<U>,R> combiner)
Perform analytics concurrently.
|
Modifier and Type | Method and Description |
---|---|
Function<T,K> |
AbstractTWindow.getKeyFunction() |
Modifier and Type | Method and Description |
---|---|
<U> TStream<U> |
ConnectorStream.flatMap(Function<T,java.lang.Iterable<U>> mapper) |
<J,U,K> TStream<J> |
ConnectorStream.join(Function<T,K> keyer,
TWindow<U,K> twindow,
BiFunction<T,java.util.List<U>,J> joiner) |
<J,U,K> TStream<J> |
ConnectorStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner) |
<J,U,K> TStream<J> |
ConnectorStream.joinLast(Function<T,K> keyer,
TStream<U> lastStream,
Function<U,K> lastStreamKeyer,
BiFunction<T,U,J> joiner) |
<K> TWindow<T,K> |
ConnectorStream.last(int count,
Function<T,K> keyFunction) |
<K> TWindow<T,K> |
ConnectorStream.last(long time,
java.util.concurrent.TimeUnit unit,
Function<T,K> keyFunction) |
<U> TStream<U> |
ConnectorStream.map(Function<T,U> mapper) |
<E extends java.lang.Enum<E>> |
ConnectorStream.split(java.lang.Class<E> enumClass,
Function<T,E> splitter) |
Modifier and Type | Method and Description |
---|---|
Function<T,K> |
Window.getKeyFunction()
Returns the keyFunction of the window
|
Modifier and Type | Method and Description |
---|---|
static <T,K> Window<T,K,java.util.LinkedList<T>> |
Windows.lastNProcessOnInsert(int count,
Function<T,K> keyFunction)
Return a window that maintains the last
count tuples inserted
with processing triggered on every insert. |
static <T,K,L extends java.util.List<T>> |
Windows.window(BiFunction<Partition<T,K,L>,T,java.lang.Boolean> insertionPolicy,
BiConsumer<Partition<T,K,L>,T> contentsPolicy,
Consumer<Partition<T,K,L>> evictDeterminer,
BiConsumer<Partition<T,K,L>,T> triggerPolicy,
Function<T,K> keyFunction,
Supplier<L> listSupplier)
Create a window using the passed in policies.
|
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641