1616import io .nats .client .support .JsonValue ;
1717import io .nats .client .support .JsonValueUtils ;
1818import org .jspecify .annotations .NonNull ;
19- import org .jspecify .annotations .Nullable ;
2019
21- import java .time .ZonedDateTime ;
2220import java .util .List ;
2321
24- import static io .nats .client .support .ApiConstants .*;
25- import static io .nats .client .support .JsonValueUtils .readDate ;
22+ import static io .nats .client .support .ApiConstants .GROUP ;
2623
2724/**
2825 * Status of a specific consumer priority group
2926 */
3027public class PriorityGroupState {
3128 private final String group ;
32- private final String pinnedClientId ;
33- private final ZonedDateTime pinnedTime ;
29+
30+ // TODO - PINNED CONSUMER SUPPORT
31+ // private final String pinnedClientId;
32+ // private final ZonedDateTime pinnedTime;
33+
3434
3535 static List <PriorityGroupState > optionalListOf (JsonValue vpgStates ) {
3636 return JsonValueUtils .optionalListOf (vpgStates , PriorityGroupState ::new );
3737 }
3838
3939 PriorityGroupState (JsonValue vpgState ) {
4040 group = JsonValueUtils .readString (vpgState , GROUP );
41- pinnedClientId = JsonValueUtils .readString (vpgState , PINNED_CLIENT_ID );
42- pinnedTime = readDate (vpgState , PINNED_TS );
41+ // pinnedClientId = JsonValueUtils.readString(vpgState, PINNED_CLIENT_ID);
42+ // pinnedTime = readDate(vpgState, PINNED_TS);
4343 }
4444
4545 /**
@@ -51,29 +51,30 @@ public String getGroup() {
5151 return group ;
5252 }
5353
54- /**
55- * The generated ID of the pinned client
56- * @return the id
57- */
58- @ Nullable
59- public String getPinnedClientId () {
60- return pinnedClientId ;
61- }
54+ // /**
55+ // * The generated ID of the pinned client
56+ // * @return the id
57+ // */
58+ // @Nullable
59+ // public String getPinnedClientId() {
60+ // return pinnedClientId;
61+ // }
6262
63- /**
64- * The timestamp when the client was pinned
65- * @return the timestamp
66- */
67- public ZonedDateTime getPinnedTime () {
68- return pinnedTime ;
69- }
63+ // /**
64+ // * The timestamp when the client was pinned
65+ // * @return the timestamp
66+ // */
67+ // @Nullable
68+ // public ZonedDateTime getPinnedTime() {
69+ // return pinnedTime;
70+ // }
7071
7172 @ Override
7273 public String toString () {
7374 return "PriorityGroupState{" +
7475 "group='" + group + '\'' +
75- ", pinnedClientId='" + pinnedClientId + '\'' +
76- ", pinnedTime=" + pinnedTime +
76+ // ", pinnedClientId='" + pinnedClientId + '\'' +
77+ // ", pinnedTime=" + pinnedTime +
7778 '}' ;
7879 }
7980}
0 commit comments