io.deephaven.barrage.flatbuf.BarrageSubscriptionOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of barrage-format Show documentation
Show all versions of barrage-format Show documentation
Generated Java files from the IPC Flatbuffer definitions.
The newest version!
// automatically generated by the FlatBuffers compiler, do not modify
package io.deephaven.barrage.flatbuf;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
public final class BarrageSubscriptionOptions extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_1_12_0(); }
public static BarrageSubscriptionOptions getRootAsBarrageSubscriptionOptions(ByteBuffer _bb) { return getRootAsBarrageSubscriptionOptions(_bb, new BarrageSubscriptionOptions()); }
public static BarrageSubscriptionOptions getRootAsBarrageSubscriptionOptions(ByteBuffer _bb, BarrageSubscriptionOptions obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public BarrageSubscriptionOptions __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
/**
* see enum for details
*/
public byte columnConversionMode() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 1; }
/**
* Deephaven reserves a value in the range of primitives as a custom NULL value. This enables more efficient transmission
* by eliminating the additional complexity of the validity buffer.
*/
public boolean useDeephavenNulls() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
/**
* Explicitly set the update interval for this subscription. Note that subscriptions with different update intervals
* cannot share intermediary state with other subscriptions and greatly increases the footprint of the non-conforming subscription.
*
* Note: if not supplied (default of zero) then the server uses a consistent value to be efficient and fair to all clients
*/
public int minUpdateIntervalMs() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
/**
* Specify a preferred batch size. Server is allowed to be configured to restrict possible values. Too small of a
* batch size may be dominated with header costs as each batch is wrapped into a separate RecordBatch. Too large of
* a payload and it may not fit within the maximum payload size. A good default might be 4096.
*
* a batch_size of -1 indicates that the server should avoid batching a single logical message
*/
public int batchSize() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
/**
* Specify a maximum allowed message size. Server will enforce this limit by reducing batch size (to a lower limit
* of one row per batch). If the message size limit cannot be met due to large row sizes, the server will throw a
* `Status.RESOURCE_EXHAUSTED` exception
*/
public int maxMessageSize() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
/**
* If true, the server will wrap columns with a list. This is useful for clients that do not support modified batches
* with columns of differing lengths.
*/
public boolean columnsAsList() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; }
public static int createBarrageSubscriptionOptions(FlatBufferBuilder builder,
byte column_conversion_mode,
boolean use_deephaven_nulls,
int min_update_interval_ms,
int batch_size,
int max_message_size,
boolean columns_as_list) {
builder.startTable(6);
BarrageSubscriptionOptions.addMaxMessageSize(builder, max_message_size);
BarrageSubscriptionOptions.addBatchSize(builder, batch_size);
BarrageSubscriptionOptions.addMinUpdateIntervalMs(builder, min_update_interval_ms);
BarrageSubscriptionOptions.addColumnsAsList(builder, columns_as_list);
BarrageSubscriptionOptions.addUseDeephavenNulls(builder, use_deephaven_nulls);
BarrageSubscriptionOptions.addColumnConversionMode(builder, column_conversion_mode);
return BarrageSubscriptionOptions.endBarrageSubscriptionOptions(builder);
}
public static void startBarrageSubscriptionOptions(FlatBufferBuilder builder) { builder.startTable(6); }
public static void addColumnConversionMode(FlatBufferBuilder builder, byte columnConversionMode) { builder.addByte(0, columnConversionMode, 1); }
public static void addUseDeephavenNulls(FlatBufferBuilder builder, boolean useDeephavenNulls) { builder.addBoolean(1, useDeephavenNulls, false); }
public static void addMinUpdateIntervalMs(FlatBufferBuilder builder, int minUpdateIntervalMs) { builder.addInt(2, minUpdateIntervalMs, 0); }
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 int endBarrageSubscriptionOptions(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}
public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
public BarrageSubscriptionOptions get(int j) { return get(new BarrageSubscriptionOptions(), j); }
public BarrageSubscriptionOptions get(BarrageSubscriptionOptions obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
}