public abstract static class RedisIO.WriteStreams
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>>,org.apache.beam.sdk.values.PDone>
PTransform to write stream key pairs (https://redis.io/topics/streams-intro) to a
Redis server.| Constructor and Description |
|---|
WriteStreams() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PDone |
expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>> input) |
RedisIO.WriteStreams |
withApproximateTrim(boolean approximateTrim)
If
withMaxLen(long) is used, set the "~" prefix to the MAXLEN value, indicating to
the server that it should use "close enough" trimming. |
RedisIO.WriteStreams |
withAuth(java.lang.String auth)
Use the redis AUTH command when connecting to the server; the format of the string can be
either just a password or a username and password separated by a space.
|
RedisIO.WriteStreams |
withConnectionConfiguration(RedisConnectionConfiguration connection)
Predefine a
RedisConnectionConfiguration and pass it to the builder. |
RedisIO.WriteStreams |
withEndpoint(java.lang.String host,
int port)
Set the hostname and port of the Redis server to connect to.
|
RedisIO.WriteStreams |
withMaxLen(long maxLen)
When appending (XADD) to a stream, set a MAXLEN option.
|
RedisIO.WriteStreams |
withTimeout(int timeout)
Set the connection timeout for the Redis server connection.
|
public RedisIO.WriteStreams withEndpoint(java.lang.String host, int port)
public RedisIO.WriteStreams withAuth(java.lang.String auth)
public RedisIO.WriteStreams withTimeout(int timeout)
public RedisIO.WriteStreams withConnectionConfiguration(RedisConnectionConfiguration connection)
RedisConnectionConfiguration and pass it to the builder.public RedisIO.WriteStreams withMaxLen(long maxLen)
public RedisIO.WriteStreams withApproximateTrim(boolean approximateTrim)
withMaxLen(long) is used, set the "~" prefix to the MAXLEN value, indicating to
the server that it should use "close enough" trimming.public org.apache.beam.sdk.values.PDone expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>>,org.apache.beam.sdk.values.PDone>