Class TableProviderManager
- java.lang.Object
- 
- com.streambase.liveview.server.table.plugin.TableProviderManager
 
- 
 public class TableProviderManager extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description static booleanrestartIsOKprotected PriorityBlockingQueue<TableProviderControlImpl>restartQueueprotected Map<String,TableProviderControlImpl>tableProviderMap
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependentTable(CatalogedTable baseTable, String dependentTableName)It adds the dependent table name to the dependents maps that every table provider has.booleanaddingNew(String tableName)This method should be called as early as possible in the createTable path.voidaddTableProvider(ExternalServerConnectionType externalServer, int retryCount)Connect to a TableProvider, which then allows for remote connections as if they were LiveView TablesMap<String,com.streambase.liveview.config.AbstractConfigObject>compileLVConfs(List<File> tableFiles, boolean buildYaml)voidcreateTable(String name, LiveviewConfiguration conf, boolean saveInProject)Does pre-checks, saves lvconf file and registers the table in defined state with the services layervoiddeleteTable(CatalogedTable catalogedTable)voiddropTables(List<String> tables)static TableProviderManagerget()LiveViewServerConfiggetConfig()FilegetCreateTableDir(boolean create)static StringgetJavaClassname(ExternalServerConnectionType externalServer)FilegetProjectBin()Get the projectBin, which is the writable base directory where all stuff that we write should go.TablesTablegetTablesTable()static booleanhasDangerousConnection(com.streambase.liveview.config.AbstractConfigObject configObject)static voidinitialize(LiveViewServer lvServer)static voidinitialize(TablesTable tt, TableColumnsTable tct, LiveViewServerConfig conf, StreamBaseConnectionPool sbConnPool)voidregisterDependentTables(TableType tableInfo, CatalogedTable baseCatalogedTable, boolean useDynamicStates)voidregisterNewDynamicTable(String name, LiveviewConfiguration.DataTable dataTable, Table.TableStatus initialStatus, String statusMessage)booleanremoveNew(String tableName)This method MUST be called with the same table name if AddingNew has been called.voidremoveTableProvider(String id)Disconnect a previously-connected TableProvider.voidsaveLVConf(String name, LiveviewConfiguration conf, boolean saveInProject)voidshutdown()voidstartTables(List<String> tables)voidvalidateDependentTables(LiveviewConfiguration conf)voidvalidateTablesContainers()
 
- 
- 
- 
Field Detail- 
restartIsOKpublic static boolean restartIsOK 
 - 
tableProviderMapprotected Map<String,TableProviderControlImpl> tableProviderMap 
 - 
restartQueueprotected PriorityBlockingQueue<TableProviderControlImpl> restartQueue 
 
- 
 - 
Method Detail- 
getpublic static TableProviderManager get() 
 - 
initializepublic static void initialize(LiveViewServer lvServer) 
 - 
initializepublic static void initialize(TablesTable tt, TableColumnsTable tct, LiveViewServerConfig conf, StreamBaseConnectionPool sbConnPool) 
 - 
validateTablesContainerspublic void validateTablesContainers() 
 - 
getTablesTablepublic TablesTable getTablesTable() 
 - 
getConfigpublic LiveViewServerConfig getConfig() - Returns:
- the config
 
 - 
addTableProviderpublic void addTableProvider(ExternalServerConnectionType externalServer, int retryCount) throws LiveViewException Connect to a TableProvider, which then allows for remote connections as if they were LiveView Tables- Parameters:
- externalServer- id must be unique
- retryCount- The number of failed tries we've already made.
- Throws:
- LiveViewException
- Since:
- LiveView 1.6
 
 - 
getJavaClassnamepublic static String getJavaClassname(ExternalServerConnectionType externalServer) 
 - 
removeTableProviderpublic void removeTableProvider(String id) throws LiveViewException Disconnect a previously-connected TableProvider. This is called from outside, so no part has happened, yet, and it shouldn't be requeued for restart- Parameters:
- id-
- Throws:
- LiveViewException
- Since:
- LiveView 1.6
 
 - 
shutdownpublic void shutdown() throws LiveViewException- Throws:
- LiveViewException
 
 - 
dropTablespublic void dropTables(List<String> tables) throws LiveViewException, TupleException, StreamBaseException - Parameters:
- tables-
- Throws:
- LiveViewException
- TupleException
- StreamBaseException
 
 - 
startTablespublic void startTables(List<String> tables) throws LiveViewException, StreamBaseException, com.streambase.liveview.config.ConfigExceptionType.ConfigException, TupleException, NullValueException - Parameters:
- tables-
- Throws:
- LiveViewException
- StreamBaseException
- com.streambase.liveview.config.ConfigExceptionType.ConfigException
- TupleException
- NullValueException
 
 - 
compileLVConfspublic Map<String,com.streambase.liveview.config.AbstractConfigObject> compileLVConfs(List<File> tableFiles, boolean buildYaml) throws LiveViewException, StreamBaseException - Throws:
- LiveViewException
- StreamBaseException
 
 - 
getCreateTableDirpublic File getCreateTableDir(boolean create) 
 - 
getProjectBinpublic File getProjectBin() Get the projectBin, which is the writable base directory where all stuff that we write should go.- Returns:
 
 - 
deleteTablepublic void deleteTable(CatalogedTable catalogedTable) throws TupleException, StreamBaseException - Throws:
- TupleException
- StreamBaseException
 
 - 
addingNewpublic boolean addingNew(String tableName) This method should be called as early as possible in the createTable path. It is intended to prevent multiple clients from trying to create the same table simultaneously You must call RemoveNew(tableName) regardless if the table is created successfully or not.- Parameters:
- tableName-
- Returns:
- true if the table is really new. False if the table exists, or is in the process of being created.
 
 - 
removeNewpublic boolean removeNew(String tableName) This method MUST be called with the same table name if AddingNew has been called.- Parameters:
- tableName-
- Returns:
- true if the table was in the currently creating state.
 
 - 
createTablepublic void createTable(String name, LiveviewConfiguration conf, boolean saveInProject) throws JAXBException, StreamBaseException Does pre-checks, saves lvconf file and registers the table in defined state with the services layer- Parameters:
- conf-
- saveInProject- TODO
- Throws:
- JAXBException
- StreamBaseException
 
 - 
validateDependentTablespublic void validateDependentTables(LiveviewConfiguration conf) throws LiveViewException - Throws:
- LiveViewException
 
 - 
saveLVConfpublic void saveLVConf(String name, LiveviewConfiguration conf, boolean saveInProject) throws JAXBException, LiveViewException - Throws:
- JAXBException
- LiveViewException
 
 - 
registerNewDynamicTablepublic void registerNewDynamicTable(String name, LiveviewConfiguration.DataTable dataTable, Table.TableStatus initialStatus, String statusMessage) throws LiveViewException - Throws:
- LiveViewException
 
 - 
registerDependentTablespublic void registerDependentTables(TableType tableInfo, CatalogedTable baseCatalogedTable, boolean useDynamicStates) throws LiveViewException - Throws:
- LiveViewException
 
 - 
hasDangerousConnectionpublic static boolean hasDangerousConnection(com.streambase.liveview.config.AbstractConfigObject configObject) 
 - 
addDependentTablepublic void addDependentTable(CatalogedTable baseTable, String dependentTableName) It adds the dependent table name to the dependents maps that every table provider has.- Parameters:
- baseTable-
- dependentTableName-
 
 
- 
 
-