Interface TableConfig
public interface TableConfig
TableConfig is used to configure all properties of the table under construction. For a TableConfig to be valid, it should at least have name, schema and primary index set.
- Since:
- 2.1.4
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCaseInsensitiveFieldName
(String caseInsensitiveFieldName) This method adds a case insensitive field name to the existing list of case insensitive table field names.void
addFieldRule
(FieldRule fieldRule) This method adds a field ruleFieldRule
to the existing list of field rules.void
addFilteredTableAlias
(FilteredTableAlias filteredTableAlias) Add a single filterdTableAlias to the existing list of aliasvoid
addVariable
(Variable variable) The method is used to add a variableVariable
to the existing list of variables.This method returns the aggregate query for this table.This method returns the list of case insensitive table field names.The method returns the description of the Liveview table configured with this TableConfig object.This method gets you the list of field rulesFieldRule
This method returns the live list of filtered table alias which you may modify if new filtered tables are to be made based on this table.This method returns the list of Indices for the table.This method returns the name of the folder where this table is persisted.The rule is a gateway for row to be published.This method returns the string representation for the schema of the table being configured.This method gets the short description that is used to describe the table.int
Snapshot concurrency specifies the number of extra threads used to service the snapshot portion of queries.int
Snapshot parallelism determines the number of data regions used in parallel to publish to and scan from tables.Deprecated.The tableDeleteRule specifies a condition when the rows present in this table are to be deleted.This method the name of the table from the Table ConfigurationThis method is used to get the list of variablesVariable
with this Table Configurationboolean
The method gets the boolean flag which if true, recovers the data is to be restored after the table is restarted.boolean
The saveInProject flag is responsible for saving the tables to start even after the restart of liveview server.setAggregateQuery
(QueryConfig aggregateQuery) This method sets the aggregate query for the table.setDescription
(String description) This method helps in setting the description for the table using this Table Configuration.setIndices
(List<List<String>> indices) This method is used to set the Indices for the table being configured.setPersistenceFolder
(String persistenceFolder) This method is used to set the persistent folder where this table will be persisted.setPersistenceRestoreDataOnStart
(boolean persistenceRestoreDataOnStart) The method sets the boolean flag which if true, recovers the data is to be restored after the table is restarted.setPrimaryIndex
(String... fieldNames) This method is used to set the Primary Indexes from the list of fields passed to this method.setRowDeleteRule
(String rowDeleteRule) The rowDeleteRule to set is a gateway for row to be published.setSaveInProject
(boolean saveInProject) The method is used to set the boolean value for the saveInProject flag, which is responsible for saving the tables to start even after the restart of Liveview server.This method is used to set the schema for the table being configured.This method is used to set the schema for the table being configured.setShortDescription
(String shortDescription) The shortDescription of the table to be set with Table Configuration.setSnapshotConcurrency
(int snapshotConcurrency) Snapshot concurrency specifies the number of extra threads used to service the snapshot portion of queries.setSnapshotParallelism
(int snapshotParallelism) The snapshotParallelism value to set to enable data regions equal to the input value.setTableDeleteRule
(String tableDeleteRule) Deprecated.setTableDeleteRules
(List<String> tableDeleteRules) The tableDeleteRule to set specifies a condition when the rows present in this table are to be deleted.setTablename
(String tablename) This method is used to set the name of the table for this Table Configuration.
-
Method Details
-
getTablename
String getTablename()This method the name of the table from the Table Configuration- Returns:
- table name
- Since:
- 2.1.4
-
setTablename
This method is used to set the name of the table for this Table Configuration.- Parameters:
tablename
- the table name to set for the table being configured.- Returns:
- the
TableConfig
assigned with the table name that was passed as input to this method. - Since:
- 2.1.4
-
isSaveInProject
boolean isSaveInProject()The saveInProject flag is responsible for saving the tables to start even after the restart of liveview server.- Returns:
- saveInProject boolean flag
- Since:
- 2.1.4
-
setSaveInProject
The method is used to set the boolean value for the saveInProject flag, which is responsible for saving the tables to start even after the restart of Liveview server.- Parameters:
saveInProject
- boolean flag- Returns:
- TableConfig object set with the saveInProject flag with the value passed in as the input parameter to this method
- Since:
- 2.1.4
-
getDescription
String getDescription()The method returns the description of the Liveview table configured with this TableConfig object.- Returns:
- description of the table
- Since:
- 2.1.4
-
setDescription
This method helps in setting the description for the table using this Table Configuration.- Parameters:
description
- of the table- Returns:
- TableConfig object set with description passed in as the input parameter to this method
- Since:
- 2.1.4
-
getShortDescription
String getShortDescription()This method gets the short description that is used to describe the table.- Returns:
- shortDescription of the table
- Since:
- 2.1.4
-
setShortDescription
The shortDescription of the table to be set with Table Configuration.- Parameters:
shortDescription
- of the table- Returns:
- TableConfig object set with short description passed in as the input parameter to this method
- Since:
- 2.1.4
-
getSchema
String getSchema()This method returns the string representation for the schema of the table being configured.- Returns:
- string representation of the table schema
- Since:
- 2.1.4
-
setSchema
This method is used to set the schema for the table being configured.- Parameters:
schema
- is the string representation of the table schema- Since:
- 2.1.4
-
setSchema
This method is used to set the schema for the table being configured.- Parameters:
sbSchema
- the schema for the table being configured.- Returns:
TableConfig
populated with the schema passed to this method.- Since:
- 2.1.4
-
getIndices
This method returns the list of Indices for the table.- Returns:
- list of indices
- Since:
- 2.1.4
-
setIndices
This method is used to set the Indices for the table being configured. Note that the first one is the primary index.- Parameters:
indices
- to set.- Since:
- 2.1.4
-
setPrimaryIndex
This method is used to set the Primary Indexes from the list of fields passed to this method.- Parameters:
fieldNames
-- Returns:
- TableConfig populated with the fields as primary index
- Since:
- 2.1.4
-
getAggregateQuery
QueryConfig getAggregateQuery()This method returns the aggregate query for this table. If the table is going to be the result of the aggregate query on a Liveview tables, it has an aggregate query.- Returns:
- the aggregateQuery
- Since:
- 2.1.4
-
setAggregateQuery
This method sets the aggregate query for the table. If the table is going to be the result of the aggregate query on a Liveview tables, it should have an aggregate query.- Parameters:
aggregateQuery
- the aggregateQuery to set- Returns:
- TableConfig populated with the query configuration for the aggregate query passed as the input parameter
- Since:
- 2.1.4
-
getRowDeleteRule
String getRowDeleteRule()The rule is a gateway for row to be published. If the rule is satisfied for a row, the row is not published and deleted.- Returns:
- the rowDeleteRule
- Since:
- 2.1.4
-
setRowDeleteRule
The rowDeleteRule to set is a gateway for row to be published. If the rule is satisfied for a row, the row is not published and deleted.- Parameters:
rowDeleteRule
- is the rowDeleteRule to set- Returns:
- TableConfig populated with rowDeleteRule passed as the input parameter to this method
- Since:
- 2.1.4
-
getTableDeleteRule
String getTableDeleteRule()Deprecated.The tableDeleteRule specifies a condition when the rows present in this table are to be deleted.- Returns:
- the first table delete rule from the list of table delete rules.
- Since:
- 2.1.4
-
getTableDeleteRules
- Returns:
- list of table delete rules
-
setTableDeleteRules
The tableDeleteRule to set specifies a condition when the rows present in this table are to be deleted.- Parameters:
tableDeleteRules
- is the list of table delete rules to set while configuring the table.- Returns:
- TableConfig populated with tableDeleteRule passed as the input parameter to this method
- Since:
- 2.1.4
-
setTableDeleteRule
Deprecated.- Parameters:
tableDeleteRule
- the table delete rule to add to the list to table delete rules.- Returns:
- the
TableConfig
with populated table Delete Rule.
-
getSnapshotParallelism
int getSnapshotParallelism()Snapshot parallelism determines the number of data regions used in parallel to publish to and scan from tables. Each data region contains approximately 1/N of the total rows in the table, where N is the snapshot-parallelism value.- Returns:
- the snapshotParallelism
- Since:
- 2.1.4
-
setSnapshotParallelism
The snapshotParallelism value to set to enable data regions equal to the input value. Snapshot parallelism determines the number of data regions used in parallel to publish to and scan from tables. Each data region contains approximately 1/N of the total rows in the table, where N is the snapshot-parallelism value.- Parameters:
snapshotParallelism
- the snapshotParallelism to set- Returns:
- TableConfig populated with snapshotParallelism value passed as the input parameter to this method
- Since:
- 2.1.4
-
getSnapshotConcurrency
int getSnapshotConcurrency()Snapshot concurrency specifies the number of extra threads used to service the snapshot portion of queries. By default, snapshot concurrency is not enabled, which means that LiveView Server's single data-region thread also services all snapshot queries. Setting the snapshot-concurrency attribute to X means there will be X extra independent threads for snapshot processing. Additional snapshot query threads are most beneficial when you have ad hoc queries that cannot use indexes and your table size is several hundred thousand rows or larger.- Returns:
- the snapshotConcurrency
- Since:
- 2.1.4
-
setSnapshotConcurrency
Snapshot concurrency specifies the number of extra threads used to service the snapshot portion of queries. By default, snapshot concurrency is not enabled, which means that LiveView Server's single data-region thread also services all snapshot queries. Setting the snapshot-concurrency attribute to X means there will be X extra independent threads for snapshot processing. Additional snapshot query threads are most beneficial when you have ad hoc queries that cannot use indexes and your table size is several hundred thousand rows or larger.- Parameters:
snapshotConcurrency
- the snapshotConcurrency to set- Returns:
- TableConfig populated with snapshotConcurrency value passed as the input parameter to this method
- Since:
- 2.1.4
-
getPersistenceFolder
String getPersistenceFolder()This method returns the name of the folder where this table is persisted.- Returns:
- the persistenceFolder
- Since:
- 2.1.4
-
setPersistenceFolder
This method is used to set the persistent folder where this table will be persisted.- Parameters:
persistenceFolder
- the persistenceFolder to set- Returns:
- TableConfig populated with persistentFolder passed as the input parameter to this method
- Since:
- 2.1.4
-
isPersistenceRestoreDataOnStart
boolean isPersistenceRestoreDataOnStart()The method gets the boolean flag which if true, recovers the data is to be restored after the table is restarted. If the flag is set to false, there is no recovery of data after the table restarts.- Returns:
- the persistenceRestoreDataOnStart
- Since:
- 2.1.4
-
setPersistenceRestoreDataOnStart
The method sets the boolean flag which if true, recovers the data is to be restored after the table is restarted. If the flag is set to false, there is no recovery of data after the table restarts.- Parameters:
persistenceRestoreDataOnStart
- the persistenceRestoreDataOnStart to set- Returns:
- TableConfig populated with boolean value passed as the input parameter to this method which sets the persistenceRestoreDataOnStart flag
- Since:
- 2.1.4
-
getFilteredTableAliases
List<FilteredTableAlias> getFilteredTableAliases()This method returns the live list of filtered table alias which you may modify if new filtered tables are to be made based on this table.- Returns:
- the filteredTableAliases
- Since:
- 2.1.4
-
addFilteredTableAlias
Add a single filterdTableAlias to the existing list of alias- Parameters:
filteredTableAlias
- the alias to add- Since:
- 2.1.4
-
getVariables
This method is used to get the list of variablesVariable
with this Table Configuration- Returns:
- the Variables -- This is the live list, which you may modify.
- Since:
- 2.1.4
-
addVariable
The method is used to add a variableVariable
to the existing list of variables.- Parameters:
variable
- the variable to add- Since:
- 2.1.4
-
getFieldRules
This method gets you the list of field rulesFieldRule
- Returns:
- the FieldRules -- This is the live list, which you may modify.
- Since:
- 2.1.4
-
addFieldRule
This method adds a field ruleFieldRule
to the existing list of field rules.- Parameters:
fieldRule
- the fieldRule to add- Since:
- 2.1.4
-
getCaseInsensitiveFieldNames
This method returns the list of case insensitive table field names.- Returns:
- the CaseInsensitiveFieldNames -- This is the live list, which you may modify.
- Since:
- 2.1.4
-
addCaseInsensitiveFieldName
This method adds a case insensitive field name to the existing list of case insensitive table field names.- Parameters:
caseInsensitiveFieldName
-- Since:
- 2.1.4
-