-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add binary stream support for XREAD and XREADGROUP (#3566) #4152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e5829f1
Add binary stream support for XREAD and XREADGROUP (#3566)
YoHanKi c82cca9
Add parameterized binary stream tests for RESP2/RESP3 in Jedis, Clust…
YoHanKi 308db55
Merge branch 'master' into feature/XREAD-support-binary
YoHanKi 88a8ff4
Switch to StreamEntryID in binary stream tests and add illegal UTF-8 …
YoHanKi 24c5510
Add Map<byte[], StreamEntryID> support and binary stream tests (#3566)
YoHanKi 6fdcf85
Modify Map<byte[], StreamEntryID> support and binary stream tests (#3…
YoHanKi 5b54a64
Add JedisByteMap implementation (#3566)
YoHanKi 7ddf39c
Add JedisByteMapTest (#3566)
YoHanKi 246123d
Changed Map<byte[], byte[]> in STREAM_ENTRY_BINARY_LIST to JedisByteH…
YoHanKi 15a01a2
Remove varargs alternatives
ggivo a2cf07e
Add xreadBinary and xreadGroupBinary methods to PipelineBase
ggivo 03f0d8b
Clean up
ggivo 15142da
Merge branch 'master' into feature/XREAD-support-binary
ggivo dc37d97
Fix BinaryStreamEntryTest test
ggivo 663c0e1
Add BinaryStreamsPipeline tests
ggivo a05d95d
Test cleanup & formating
ggivo e7ab9e0
Merge branch 'master' into feature/XREAD-support-binary
ggivo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/redis/clients/jedis/resps/StreamEntryBinary.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package redis.clients.jedis.resps; | ||
|
||
import java.io.IOException; | ||
import java.io.Serializable; | ||
import java.util.Map; | ||
import redis.clients.jedis.StreamEntryID; | ||
|
||
public class StreamEntryBinary implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private StreamEntryID id; | ||
private Map<byte[], byte[]> fields; | ||
|
||
public StreamEntryBinary(StreamEntryID id, Map<byte[], byte[]> fields) { | ||
this.id = id; | ||
this.fields = fields; | ||
} | ||
|
||
public StreamEntryID getID() { | ||
return id; | ||
} | ||
|
||
public Map<byte[], byte[]> getFields() { | ||
return fields; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return id + " " + fields; | ||
} | ||
|
||
private void writeObject(java.io.ObjectOutputStream out) throws IOException { | ||
out.writeUnshared(this.id); | ||
out.writeUnshared(this.fields); | ||
} | ||
|
||
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { | ||
this.id = (StreamEntryID) in.readUnshared(); | ||
this.fields = (Map<byte[], byte[]>) in.readUnshared(); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.