public class TableProviderManager extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
restartIsOK |
protected PriorityBlockingQueue<TableProviderControlImpl> |
restartQueue |
protected Map<String,TableProviderControlImpl> |
tableProviderMap |
Modifier and Type | Method and Description |
---|---|
void |
addDependentTable(CatalogedTable baseTable,
String dependentTableName)
It adds the dependent table name to the dependents maps that every table provider has.
|
boolean |
addingNew(String tableName)
This method should be called as early as possible in the createTable path.
|
void |
addTableProvider(ExternalServerConnectionType externalServer,
int retryCount)
Connect to a TableProvider, which then allows for remote connections as if they were LiveView Tables
|
Map<String,com.streambase.liveview.config.AbstractConfigObject> |
compileLVConfs(List<File> tableFiles,
boolean buildYaml) |
void |
createTable(String name,
LiveviewConfiguration conf,
boolean saveInProject)
Does pre-checks, saves lvconf file and registers the table in defined state with the services layer
|
void |
deleteTable(CatalogedTable catalogedTable) |
void |
dropTables(List<String> tables) |
static TableProviderManager |
get() |
(package private) TableColumnsTable |
getColumnsTable() |
LiveViewServerConfig |
getConfig() |
File |
getCreateTableDir(boolean create) |
static String |
getJavaClassname(ExternalServerConnectionType externalServer) |
File |
getProjectBin()
Get the projectBin, which is the writable base directory where all stuff that we write should go.
|
(package private) Set<String> |
getTableDependants(String baseCatalogedName)
It returns the set of dependent tables of a particular cataloged table.
|
TablesTable |
getTablesTable() |
static boolean |
hasDangerousConnection(com.streambase.liveview.config.AbstractConfigObject configObject) |
static void |
initialize(LiveViewServer lvServer) |
static void |
initialize(TablesTable tt,
TableColumnsTable tct,
LiveViewServerConfig conf,
StreamBaseConnectionPool sbConnPool) |
(package private) void |
killQueriesAndPublishers(String tableName,
LiveViewException exceptionToBeDeliveredToQueriesBeforeClosing)
Kills all queries and publishers that are attached to it.
|
(package private) void |
queueRestart(TableProviderControlImpl control) |
void |
registerDependentTables(TableType tableInfo,
CatalogedTable baseCatalogedTable,
boolean useDynamicStates) |
void |
registerNewDynamicTable(String name,
LiveviewConfiguration.DataTable dataTable,
Table.TableStatus initialStatus,
String statusMessage) |
boolean |
removeNew(String tableName)
This method MUST be called with the same table name if AddingNew has been called.
|
void |
removeTableProvider(String id)
Disconnect a previously-connected TableProvider.
|
void |
saveLVConf(String name,
LiveviewConfiguration conf,
boolean saveInProject) |
void |
shutdown() |
void |
startTables(List<String> tables) |
void |
validateDependentTables(LiveviewConfiguration conf) |
void |
validateTablesContainers() |
public static boolean restartIsOK
protected Map<String,TableProviderControlImpl> tableProviderMap
protected PriorityBlockingQueue<TableProviderControlImpl> restartQueue
void queueRestart(TableProviderControlImpl control)
public static TableProviderManager get()
public static void initialize(LiveViewServer lvServer)
public static void initialize(TablesTable tt, TableColumnsTable tct, LiveViewServerConfig conf, StreamBaseConnectionPool sbConnPool)
public void validateTablesContainers()
public TablesTable getTablesTable()
TableColumnsTable getColumnsTable()
public LiveViewServerConfig getConfig()
public void addTableProvider(ExternalServerConnectionType externalServer, int retryCount) throws LiveViewException
externalServer
- id must be uniqueretryCount
- The number of failed tries we've already made.LiveViewException
public static String getJavaClassname(ExternalServerConnectionType externalServer)
Set<String> getTableDependants(String baseCatalogedName)
public void removeTableProvider(String id) throws LiveViewException
id
- LiveViewException
public void shutdown() throws LiveViewException
LiveViewException
public void dropTables(List<String> tables) throws LiveViewException, TupleException, StreamBaseException
tables
- LiveViewException
TupleException
StreamBaseException
public void startTables(List<String> tables) throws LiveViewException, StreamBaseException, com.streambase.liveview.config.ConfigExceptionType.ConfigException, TupleException, NullValueException
tables
- LiveViewException
StreamBaseException
com.streambase.liveview.config.ConfigExceptionType.ConfigException
TupleException
NullValueException
public Map<String,com.streambase.liveview.config.AbstractConfigObject> compileLVConfs(List<File> tableFiles, boolean buildYaml) throws LiveViewException, StreamBaseException
LiveViewException
StreamBaseException
public File getCreateTableDir(boolean create)
public File getProjectBin()
public void deleteTable(CatalogedTable catalogedTable) throws TupleException, StreamBaseException
TupleException
StreamBaseException
void killQueriesAndPublishers(String tableName, LiveViewException exceptionToBeDeliveredToQueriesBeforeClosing) throws LiveViewException
id
- LiveViewException
InterruptedException
public boolean addingNew(String tableName)
tableName
- public boolean removeNew(String tableName)
tableName
- public void createTable(String name, LiveviewConfiguration conf, boolean saveInProject) throws JAXBException, StreamBaseException
conf
- saveInProject
- TODOJAXBException
StreamBaseException
public void validateDependentTables(LiveviewConfiguration conf) throws LiveViewException
LiveViewException
public void saveLVConf(String name, LiveviewConfiguration conf, boolean saveInProject) throws JAXBException, LiveViewException
JAXBException
LiveViewException
public void registerNewDynamicTable(String name, LiveviewConfiguration.DataTable dataTable, Table.TableStatus initialStatus, String statusMessage) throws LiveViewException
LiveViewException
public void registerDependentTables(TableType tableInfo, CatalogedTable baseCatalogedTable, boolean useDynamicStates) throws LiveViewException
LiveViewException
public static boolean hasDangerousConnection(com.streambase.liveview.config.AbstractConfigObject configObject)
public void addDependentTable(CatalogedTable baseTable, String dependentTableName)
baseTable
- dependentTableName
- Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.