|
84 | 84 | * sender.flush(); |
85 | 85 | * } |
86 | 86 | * </pre> |
87 | | - * <p> |
88 | | - * <h2>Fast-path API for high-throughput generators</h2> |
89 | | - * <p> |
90 | | - * For maximum throughput, bypass the fluent API to avoid per-row overhead |
91 | | - * (no column-name hashmap lookups, no {@code checkNotClosed()}/{@code checkTableSelected()} |
92 | | - * per column, direct access to column buffers). The entry point is |
93 | | - * {@link #getTableBuffer(String)}. |
94 | | - * <pre> |
95 | | - * // Setup (once) |
96 | | - * QwpTableBuffer tableBuffer = sender.getTableBuffer("q"); |
97 | | - * QwpTableBuffer.ColumnBuffer colSymbol = tableBuffer.getOrCreateColumn("s", TYPE_SYMBOL, true); |
98 | | - * QwpTableBuffer.ColumnBuffer colBid = tableBuffer.getOrCreateColumn("b", TYPE_DOUBLE, false); |
99 | | - * |
100 | | - * // Hot path (per row) |
101 | | - * colSymbol.addSymbolWithGlobalId(symbol, sender.getOrAddGlobalSymbol(symbol)); |
102 | | - * colBid.addDouble(bid); |
103 | | - * tableBuffer.nextRow(); |
104 | | - * sender.incrementPendingRowCount(); |
105 | | - * </pre> |
106 | 87 | */ |
107 | 88 | public class QwpWebSocketSender implements Sender { |
108 | 89 |
|
@@ -723,16 +704,11 @@ public int getPendingRowCount() { |
723 | 704 | return pendingRowCount; |
724 | 705 | } |
725 | 706 |
|
726 | | - /** |
727 | | - * <strong>DANGER:</strong>: gets or creates a low-level table buffer, |
728 | | - * allowing you to bypass some validation and enforcement of invariants |
729 | | - * present in the higher-level API. When used incorrectly, it may result |
730 | | - * in silent data loss. |
731 | | - */ |
| 707 | + @TestOnly |
732 | 708 | public QwpTableBuffer getTableBuffer(String tableName) { |
733 | 709 | QwpTableBuffer buffer = tableBuffers.get(tableName); |
734 | 710 | if (buffer == null) { |
735 | | - buffer = new QwpTableBuffer(tableName); |
| 711 | + buffer = new QwpTableBuffer(tableName, this); |
736 | 712 | tableBuffers.put(tableName, buffer); |
737 | 713 | } |
738 | 714 | currentTableBuffer = buffer; |
|
0 commit comments