public class Sinks extends ModuleFixture
Constructor and Description |
---|
Sinks(XdEnvironment environment)
Initializes the instance with xdEnvironment
|
Modifier and Type | Method and Description |
---|---|
SimpleCounterSink |
counterSink(java.lang.String name)
Constructs a Counter Sink for capturing count metrics.
|
SimpleFileSink |
file()
Construct a new fileSink that will write the result to the xd output directory using the stream name as the
filename.
|
SimpleFileSink |
file(java.lang.String dir,
java.lang.String fileName)
Construct a new fileSink that will write the result to the dir and filename specified.
|
GemFireServerSink |
gemfireServer(java.lang.String region)
Construct a new GemfireServer sink.
|
HdfsSink |
hdfs()
Constructs a hdfs sink with a directory of /xd/acceptancetest & a file name of ACCTEST
|
JdbcSink |
jdbc()
Construct a new jdbcSink that will write the output to a table .
|
KafkaSink |
kafkaSink()
Constructs a new
KafkaSink |
LogSink |
log()
Construct a new logSink that will write output to the XD log.
|
MqttSink |
mqtt()
Construct a new Mqttsink using the default RabbitMQ (MQTT-enbaled) broker host as specified in the environment.
|
RabbitSink |
rabbit(java.lang.String routingKey)
Construct a new rabbitSink that will push messages to rabbit broker.
|
TcpSink |
tcp()
Construct a new TcpSink with the default target host taken from the environment and default port (1234)
|
TcpSink |
tcp(int port)
Construct a new TcpSink with the default target host taken from the environment and the provided port.
|
TcpSink |
tcp(java.lang.String host)
Construct a new TcpSink with the target host and the default port.
|
TcpSink |
tcpSink()
Construct a new TcpSink with the target host resolved at runtime from the default stream name.
|
getContainerResolver, setContainerResolver
public Sinks(XdEnvironment environment)
environment
- public TcpSink tcp()
public TcpSink tcp(java.lang.String host)
host
- the host the where the tcp sink will connect topublic TcpSink tcpSink()
public TcpSink tcp(int port)
port
- the port to connect topublic MqttSink mqtt()
public SimpleFileSink file(java.lang.String dir, java.lang.String fileName)
dir
- the directory the file will be written.fileName
- the name of file to be written.public SimpleFileSink file()
public LogSink log()
public JdbcSink jdbc()
public HdfsSink hdfs()
public RabbitSink rabbit(java.lang.String routingKey)
public GemFireServerSink gemfireServer(java.lang.String region)
region
- the name of the region bound to this sinkGemFireServerSink
public SimpleCounterSink counterSink(java.lang.String name)
name
- The identifier for the results in the metrics storeSimpleCounterSink