forked from tikv/client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCDCConfig.java
More file actions
41 lines (31 loc) · 984 Bytes
/
CDCConfig.java
File metadata and controls
41 lines (31 loc) · 984 Bytes
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
package org.tikv.cdc;
import org.tikv.kvproto.Kvrpcpb;
public class CDCConfig {
private static final int EVENT_BUFFER_SIZE = 50000;
private static final int MAX_ROW_KEY_SIZE = 10240;
private static final boolean READ_OLD_VALUE = true;
private int eventBufferSize = EVENT_BUFFER_SIZE;
private int maxRowKeySize = MAX_ROW_KEY_SIZE;
private boolean readOldValue = READ_OLD_VALUE;
public void setEventBufferSize(final int bufferSize) {
eventBufferSize = bufferSize;
}
public void setMaxRowKeySize(final int rowKeySize) {
maxRowKeySize = rowKeySize;
}
public void setReadOldValue(final boolean value) {
readOldValue = value;
}
public int getEventBufferSize() {
return eventBufferSize;
}
public int getMaxRowKeySize() {
return maxRowKeySize;
}
public boolean getReadOldValue() {
return readOldValue;
}
Kvrpcpb.ExtraOp getExtraOp() {
return readOldValue ? Kvrpcpb.ExtraOp.ReadOldValue : Kvrpcpb.ExtraOp.Noop;
}
}