-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathReplicatedLog.cs
332 lines (307 loc) · 17.1 KB
/
ReplicatedLog.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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
/*
* Copyright 2024 MASES s.r.l.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Refer to LICENSE for more information.
*/
/*
* This file is generated by MASES.JNetReflector (ver. 2.5.11.0)
* using kafka-raft-3.9.0.jar as reference
*/
using MASES.JCOBridge.C2JBridge;
namespace Org.Apache.Kafka.Raft
{
#region ReplicatedLog declaration
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html"/>
/// </summary>
public partial class ReplicatedLog : Java.Lang.AutoCloseable
{
const string _bridgeClassName = "org.apache.kafka.raft.ReplicatedLog";
/// <summary>
/// Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
/// </summary>
[global::System.Obsolete("ReplicatedLog class represents, in .NET, an instance of a JVM interface or abstract class. This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ReplicatedLog() { }
/// <summary>
/// Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
/// </summary>
[global::System.Obsolete("ReplicatedLog class represents, in .NET, an instance of a JVM interface or abstract class. This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public ReplicatedLog(params object[] args) : base(args) { }
private static readonly MASES.JCOBridge.C2JBridge.JVMInterop.IJavaType _LocalBridgeClazz = JVMBridgeBase.ClazzOf(_bridgeClassName);
private static MASES.JCOBridge.C2JBridge.JVMInterop.IJavaType LocalBridgeClazz => _LocalBridgeClazz ?? throw new global::System.InvalidOperationException($"Class {_bridgeClassName} was not found.");
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_BridgeClassName.htm"/>
/// </summary>
public override string BridgeClassName => _bridgeClassName;
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_IsBridgeAbstract.htm"/>
/// </summary>
public override bool IsBridgeAbstract => true;
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_IsBridgeCloseable.htm"/>
/// </summary>
public override bool IsBridgeCloseable => true;
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_IsBridgeInterface.htm"/>
/// </summary>
public override bool IsBridgeInterface => true;
/// <summary>
/// <see href="https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_IsBridgeStatic.htm"/>
/// </summary>
public override bool IsBridgeStatic => false;
// TODO: complete the class
}
#endregion
#region IReplicatedLog
/// <summary>
/// .NET interface for TO BE DEFINED FROM USER
/// </summary>
public partial interface IReplicatedLog : Java.Lang.IAutoCloseable
{
#region Instance methods
#endregion
#region Nested classes
#endregion
// TODO: complete the class
}
#endregion
#region ReplicatedLog implementation
public partial class ReplicatedLog : Org.Apache.Kafka.Raft.IReplicatedLog
{
#region Constructors
#endregion
#region Class/Interface conversion operators
#endregion
#region Fields
#endregion
#region Static methods
#endregion
#region Instance methods
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#deleteBeforeSnapshot-org.apache.kafka.raft.OffsetAndEpoch-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></param>
/// <returns><see cref="bool"/></returns>
public bool DeleteBeforeSnapshot(Org.Apache.Kafka.Raft.OffsetAndEpoch arg0)
{
return IExecuteWithSignature<bool>("deleteBeforeSnapshot", "(Lorg/apache/kafka/raft/OffsetAndEpoch;)Z", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#maybeClean--"/>
/// </summary>
/// <returns><see cref="bool"/></returns>
public bool MaybeClean()
{
return IExecuteWithSignature<bool>("maybeClean", "()Z");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#truncateToLatestSnapshot--"/>
/// </summary>
/// <returns><see cref="bool"/></returns>
public bool TruncateToLatestSnapshot()
{
return IExecuteWithSignature<bool>("truncateToLatestSnapshot", "()Z");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#lastFetchedEpoch--"/>
/// </summary>
/// <returns><see cref="int"/></returns>
public int LastFetchedEpoch()
{
return IExecuteWithSignature<int>("lastFetchedEpoch", "()I");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#earliestSnapshotId--"/>
/// </summary>
/// <returns><see cref="Java.Util.Optional"/></returns>
public Java.Util.Optional<Org.Apache.Kafka.Raft.OffsetAndEpoch> EarliestSnapshotId()
{
return IExecuteWithSignature<Java.Util.Optional<Org.Apache.Kafka.Raft.OffsetAndEpoch>>("earliestSnapshotId", "()Ljava/util/Optional;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#latestSnapshotId--"/>
/// </summary>
/// <returns><see cref="Java.Util.Optional"/></returns>
public Java.Util.Optional<Org.Apache.Kafka.Raft.OffsetAndEpoch> LatestSnapshotId()
{
return IExecuteWithSignature<Java.Util.Optional<Org.Apache.Kafka.Raft.OffsetAndEpoch>>("latestSnapshotId", "()Ljava/util/Optional;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#latestSnapshot--"/>
/// </summary>
/// <returns><see cref="Java.Util.Optional"/></returns>
public Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotReader> LatestSnapshot()
{
return IExecuteWithSignature<Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotReader>>("latestSnapshot", "()Ljava/util/Optional;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#readSnapshot-org.apache.kafka.raft.OffsetAndEpoch-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></param>
/// <returns><see cref="Java.Util.Optional"/></returns>
public Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotReader> ReadSnapshot(Org.Apache.Kafka.Raft.OffsetAndEpoch arg0)
{
return IExecuteWithSignature<Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotReader>>("readSnapshot", "(Lorg/apache/kafka/raft/OffsetAndEpoch;)Ljava/util/Optional;", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#createNewSnapshot-org.apache.kafka.raft.OffsetAndEpoch-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></param>
/// <returns><see cref="Java.Util.Optional"/></returns>
public Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotWriter> CreateNewSnapshot(Org.Apache.Kafka.Raft.OffsetAndEpoch arg0)
{
return IExecuteWithSignature<Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotWriter>>("createNewSnapshot", "(Lorg/apache/kafka/raft/OffsetAndEpoch;)Ljava/util/Optional;", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#createNewSnapshotUnchecked-org.apache.kafka.raft.OffsetAndEpoch-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></param>
/// <returns><see cref="Java.Util.Optional"/></returns>
public Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotWriter> CreateNewSnapshotUnchecked(Org.Apache.Kafka.Raft.OffsetAndEpoch arg0)
{
return IExecuteWithSignature<Java.Util.Optional<Org.Apache.Kafka.Snapshot.RawSnapshotWriter>>("createNewSnapshotUnchecked", "(Lorg/apache/kafka/raft/OffsetAndEpoch;)Ljava/util/Optional;", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#startOffset--"/>
/// </summary>
/// <returns><see cref="long"/></returns>
public long StartOffset()
{
return IExecuteWithSignature<long>("startOffset", "()J");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#topicPartition--"/>
/// </summary>
/// <returns><see cref="Org.Apache.Kafka.Common.TopicPartition"/></returns>
public Org.Apache.Kafka.Common.TopicPartition TopicPartition()
{
return IExecuteWithSignature<Org.Apache.Kafka.Common.TopicPartition>("topicPartition", "()Lorg/apache/kafka/common/TopicPartition;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#topicId--"/>
/// </summary>
/// <returns><see cref="Org.Apache.Kafka.Common.Uuid"/></returns>
public Org.Apache.Kafka.Common.Uuid TopicId()
{
return IExecuteWithSignature<Org.Apache.Kafka.Common.Uuid>("topicId", "()Lorg/apache/kafka/common/Uuid;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#read-long-org.apache.kafka.raft.Isolation-"/>
/// </summary>
/// <param name="arg0"><see cref="long"/></param>
/// <param name="arg1"><see cref="Org.Apache.Kafka.Raft.Isolation"/></param>
/// <returns><see cref="Org.Apache.Kafka.Raft.LogFetchInfo"/></returns>
public Org.Apache.Kafka.Raft.LogFetchInfo Read(long arg0, Org.Apache.Kafka.Raft.Isolation arg1)
{
return IExecuteWithSignature<Org.Apache.Kafka.Raft.LogFetchInfo>("read", "(JLorg/apache/kafka/raft/Isolation;)Lorg/apache/kafka/raft/LogFetchInfo;", arg0, arg1);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#endOffset--"/>
/// </summary>
/// <returns><see cref="Org.Apache.Kafka.Raft.LogOffsetMetadata"/></returns>
public Org.Apache.Kafka.Raft.LogOffsetMetadata EndOffset()
{
return IExecuteWithSignature<Org.Apache.Kafka.Raft.LogOffsetMetadata>("endOffset", "()Lorg/apache/kafka/raft/LogOffsetMetadata;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#highWatermark--"/>
/// </summary>
/// <returns><see cref="Org.Apache.Kafka.Raft.LogOffsetMetadata"/></returns>
public Org.Apache.Kafka.Raft.LogOffsetMetadata HighWatermark()
{
return IExecuteWithSignature<Org.Apache.Kafka.Raft.LogOffsetMetadata>("highWatermark", "()Lorg/apache/kafka/raft/LogOffsetMetadata;");
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#endOffsetForEpoch-int-"/>
/// </summary>
/// <param name="arg0"><see cref="int"/></param>
/// <returns><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></returns>
public Org.Apache.Kafka.Raft.OffsetAndEpoch EndOffsetForEpoch(int arg0)
{
return IExecuteWithSignature<Org.Apache.Kafka.Raft.OffsetAndEpoch>("endOffsetForEpoch", "(I)Lorg/apache/kafka/raft/OffsetAndEpoch;", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#flush-boolean-"/>
/// </summary>
/// <param name="arg0"><see cref="bool"/></param>
public void Flush(bool arg0)
{
IExecuteWithSignature("flush", "(Z)V", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#initializeLeaderEpoch-int-"/>
/// </summary>
/// <param name="arg0"><see cref="int"/></param>
public void InitializeLeaderEpoch(int arg0)
{
IExecuteWithSignature("initializeLeaderEpoch", "(I)V", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#onSnapshotFrozen-org.apache.kafka.raft.OffsetAndEpoch-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></param>
public void OnSnapshotFrozen(Org.Apache.Kafka.Raft.OffsetAndEpoch arg0)
{
IExecuteWithSignature("onSnapshotFrozen", "(Lorg/apache/kafka/raft/OffsetAndEpoch;)V", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#truncateTo-long-"/>
/// </summary>
/// <param name="arg0"><see cref="long"/></param>
public void TruncateTo(long arg0)
{
IExecuteWithSignature("truncateTo", "(J)V", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#updateHighWatermark-org.apache.kafka.raft.LogOffsetMetadata-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.LogOffsetMetadata"/></param>
public void UpdateHighWatermark(Org.Apache.Kafka.Raft.LogOffsetMetadata arg0)
{
IExecuteWithSignature("updateHighWatermark", "(Lorg/apache/kafka/raft/LogOffsetMetadata;)V", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#truncateToEndOffset-org.apache.kafka.raft.OffsetAndEpoch-"/>
/// </summary>
/// <param name="arg0"><see cref="Org.Apache.Kafka.Raft.OffsetAndEpoch"/></param>
/// <returns><see cref="long"/></returns>
public long TruncateToEndOffset(Org.Apache.Kafka.Raft.OffsetAndEpoch arg0)
{
return IExecuteWithSignature<long>("truncateToEndOffset", "(Lorg/apache/kafka/raft/OffsetAndEpoch;)J", arg0);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#validateOffsetAndEpoch-long-int-"/>
/// </summary>
/// <param name="arg0"><see cref="long"/></param>
/// <param name="arg1"><see cref="int"/></param>
/// <returns><see cref="Org.Apache.Kafka.Raft.ValidOffsetAndEpoch"/></returns>
public Org.Apache.Kafka.Raft.ValidOffsetAndEpoch ValidateOffsetAndEpoch(long arg0, int arg1)
{
return IExecuteWithSignature<Org.Apache.Kafka.Raft.ValidOffsetAndEpoch>("validateOffsetAndEpoch", "(JI)Lorg/apache/kafka/raft/ValidOffsetAndEpoch;", arg0, arg1);
}
/// <summary>
/// <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-raft/3.9.0/org/apache/kafka/raft/ReplicatedLog.html#close--"/>
/// </summary>
public void Close()
{
IExecuteWithSignature("close", "()V");
}
#endregion
#region Nested classes
#endregion
// TODO: complete the class
}
#endregion
}