This repository has been archived by the owner on May 25, 2021. It is now read-only.
/
TimedOutException.cs
183 lines (169 loc) · 4.73 KB
/
TimedOutException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
using System;
using System.Text;
using FluentCassandra.Thrift;
using FluentCassandra.Thrift.Protocol;
namespace FluentCassandra.Apache.Cassandra
{
/// <summary>
/// RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large.
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public partial class TimedOutException : TException, TBase
{
private int _acknowledged_by;
private bool _acknowledged_by_batchlog;
private bool _paxos_in_progress;
/// <summary>
/// if a write operation was acknowledged by some replicas but not by enough to
/// satisfy the required ConsistencyLevel, the number of successful
/// replies will be given here. In case of atomic_batch_mutate method this field
/// will be set to -1 if the batch was written to the batchlog and to 0 if it wasn't.
/// </summary>
public int Acknowledged_by
{
get
{
return _acknowledged_by;
}
set
{
__isset.acknowledged_by = true;
this._acknowledged_by = value;
}
}
/// <summary>
/// in case of atomic_batch_mutate method this field tells if the batch
/// was written to the batchlog.
/// </summary>
public bool Acknowledged_by_batchlog
{
get
{
return _acknowledged_by_batchlog;
}
set
{
__isset.acknowledged_by_batchlog = true;
this._acknowledged_by_batchlog = value;
}
}
/// <summary>
/// for the CAS method, this field tells if we timed out during the paxos
/// protocol, as opposed to during the commit of our update
/// </summary>
public bool Paxos_in_progress
{
get
{
return _paxos_in_progress;
}
set
{
__isset.paxos_in_progress = true;
this._paxos_in_progress = value;
}
}
public Isset __isset;
#if !SILVERLIGHT
[Serializable]
#endif
public struct Isset {
public bool acknowledged_by;
public bool acknowledged_by_batchlog;
public bool paxos_in_progress;
}
public TimedOutException() {
}
public void Read (TProtocol iprot)
{
TField field;
iprot.ReadStructBegin();
while (true)
{
field = iprot.ReadFieldBegin();
if (field.Type == TType.Stop) {
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.I32) {
Acknowledged_by = iprot.ReadI32();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 2:
if (field.Type == TType.Bool) {
Acknowledged_by_batchlog = iprot.ReadBool();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
case 3:
if (field.Type == TType.Bool) {
Paxos_in_progress = iprot.ReadBool();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
}
iprot.ReadFieldEnd();
}
iprot.ReadStructEnd();
}
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("TimedOutException");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.acknowledged_by) {
field.Name = "acknowledged_by";
field.Type = TType.I32;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Acknowledged_by);
oprot.WriteFieldEnd();
}
if (__isset.acknowledged_by_batchlog) {
field.Name = "acknowledged_by_batchlog";
field.Type = TType.Bool;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteBool(Acknowledged_by_batchlog);
oprot.WriteFieldEnd();
}
if (__isset.paxos_in_progress) {
field.Name = "paxos_in_progress";
field.Type = TType.Bool;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteBool(Paxos_in_progress);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
public override string ToString() {
StringBuilder sb = new StringBuilder("TimedOutException(");
sb.Append("Acknowledged_by: ");
sb.Append(Acknowledged_by);
sb.Append(",Acknowledged_by_batchlog: ");
sb.Append(Acknowledged_by_batchlog);
sb.Append(",Paxos_in_progress: ");
sb.Append(Paxos_in_progress);
sb.Append(")");
return sb.ToString();
}
}
}