Skip to content

Commit

Permalink
generalize SaeWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
flostyl3 committed Nov 18, 2024
1 parent 62ed9a8 commit 7a0a1bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions java/src/main/java/de/starwit/pipeline/SaeWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
Expand Down

0 comments on commit 7a0a1bb

Please sign in to comment.