Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run flatc to regenerate flatbuffer java sources #46

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion java/format/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ rm -rf java/format/src
# regenerate from the .fbs files
flatc --java -o java/format/src/main/java format/*.fbs
# generate license headers
cd java
mvn compile
```

Expand All @@ -26,4 +27,4 @@ mvn compile
```bash
cd $BARRAGE_HOME
find java/format/src -type f | while read file; do git add $file; done
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ private BarrageMessageType() { }
public static final byte None = 0;
/**
* enum values 1 - 3 are reserved for future use
*/
public static final byte UNUSED_1 = 1;
public static final byte UNUSED_2 = 2;
public static final byte UNUSED_3 = 3;
/**
* for subscription parsing/management (aka DoPut, DoExchange)
*/
public static final byte BarrageSerializationOptions = 4;
Expand All @@ -33,7 +38,7 @@ private BarrageMessageType() { }
public static final byte BarrageSnapshotRequest = 7;
public static final byte BarragePublicationRequest = 8;

public static final String[] names = { "None", "", "", "", "BarrageSerializationOptions", "BarrageSubscriptionRequest", "BarrageUpdateMetadata", "BarrageSnapshotRequest", "BarragePublicationRequest", };
public static final String[] names = { "None", "UNUSED_1", "UNUSED_2", "UNUSED_3", "BarrageSerializationOptions", "BarrageSubscriptionRequest", "BarrageUpdateMetadata", "BarrageSnapshotRequest", "BarragePublicationRequest", };

public static String name(int e) { return names[e]; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,21 @@ public final class BarrageSnapshotOptions extends Table {
*/
public int maxMessageSize() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
/**
* If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded
* list / array to the first n elements, where n is the specified value. If the column value has length less than
* zero, the server will send the last n elements of the list / array. If the column value has length greater than
* the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation.
* The maximum length of any list / array to encode.
* - If zero, list lengths will not be limited.
* - If non-zero, the server will limit the length of any encoded list / array to the absolute value of the returned length.
* - If less than zero, the server will encode elements from the end of the list / array, rather than from the beginning.
*
* Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than
* the maximum number you wish to display.
*/
public int previewListLengthLimit() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
public long previewListLengthLimit() { int o = __offset(12); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }

public static int createBarrageSnapshotOptions(FlatBufferBuilder builder,
boolean useDeephavenNulls,
int batchSize,
int maxMessageSize,
int previewListLengthLimit) {
long previewListLengthLimit) {
builder.startTable(5);
BarrageSnapshotOptions.addPreviewListLengthLimit(builder, previewListLengthLimit);
BarrageSnapshotOptions.addMaxMessageSize(builder, maxMessageSize);
Expand All @@ -82,7 +85,7 @@ public static int createBarrageSnapshotOptions(FlatBufferBuilder builder,
public static void addUseDeephavenNulls(FlatBufferBuilder builder, boolean useDeephavenNulls) { builder.addBoolean(1, useDeephavenNulls, false); }
public static void addBatchSize(FlatBufferBuilder builder, int batchSize) { builder.addInt(2, batchSize, 0); }
public static void addMaxMessageSize(FlatBufferBuilder builder, int maxMessageSize) { builder.addInt(3, maxMessageSize, 0); }
public static void addPreviewListLengthLimit(FlatBufferBuilder builder, int previewListLengthLimit) { builder.addInt(4, previewListLengthLimit, 0); }
public static void addPreviewListLengthLimit(FlatBufferBuilder builder, long previewListLengthLimit) { builder.addLong(4, previewListLengthLimit, 0L); }
public static int endBarrageSnapshotOptions(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,23 @@ public final class BarrageSubscriptionOptions extends Table {
*/
public boolean columnsAsList() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
/**
* If zero, list lengths will not be limited. If greater than zero, the server will limit the length of any encoded
* list / array to the first n elements, where n is the specified value. If the column value has length less than
* zero, the server will send the last n elements of the list / array. If the column value has length greater than
* the limit, the server will encode the list up to the limit and append an arbitrary value to indicate truncation.
* The maximum length of any list / array to encode.
* - If zero, list lengths will not be limited.
* - If non-zero, the server will limit the length of any encoded list / array to the absolute value of the returned length.
* - If less than zero, the server will encode elements from the end of the list / array, rather than from the beginning.
*
* Note: The server is unable to indicate when truncation occurs. To detect truncation request one more element than
* the maximum number you wish to display.
*/
public int previewListLengthLimit() { int o = __offset(16); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
public long previewListLengthLimit() { int o = __offset(16); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }

public static int createBarrageSubscriptionOptions(FlatBufferBuilder builder,
boolean useDeephavenNulls,
int minUpdateIntervalMs,
int batchSize,
int maxMessageSize,
boolean columnsAsList,
int previewListLengthLimit) {
long previewListLengthLimit) {
builder.startTable(7);
BarrageSubscriptionOptions.addPreviewListLengthLimit(builder, previewListLengthLimit);
BarrageSubscriptionOptions.addMaxMessageSize(builder, maxMessageSize);
Expand All @@ -102,7 +105,7 @@ public static int createBarrageSubscriptionOptions(FlatBufferBuilder builder,
public static void addBatchSize(FlatBufferBuilder builder, int batchSize) { builder.addInt(3, batchSize, 0); }
public static void addMaxMessageSize(FlatBufferBuilder builder, int maxMessageSize) { builder.addInt(4, maxMessageSize, 0); }
public static void addColumnsAsList(FlatBufferBuilder builder, boolean columnsAsList) { builder.addBoolean(5, columnsAsList, false); }
public static void addPreviewListLengthLimit(FlatBufferBuilder builder, int previewListLengthLimit) { builder.addInt(6, previewListLengthLimit, 0); }
public static void addPreviewListLengthLimit(FlatBufferBuilder builder, long previewListLengthLimit) { builder.addLong(6, previewListLengthLimit, 0L); }
public static int endBarrageSubscriptionOptions(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public final class BarrageUpdateMetadata extends Table {
public int modColumnNodesLength() { int o = __offset(24); return o != 0 ? __vector_len(o) : 0; }
public io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector modColumnNodesVector() { return modColumnNodesVector(new io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector()); }
public io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector modColumnNodesVector(io.deephaven.barrage.flatbuf.BarrageModColumnMetadata.Vector obj) { int o = __offset(24); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
/**
* The current size of the table.
*/
public long tableSize() { int o = __offset(26); return o != 0 ? bb.getLong(o + bb_pos) : 0L; }

public static int createBarrageUpdateMetadata(FlatBufferBuilder builder,
long firstSeq,
Expand All @@ -137,8 +141,10 @@ public static int createBarrageUpdateMetadata(FlatBufferBuilder builder,
int removedRowsOffset,
int shiftDataOffset,
int addedRowsIncludedOffset,
int modColumnNodesOffset) {
builder.startTable(11);
int modColumnNodesOffset,
long tableSize) {
builder.startTable(12);
BarrageUpdateMetadata.addTableSize(builder, tableSize);
BarrageUpdateMetadata.addLastSeq(builder, lastSeq);
BarrageUpdateMetadata.addFirstSeq(builder, firstSeq);
BarrageUpdateMetadata.addModColumnNodes(builder, modColumnNodesOffset);
Expand All @@ -153,7 +159,7 @@ public static int createBarrageUpdateMetadata(FlatBufferBuilder builder,
return BarrageUpdateMetadata.endBarrageUpdateMetadata(builder);
}

public static void startBarrageUpdateMetadata(FlatBufferBuilder builder) { builder.startTable(11); }
public static void startBarrageUpdateMetadata(FlatBufferBuilder builder) { builder.startTable(12); }
public static void addFirstSeq(FlatBufferBuilder builder, long firstSeq) { builder.addLong(0, firstSeq, 0L); }
public static void addLastSeq(FlatBufferBuilder builder, long lastSeq) { builder.addLong(1, lastSeq, 0L); }
public static void addIsSnapshot(FlatBufferBuilder builder, boolean isSnapshot) { builder.addBoolean(2, isSnapshot, false); }
Expand Down Expand Up @@ -185,6 +191,7 @@ public static int createBarrageUpdateMetadata(FlatBufferBuilder builder,
public static void addModColumnNodes(FlatBufferBuilder builder, int modColumnNodesOffset) { builder.addOffset(10, modColumnNodesOffset, 0); }
public static int createModColumnNodesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
public static void startModColumnNodesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static void addTableSize(FlatBufferBuilder builder, long tableSize) { builder.addLong(11, tableSize, 0L); }
public static int endBarrageUpdateMetadata(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
Expand Down
Loading