1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.tikv.common.util;
19
20 import com.google.protobuf.ByteString;
21 import org.tikv.common.region.TiRegion;
22
23 public class DeleteRange {
24 private final BackOffer backOffer;
25 private final TiRegion region;
26 private final ByteString startKey;
27 private final ByteString endKey;
28
29 public DeleteRange(BackOffer backOffer, TiRegion region, ByteString startKey, ByteString endKey) {
30 this.backOffer = ConcreteBackOffer.create(backOffer);
31 this.region = region;
32 this.startKey = startKey;
33 this.endKey = endKey;
34 }
35
36 public BackOffer getBackOffer() {
37 return backOffer;
38 }
39
40 public TiRegion getRegion() {
41 return region;
42 }
43
44 public ByteString getStartKey() {
45 return startKey;
46 }
47
48 public ByteString getEndKey() {
49 return endKey;
50 }
51
52 @Override
53 public String toString() {
54 return KeyRangeUtils.makeRange(getStartKey(), getEndKey()).toString();
55 }
56 }