1717
1818package com .alipay .oceanbase .rpc .table ;
1919
20+ import com .alipay .oceanbase .rpc .location .model .partition .ObPair ;
2021import com .alipay .oceanbase .rpc .util .ObBytesString ;
2122import com .alipay .oceanbase .rpc .util .Serialization ;
2223import io .netty .buffer .ByteBuf ;
23- import jdk .internal .net .http .common .Pair ;
2424
2525import java .util .ArrayList ;
2626import java .util .List ;
@@ -37,7 +37,7 @@ public class ObHBaseParams extends ObKVParamsBase {
3737 private static final int FLAG_ALLOW_PARTIAL_RESULTS = 1 << 0 ;
3838 private static final int FLAG_IS_CACHE_BLOCK = 1 << 1 ;
3939 private static final int FLAG_CHECK_EXISTENCE_ONLY = 1 << 2 ;
40- List <Pair <ObBytesString , Pair <Long , Long >>> timeRangeMap = new ArrayList <>();
40+ List <ObPair <ObBytesString , ObPair <Long , Long >>> timeRangeMap = new ArrayList <>();
4141
4242
4343 public ObHBaseParams () {
@@ -121,15 +121,15 @@ public byte[] encode() {
121121 int len = Serialization .getNeedBytes (timeRangeMap .size ());
122122 System .arraycopy (Serialization .encodeVi64 (timeRangeMap .size ()), 0 , bytes , idx , len );
123123 idx += len ;
124- for (Pair <ObBytesString , Pair <Long , Long >> timeRange : timeRangeMap ) {
125- len = Serialization .getNeedBytes (timeRange .first );
126- System .arraycopy (Serialization .encodeBytesString (timeRange .first ), 0 , bytes , idx , len );
124+ for (ObPair <ObBytesString , ObPair <Long , Long >> timeRange : timeRangeMap ) {
125+ len = Serialization .getNeedBytes (timeRange .getLeft () );
126+ System .arraycopy (Serialization .encodeBytesString (timeRange .getLeft () ), 0 , bytes , idx , len );
127127 idx += len ;
128- len = Serialization .getNeedBytes (timeRange .second . first );
129- System .arraycopy (Serialization .encodeVi64 (timeRange .second . first ), 0 , bytes , idx , len );
128+ len = Serialization .getNeedBytes (timeRange .getRight (). getLeft () );
129+ System .arraycopy (Serialization .encodeVi64 (timeRange .getRight (). getLeft () ), 0 , bytes , idx , len );
130130 idx += len ;
131- len = Serialization .getNeedBytes (timeRange .second . second );
132- System .arraycopy (Serialization .encodeVi64 (timeRange .second . second ), 0 , bytes , idx , len );
131+ len = Serialization .getNeedBytes (timeRange .getRight (). getRight () );
132+ System .arraycopy (Serialization .encodeVi64 (timeRange .getRight (). getRight () ), 0 , bytes , idx , len );
133133 idx += len ;
134134 }
135135
@@ -150,7 +150,7 @@ public Object decode(ByteBuf buf) {
150150 long size = Serialization .decodeVi64 (buf );
151151 this .timeRangeMap = new ArrayList <>((int ) size );
152152 for (int i = 0 ; i < size ; i ++) {
153- this .timeRangeMap .add (new Pair <>(Serialization .decodeBytesString (buf ), new Pair <>(Serialization .decodeVi64 (buf ), Serialization .decodeVi64 (buf ))));
153+ this .timeRangeMap .add (new ObPair <>(Serialization .decodeBytesString (buf ), new ObPair <>(Serialization .decodeVi64 (buf ), Serialization .decodeVi64 (buf ))));
154154 }
155155 return this ;
156156 }
0 commit comments