public class TableProviderManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
restartIsOK |
protected java.util.concurrent.PriorityBlockingQueue<TableProviderControlImpl> |
restartQueue |
protected java.util.Map<java.lang.String,TableProviderControlImpl> |
tableProviderMap |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependentTable(CatalogedTable baseTable,
java.lang.String dependentTableName)
It adds the dependent table name to the dependents maps that every table provider has.
|
boolean |
addingNew(java.lang.String tableName)
This method should be called as early as possible in the createTable path.
|
void |
addTableProvider(com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServer,
int retryCount)
Connect to a TableProvider, which then allows for remote connections as if they were LiveView Tables
|
java.util.Map<java.lang.String,AbstractConfigObject> |
compileLVConfs(java.util.List<java.io.File> tableFiles,
boolean buildYaml) |
void |
createTable(java.lang.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(java.util.List<java.lang.String> tables) |
static TableProviderManager |
get() |
LiveViewServerConfig |
getConfig() |
java.io.File |
getCreateTableDir(boolean create) |
static java.lang.String |
getJavaClassname(com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServer) |
java.io.File |
getProjectBin()
Get the projectBin, which is the writable base directory where all stuff that we write should go.
|
TablesTable |
getTablesTable() |
static boolean |
hasDangerousConnection(AbstractConfigObject configObject) |
static void |
initialize(LiveViewServer lvServer) |
static void |
initialize(TablesTable tt,
TableColumnsTable tct,
LiveViewServerConfig conf,
StreamBaseConnectionPool sbConnPool) |
void |
registerDependentTables(TableType tableInfo,
CatalogedTable baseCatalogedTable,
boolean useDynamicStates) |
void |
registerNewDynamicTable(java.lang.String name,
DataTable dataTable,
Table.TableStatus initialStatus,
java.lang.String statusMessage) |
boolean |
removeNew(java.lang.String tableName)
This method MUST be called with the same table name if AddingNew has been called.
|
void |
removeTableProvider(java.lang.String id)
Disconnect a previously-connected TableProvider.
|
void |
saveLVConf(java.lang.String name,
LiveviewConfiguration conf,
boolean saveInProject) |
void |
shutdown() |
void |
startTables(java.util.List<java.lang.String> tables) |
void |
validateDependentTables(LiveviewConfiguration conf) |
void |
validateTablesContainers() |
public static boolean restartIsOK
protected java.util.Map<java.lang.String,TableProviderControlImpl> tableProviderMap
protected java.util.concurrent.PriorityBlockingQueue<TableProviderControlImpl> restartQueue
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()
public LiveViewServerConfig getConfig()
public void addTableProvider(com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServer,
int retryCount)
throws LiveViewException
externalServer - id must be uniqueretryCount - The number of failed tries we've already made.LiveViewExceptionpublic static java.lang.String getJavaClassname(com.streambase.liveview.internal.protocol.jaxb.ExternalServerConnectionType externalServer)
public void removeTableProvider(java.lang.String id)
throws LiveViewException
id - LiveViewExceptionpublic void shutdown()
throws LiveViewException
LiveViewExceptionpublic void dropTables(java.util.List<java.lang.String> tables)
throws LiveViewException,
TupleException,
StreamBaseException
tables - LiveViewExceptionTupleExceptionStreamBaseExceptionpublic void startTables(java.util.List<java.lang.String> tables)
throws LiveViewException,
StreamBaseException,
ConfigException,
TupleException,
NullValueException
tables - LiveViewExceptionStreamBaseExceptionConfigExceptionTupleExceptionNullValueExceptionpublic java.util.Map<java.lang.String,AbstractConfigObject> compileLVConfs(java.util.List<java.io.File> tableFiles,
boolean buildYaml)
throws LiveViewException,
StreamBaseException
LiveViewExceptionStreamBaseExceptionpublic java.io.File getCreateTableDir(boolean create)
public java.io.File getProjectBin()
public void deleteTable(CatalogedTable catalogedTable)
throws TupleException,
StreamBaseException
TupleExceptionStreamBaseExceptionpublic boolean addingNew(java.lang.String tableName)
tableName - public boolean removeNew(java.lang.String tableName)
tableName - public void createTable(java.lang.String name,
LiveviewConfiguration conf,
boolean saveInProject)
throws javax.xml.bind.JAXBException,
StreamBaseException
conf - saveInProject - TODOjavax.xml.bind.JAXBExceptionStreamBaseExceptionpublic void validateDependentTables(LiveviewConfiguration conf)
throws LiveViewException
LiveViewExceptionpublic void saveLVConf(java.lang.String name,
LiveviewConfiguration conf,
boolean saveInProject)
throws javax.xml.bind.JAXBException,
LiveViewException
javax.xml.bind.JAXBExceptionLiveViewExceptionpublic void registerNewDynamicTable(java.lang.String name,
DataTable dataTable,
Table.TableStatus initialStatus,
java.lang.String statusMessage)
throws LiveViewException
LiveViewExceptionpublic void registerDependentTables(TableType tableInfo,
CatalogedTable baseCatalogedTable,
boolean useDynamicStates)
throws LiveViewException
LiveViewExceptionpublic static boolean hasDangerousConnection(AbstractConfigObject configObject)
public void addDependentTable(CatalogedTable baseTable,
java.lang.String dependentTableName)
baseTable - dependentTableName -