Package org.apache.beam.sdk.io.redis
Class RedisConnectionConfiguration
- java.lang.Object
-
- org.apache.beam.sdk.io.redis.RedisConnectionConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
public abstract class RedisConnectionConfiguration extends java.lang.Object implements java.io.Serializable
RedisConnectionConfiguration
describes and wraps a connectionConfiguration to Redis server or cluster.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RedisConnectionConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description redis.clients.jedis.Jedis
connect()
Connect to the Redis instance.static RedisConnectionConfiguration
create()
static RedisConnectionConfiguration
create(java.lang.String host, int port)
static RedisConnectionConfiguration
create(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host, org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
RedisConnectionConfiguration
enableSSL()
Enable SSL connection to Redis server.void
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
Populate the display data with connectionConfiguration details.RedisConnectionConfiguration
withAuth(java.lang.String auth)
Define the password to authenticate on the Redis server.RedisConnectionConfiguration
withAuth(org.apache.beam.sdk.options.ValueProvider<java.lang.String> auth)
SeewithAuth(String)
.RedisConnectionConfiguration
withHost(java.lang.String host)
Define the host name of the Redis server.RedisConnectionConfiguration
withHost(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host)
SeewithHost(String)
.RedisConnectionConfiguration
withPort(int port)
Define the port number of the Redis server.RedisConnectionConfiguration
withPort(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
SeewithPort(int)
.RedisConnectionConfiguration
withSSL(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> ssl)
Define if a SSL connection to Redis server should be used.RedisConnectionConfiguration
withTimeout(int timeout)
Define the Redis connection timeout.RedisConnectionConfiguration
withTimeout(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> timeout)
SeewithTimeout(int)
.
-
-
-
Method Detail
-
create
public static RedisConnectionConfiguration create()
-
create
public static RedisConnectionConfiguration create(java.lang.String host, int port)
-
create
public static RedisConnectionConfiguration create(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host, org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
-
withHost
public RedisConnectionConfiguration withHost(java.lang.String host)
Define the host name of the Redis server.
-
withHost
public RedisConnectionConfiguration withHost(org.apache.beam.sdk.options.ValueProvider<java.lang.String> host)
SeewithHost(String)
.
-
withPort
public RedisConnectionConfiguration withPort(int port)
Define the port number of the Redis server.
-
withPort
public RedisConnectionConfiguration withPort(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> port)
SeewithPort(int)
.
-
withAuth
public RedisConnectionConfiguration withAuth(java.lang.String auth)
Define the password to authenticate on the Redis server.
-
withAuth
public RedisConnectionConfiguration withAuth(org.apache.beam.sdk.options.ValueProvider<java.lang.String> auth)
SeewithAuth(String)
.
-
withTimeout
public RedisConnectionConfiguration withTimeout(int timeout)
Define the Redis connection timeout. A timeout of zero is interpreted as an infinite timeout.
-
withTimeout
public RedisConnectionConfiguration withTimeout(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> timeout)
SeewithTimeout(int)
.
-
enableSSL
public RedisConnectionConfiguration enableSSL()
Enable SSL connection to Redis server.
-
withSSL
public RedisConnectionConfiguration withSSL(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> ssl)
Define if a SSL connection to Redis server should be used.
-
connect
public redis.clients.jedis.Jedis connect()
Connect to the Redis instance.
-
populateDisplayData
public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
Populate the display data with connectionConfiguration details.
-
-