Package io.deephaven.engine.rowset
Class RowSetFactory
java.lang.Object
io.deephaven.engine.rowset.RowSetFactory
Repository of factory methods for constructing
row sets.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHowunion(Collection)builds its result, selected by theRowSetFactory.unionStrategyconfiguration property. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic RowSetFactory.UnionStrategyThe strategy in force, read from theRowSetFactory.unionStrategyconfiguration property as the name of aRowSetFactory.UnionStrategy, defaultRowSetFactory.UnionStrategy.RADIX. -
Method Summary
Modifier and TypeMethodDescriptionstatic RowSetBuilderRandomstatic RowSetBuilderSequentialstatic WritableRowSetempty()Get an emptyWritableRowSet.static WritableRowSetflat(long size) static WritableRowSetfromKeys(long rowKey) Produce aWritableRowSetcontaining a single row key.static WritableRowSetfromKeys(long... rowKeys) Get aWritableRowSetcontaining the specified row keys.static WritableRowSetfromRange(long firstRowKey, long lastRowKey) Create aWritableRowSetcontaining the continuous range [firstRowKey, lastRowKey], or anempty row setiflastRowKey < firstRowKey.static WritableRowSetConstruct a newWritableRowSetfrom the union ofrowSets, leaving the inputs untouched.static WritableRowSetunion(Collection<? extends RowSet> rowSets) Construct a newWritableRowSetfrom the union ofrowSets, leaving the inputs untouched.static WritableRowSetunionInsert(Collection<RowSet> rowSets) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
unionStrategy
The strategy in force, read from theRowSetFactory.unionStrategyconfiguration property as the name of aRowSetFactory.UnionStrategy, defaultRowSetFactory.UnionStrategy.RADIX. Writable so that a benchmark can compare strategies in one build.
-
-
Method Details
-
empty
Get an emptyWritableRowSet.- Returns:
- A new
WritableRowSetcontaining no rows
-
fromKeys
Get aWritableRowSetcontaining the specified row keys. Row keys must be nonnegative numbers.- Parameters:
rowKeys- The row keys to include- Returns:
- A new
WritableRowSetcontaining the specified row keys
-
fromKeys
Produce aWritableRowSetcontaining a single row key. Row keys must be nonnegative numbers.- Parameters:
rowKey- The row key to include- Returns:
- A new
WritableRowSetcontaining the specified row key
-
fromRange
Create aWritableRowSetcontaining the continuous range [firstRowKey, lastRowKey], or anempty row setiflastRowKey < firstRowKey.- Parameters:
firstRowKey- The first row key in the continuous rangelastRowKey- The last row key in the continuous range- Returns:
- A new
WritableRowSetcontaining the specified row key range
-
flat
- Parameters:
size- The size of theWritableRowSetto create- Returns:
- A flat
WritableRowSetcontaining the row key range[0, size)or anempty row setif thesize <= 0
-
builderRandom
- Returns:
- A
RowSetBuilderRandomsuitable for inserting row keys and row key ranges in no particular order
-
builderSequential
- Returns:
- A
RowSetBuilderRandomoptimized for inserting row keys and row key ranges sequentially in order
-
union
Construct a newWritableRowSetfrom the union ofrowSets, leaving the inputs untouched.The caller keeps ownership of
rowSetsand remains responsible for closing them. Considering only thenonemptyinputs: if none existempty()is returned; if exactly one exists acopyof it is returned.- Parameters:
rowSets- The row sets to union- Returns:
- A new
WritableRowSetcontaining every row key inrowSets
-
union
Construct a newWritableRowSetfrom the union ofrowSets, leaving the inputs untouched.The array itself is not reordered. See
union(Collection)for the ownership and result contract.- Parameters:
rowSets- The row sets to union- Returns:
- A new
WritableRowSetcontaining every row key inrowSets
-
unionInsert
Deprecated, for removal: This API element is subject to removal in a future version.Useunion(Collection).Constructs a new combinedWritableRowSetfrom the union ofrowSets.- Parameters:
rowSets- the input row sets- Returns:
- the new row set
-
union(Collection).