From 7a0a1bba3eb1f28f5460ae871dfb4721d02fc0c8 Mon Sep 17 00:00:00 2001 From: Florian Duderstadt Date: Mon, 18 Nov 2024 11:49:52 +0100 Subject: [PATCH] generalize SaeWriter --- java/src/main/java/de/starwit/pipeline/SaeWriter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/src/main/java/de/starwit/pipeline/SaeWriter.java b/java/src/main/java/de/starwit/pipeline/SaeWriter.java index b2af2a7..5e0d633 100644 --- a/java/src/main/java/de/starwit/pipeline/SaeWriter.java +++ b/java/src/main/java/de/starwit/pipeline/SaeWriter.java @@ -7,7 +7,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import de.starwit.visionapi.Sae.SaeMessage; +import com.google.protobuf.GeneratedMessage; + import redis.clients.jedis.JedisPooled; import redis.clients.jedis.exceptions.JedisConnectionException; import redis.clients.jedis.params.XAddParams; @@ -33,7 +34,7 @@ public SaeWriter(String host, int port) { * @param maxLen Limit the stream length to {@code maxLen} messages (old messages are discarded accordingly) * @throws RedisConnectionNotAvailableException */ - public void write(String streamKey, SaeMessage message, int maxLen) throws RedisConnectionNotAvailableException { + public void write(String streamKey, GeneratedMessage message, int maxLen) throws RedisConnectionNotAvailableException { XAddParams xAddParams = new XAddParams().maxLen(maxLen); try { byte[] messagePayload = Base64.getEncoder().encode(message.toByteArray());