|
1
|
|
|
<?php |
|
2
|
|
|
# Generated by the protocol buffer compiler. DO NOT EDIT! |
|
3
|
|
|
# source: ledger/rwset/kvrwset/kv_rwset.proto |
|
4
|
|
|
|
|
5
|
|
|
namespace Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet; |
|
6
|
|
|
|
|
7
|
|
|
use Google\Protobuf\Internal\GPBType; |
|
8
|
|
|
use Google\Protobuf\Internal\RepeatedField; |
|
9
|
|
|
use Google\Protobuf\Internal\GPBUtil; |
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* RangeQueryInfo encapsulates the details of a range query performed by a transaction during simulation. |
|
13
|
|
|
* This helps protect transactions from phantom reads by varifying during validation whether any new items |
|
14
|
|
|
* got committed within the given range between transaction simuation and validation |
|
15
|
|
|
* (in addition to regular checks for updates/deletes of the existing items). |
|
16
|
|
|
* readInfo field contains either the KVReads (for the items read by the range query) or a merkle-tree hash |
|
17
|
|
|
* if the KVReads exceeds a pre-configured numbers |
|
18
|
|
|
* |
|
19
|
|
|
* Generated from protobuf message <code>kvrwset.RangeQueryInfo</code> |
|
20
|
|
|
*/ |
|
21
|
|
|
class RangeQueryInfo extends \Google\Protobuf\Internal\Message |
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* Generated from protobuf field <code>string start_key = 1;</code> |
|
25
|
|
|
*/ |
|
26
|
|
|
private $start_key = ''; |
|
27
|
|
|
/** |
|
28
|
|
|
* Generated from protobuf field <code>string end_key = 2;</code> |
|
29
|
|
|
*/ |
|
30
|
|
|
private $end_key = ''; |
|
31
|
|
|
/** |
|
32
|
|
|
* Generated from protobuf field <code>bool itr_exhausted = 3;</code> |
|
33
|
|
|
*/ |
|
34
|
|
|
private $itr_exhausted = false; |
|
35
|
|
|
protected $reads_info; |
|
36
|
|
|
|
|
37
|
|
|
public function __construct() { |
|
38
|
|
|
\GPBMetadata\Ledger\Rwset\Kvrwset\KvRwset::initOnce(); |
|
39
|
|
|
parent::__construct(); |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* Generated from protobuf field <code>string start_key = 1;</code> |
|
44
|
|
|
* @return string |
|
45
|
|
|
*/ |
|
46
|
|
|
public function getStartKey() |
|
47
|
|
|
{ |
|
48
|
|
|
return $this->start_key; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* Generated from protobuf field <code>string start_key = 1;</code> |
|
53
|
|
|
* @param string $var |
|
54
|
|
|
* @return $this |
|
55
|
|
|
*/ |
|
56
|
|
|
public function setStartKey($var) |
|
57
|
|
|
{ |
|
58
|
|
|
GPBUtil::checkString($var, True); |
|
59
|
|
|
$this->start_key = $var; |
|
60
|
|
|
|
|
61
|
|
|
return $this; |
|
62
|
|
|
} |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* Generated from protobuf field <code>string end_key = 2;</code> |
|
66
|
|
|
* @return string |
|
67
|
|
|
*/ |
|
68
|
|
|
public function getEndKey() |
|
69
|
|
|
{ |
|
70
|
|
|
return $this->end_key; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* Generated from protobuf field <code>string end_key = 2;</code> |
|
75
|
|
|
* @param string $var |
|
76
|
|
|
* @return $this |
|
77
|
|
|
*/ |
|
78
|
|
|
public function setEndKey($var) |
|
79
|
|
|
{ |
|
80
|
|
|
GPBUtil::checkString($var, True); |
|
81
|
|
|
$this->end_key = $var; |
|
82
|
|
|
|
|
83
|
|
|
return $this; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* Generated from protobuf field <code>bool itr_exhausted = 3;</code> |
|
88
|
|
|
* @return bool |
|
89
|
|
|
*/ |
|
90
|
|
|
public function getItrExhausted() |
|
91
|
|
|
{ |
|
92
|
|
|
return $this->itr_exhausted; |
|
93
|
|
|
} |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* Generated from protobuf field <code>bool itr_exhausted = 3;</code> |
|
97
|
|
|
* @param bool $var |
|
98
|
|
|
* @return $this |
|
99
|
|
|
*/ |
|
100
|
|
|
public function setItrExhausted($var) |
|
101
|
|
|
{ |
|
102
|
|
|
GPBUtil::checkBool($var); |
|
103
|
|
|
$this->itr_exhausted = $var; |
|
104
|
|
|
|
|
105
|
|
|
return $this; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* Generated from protobuf field <code>.kvrwset.QueryReads raw_reads = 4;</code> |
|
110
|
|
|
* @return \Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet\QueryReads |
|
111
|
|
|
*/ |
|
112
|
|
|
public function getRawReads() |
|
113
|
|
|
{ |
|
114
|
|
|
return $this->readOneof(4); |
|
115
|
|
|
} |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* Generated from protobuf field <code>.kvrwset.QueryReads raw_reads = 4;</code> |
|
119
|
|
|
* @param \Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet\QueryReads $var |
|
120
|
|
|
* @return $this |
|
121
|
|
|
*/ |
|
122
|
|
|
public function setRawReads($var) |
|
123
|
|
|
{ |
|
124
|
|
|
GPBUtil::checkMessage($var, \Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet\QueryReads::class); |
|
125
|
|
|
$this->writeOneof(4, $var); |
|
126
|
|
|
|
|
127
|
|
|
return $this; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
/** |
|
131
|
|
|
* Generated from protobuf field <code>.kvrwset.QueryReadsMerkleSummary reads_merkle_hashes = 5;</code> |
|
132
|
|
|
* @return \Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet\QueryReadsMerkleSummary |
|
133
|
|
|
*/ |
|
134
|
|
|
public function getReadsMerkleHashes() |
|
135
|
|
|
{ |
|
136
|
|
|
return $this->readOneof(5); |
|
137
|
|
|
} |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* Generated from protobuf field <code>.kvrwset.QueryReadsMerkleSummary reads_merkle_hashes = 5;</code> |
|
141
|
|
|
* @param \Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet\QueryReadsMerkleSummary $var |
|
142
|
|
|
* @return $this |
|
143
|
|
|
*/ |
|
144
|
|
|
public function setReadsMerkleHashes($var) |
|
145
|
|
|
{ |
|
146
|
|
|
GPBUtil::checkMessage($var, \Hyperledger\Fabric\Protos\Ledger\RWSet\KVRWSet\QueryReadsMerkleSummary::class); |
|
147
|
|
|
$this->writeOneof(5, $var); |
|
148
|
|
|
|
|
149
|
|
|
return $this; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* @return string |
|
154
|
|
|
*/ |
|
155
|
|
|
public function getReadsInfo() |
|
156
|
|
|
{ |
|
157
|
|
|
return $this->whichOneof("reads_info"); |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
} |
|
161
|
|
|
|
|
162
|
|
|
|