Package io.deephaven.extensions.barrage
Class TransportCompressionAttribute
java.lang.Object
io.deephaven.extensions.barrage.TransportCompressionAttribute
Sets the
Table.TRANSPORT_COMPRESSION_ATTRIBUTE of a table, rollup table or tree table, which allows the
server to compress its Barrage snapshots and subscriptions, or removes it, so that the server's default compression
types apply.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AttributeMap<T>>
TresetCompression(T grid) Returns a copy ofgridwithout aTable.TRANSPORT_COMPRESSION_ATTRIBUTE, which undoeswithCompression: the server compresses the result's Barrage snapshots and subscriptions with its default compression types, from theTransportCompression.defaultTypesproperty, and does not compress them when that property is unset.static <T extends AttributeMap<T>>
TwithCompression(T grid, @NotNull String... preference) Returns a copy ofgridthat allows the server to compress its Barrage snapshots and subscriptions withpreference: the names ofsupportedcompression types, such as the built-in"zstd","gzip","snappy"and"deflate".static <T extends AttributeMap<T>>
TwithCompression(T grid, @NotNull List<String> preference) LikewithCompression(AttributeMap, String...), with the compression type names in a list.
-
Method Details
-
withCompression
public static <T extends AttributeMap<T>> T withCompression(@NotNull T grid, @NotNull @NotNull String... preference) Returns a copy ofgridthat allows the server to compress its Barrage snapshots and subscriptions withpreference: the names ofsupportedcompression types, such as the built-in"zstd","gzip","snappy"and"deflate". Case and surrounding whitespace are ignored. The server uses the first type inpreferencethat the client accepts, and sends uncompressed data when none match. Repeated types keep their first position. With no types, the result is never compressed, even when the server has default compression types;resetCompression(AttributeMap)returns to those instead.- Parameters:
grid- the table, rollup table or tree table to compresspreference- the names of the compression types to allow, most preferred first- Returns:
- a copy of
gridwith itsTable.TRANSPORT_COMPRESSION_ATTRIBUTEset, to an empty list ifpreferenceis empty - Throws:
IllegalArgumentException- if a name is not a supported compression typeNullPointerException- ifpreferenceor one of its names isnull
-
withCompression
public static <T extends AttributeMap<T>> T withCompression(@NotNull T grid, @NotNull @NotNull List<String> preference) LikewithCompression(AttributeMap, String...), with the compression type names in a list.- Parameters:
grid- the table, rollup table or tree table to compresspreference- the names of the compression types to allow, most preferred first- Returns:
- a copy of
gridwith itsTable.TRANSPORT_COMPRESSION_ATTRIBUTEset, to an empty list ifpreferenceis empty - Throws:
IllegalArgumentException- if a name is not a supported compression typeNullPointerException- ifpreferenceor one of its names isnull
-
resetCompression
Returns a copy ofgridwithout aTable.TRANSPORT_COMPRESSION_ATTRIBUTE, which undoeswithCompression: the server compresses the result's Barrage snapshots and subscriptions with its default compression types, from theTransportCompression.defaultTypesproperty, and does not compress them when that property is unset.- Parameters:
grid- the table, rollup table or tree table- Returns:
- a copy of
gridwithout aTable.TRANSPORT_COMPRESSION_ATTRIBUTE
-