Class RedisTransport
java.lang.Object
com.iantapply.orchestra.adapter.redis.RedisTransport
- All Implemented Interfaces:
com.iantapply.orchestra.port.NetworkTransport, AutoCloseable
public final class RedisTransport
extends Object
implements com.iantapply.orchestra.port.NetworkTransport
Redis Pub/Sub transport with daemon subscription threads and reconnect handling.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.iantapply.orchestra.port.NetworkTransport
com.iantapply.orchestra.port.NetworkTransport.Subscription -
Constructor Summary
ConstructorsConstructorDescriptionRedisTransport(URI uri, String namespace) Creates a Redis Pub/Sub transport.RedisTransport(URI uri, String namespace, Consumer<String> failureCounter) Creates a Redis transport with an operational failure counter sink. -
Method Summary
-
Constructor Details
-
RedisTransport
-
RedisTransport
-
-
Method Details
-
publish
- Specified by:
publishin interfacecom.iantapply.orchestra.port.NetworkTransport
-
subscribe
-
isReachable
public boolean isReachable()Checks whether Redis accepts a short authenticated PING request.- Returns:
truewhen Redis replies with PONG
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacecom.iantapply.orchestra.port.NetworkTransport
-