public abstract class MaterializedCollectResultBase extends CollectResultBase implements MaterializedResult
CollectResultBase.ResultRetrievalThread
Modifier and Type | Field and Description |
---|---|
static double |
MATERIALIZED_TABLE_CAPACITY_FACTOR
Factor for the initial capacity of the materialized table.
|
static int |
MATERIALIZED_TABLE_MAX_INITIAL_CAPACITY
Maximum initial capacity of the materialized table.
|
static int |
MATERIALIZED_TABLE_MAX_OVERCOMMIT
Maximum overcommitment of the materialized table.
|
static double |
MATERIALIZED_TABLE_OVERCOMMIT_FACTOR
Factor for cleaning up deleted rows in the materialized table.
|
protected List<RowData> |
materializedTable
Materialized table that is continuously updated by inserts and deletes.
|
protected int |
maxRowCount
Maximum number of materialized rows to be stored.
|
protected int |
overcommitThreshold
Threshold for cleaning up deleted rows in the materialized table.
|
protected int |
validRowPosition
Counter for deleted rows to be deleted at the beginning of the materialized table.
|
executionException, resultLock, retrievalThread
Constructor and Description |
---|
MaterializedCollectResultBase(ClientResult tableResult,
int maxRowCount,
int overcommitThreshold) |
Modifier and Type | Method and Description |
---|---|
protected static int |
computeMaterializedTableCapacity(int maxRowCount) |
protected static int |
computeMaterializedTableOvercommit(int maxRowCount) |
protected List<RowData> |
getMaterializedTable() |
List<RowData> |
retrievePage(int page)
Retrieves a page of a snapshotted result.
|
TypedResult<Integer> |
snapshot(int pageSize)
Takes a snapshot of the current table and returns the number of pages for navigating through
the snapshot.
|
close, handleMissingResult, isRetrieving, processRecord
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public static final int MATERIALIZED_TABLE_MAX_INITIAL_CAPACITY
public static final int MATERIALIZED_TABLE_MAX_OVERCOMMIT
public static final double MATERIALIZED_TABLE_CAPACITY_FACTOR
public static final double MATERIALIZED_TABLE_OVERCOMMIT_FACTOR
protected final int maxRowCount
protected final int overcommitThreshold
protected final List<RowData> materializedTable
protected int validRowPosition
public MaterializedCollectResultBase(ClientResult tableResult, int maxRowCount, int overcommitThreshold)
public TypedResult<Integer> snapshot(int pageSize)
MaterializedResult
snapshot
in interface MaterializedResult
public List<RowData> retrievePage(int page)
MaterializedResult
retrievePage
in interface MaterializedResult
protected static int computeMaterializedTableCapacity(int maxRowCount)
protected static int computeMaterializedTableOvercommit(int maxRowCount)
@VisibleForTesting protected List<RowData> getMaterializedTable()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.