-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cem Asma
authored and
Cem Asma
committed
Mar 1, 2024
1 parent
3dfa82d
commit 03ee2c1
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,47 @@ | ||
package redis.clients.jedis.resps; | ||
|
||
import redis.clients.jedis.Builder; | ||
|
||
import java.util.List; | ||
|
||
import static redis.clients.jedis.BuilderFactory.LONG; | ||
import static redis.clients.jedis.BuilderFactory.STRING_LIST; | ||
|
||
public class TrackingInfo { | ||
|
||
private final List<String> flags; | ||
private final long redirect; | ||
private final List<String> prefixes; | ||
|
||
public TrackingInfo(List<String> flags, long redirect, List<String> prefixes) { | ||
this.flags = flags; | ||
this.redirect = redirect; | ||
this.prefixes = prefixes; | ||
} | ||
|
||
|
||
public List<String> getFlags() { | ||
return flags; | ||
} | ||
|
||
public long getRedirect() { | ||
return redirect; | ||
} | ||
|
||
public List<String> getPrefixes() { | ||
return prefixes; | ||
} | ||
|
||
public static final Builder<TrackingInfo> TRACKING_INFO_BUILDER = new Builder<TrackingInfo>() { | ||
@Override | ||
public TrackingInfo build(Object data) { | ||
List<Object> commandData = (List<Object>) data; | ||
|
||
List<String> flags = STRING_LIST.build(commandData.get(1)); | ||
long redirect = LONG.build(commandData.get(3)); | ||
List<String> prefixes = STRING_LIST.build(commandData.get(5)); | ||
|
||
return new TrackingInfo(flags, redirect, prefixes); | ||
} | ||
}; | ||
} |
This file contains 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