RingTableTools.of

The RingTableTools.of method creates a ring table that retains the latest capacity number of rows from the parent table. Latest rows are determined by the new rows added to the parent table. Deleted rows are ignored, and updated rows are not expected and will raise an exception.

Syntax

RingTableTools.of(parent, capacity)
RingTableTools.of(parent, capacity, initialize)

Parameters

ParameterTypeDescription
parentTable

The parent table.

capacityint

The capacity of the ring table.

initializeboolean

Whether to initialize the ring table with a snapshot of the parent table. Default is True.

Returns

An in-memory ring table.

Examples

The following example creates a table with one column of three integer values.

import io.deephaven.engine.table.impl.sources.ring.RingTableTools

source = newTable(
  intCol("IntegerColumn", 1, 2, 3, 4, 5)
)

result = RingTableTools.of(source, 3)