public class EmbeddedServer extends AbstractVDBDeployer implements EventDistributorFactory, ConnectorManagerRepository.ExecutionFactoryProvider
start(EmbeddedConfiguration)
Modifier and Type | Class and Description |
---|---|
static interface |
EmbeddedServer.ConnectionFactoryProvider<T> |
protected class |
EmbeddedServer.ProviderAwareConnectorManagerRepository |
static class |
EmbeddedServer.SimpleConnectionFactoryProvider<T> |
Modifier and Type | Field and Description |
---|---|
protected BufferServiceImpl |
bufferService |
protected ConnectorManagerRepository |
cmr |
protected DQPCore |
dqp |
protected AbstractEventDistributorFactoryService |
eventDistributorFactoryService |
protected LogonImpl |
logon |
protected ObjectReplicator |
replicator |
protected VDBRepository |
repo
Custom vdb repository that will immediately throw exceptions for metadata validation errors
|
protected ClientServiceRegistryImpl |
services |
protected SessionServiceImpl |
sessionService |
protected boolean |
throwMetadataErrors |
protected TransactionServerImpl |
transactionService |
protected ArrayList<SocketListener> |
transports |
protected boolean |
useCallingThread |
protected boolean |
waitForLoad |
repositories
Constructor and Description |
---|
EmbeddedServer() |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionFactory(String name,
Object connectionFactory)
Adds the object as the named connection factory to replace the default JNDI lookup strategy.
|
void |
addConnectionFactoryProvider(String name,
EmbeddedServer.ConnectionFactoryProvider<?> connectionFactoryProvider)
Adds the
EmbeddedServer.ConnectionFactoryProvider with the given connection name to replace the default JNDI lookup strategy. |
void |
addTranslator(Class<? extends ExecutionFactory> clazz)
Adds a definition of the
ExecutionFactory using the default name either from the Translator annotation or the class name. |
void |
addTranslator(String name,
ExecutionFactory<?,?> ef)
Add a named
ExecutionFactory . |
void |
addTranslator(String name,
String type,
Map<String,String> properties)
Add an override translator
|
protected boolean |
allowOverrideTranslators() |
static void |
createPreParser(VDBMetaData deployment) |
void |
deployVDB(InputStream is)
Deploy a vdb.xml file.
|
void |
deployVDB(InputStream is,
boolean ddl)
Deploy a vdb.xml file.
|
void |
deployVDB(String name,
ModelMetaData... models)
Deploy the given set of models as vdb name.1
|
protected void |
deployVDB(VDBMetaData vdb,
VDBResources resources) |
void |
deployVDBZip(URL url)
Deploy a vdb zip file.
|
Admin |
getAdmin() |
protected BufferService |
getBufferService() |
protected EmbeddedConfiguration |
getConfiguration() |
protected ConcurrentHashMap<String,EmbeddedServer.ConnectionFactoryProvider<?>> |
getConnectionFactoryProviders() |
TeiidDriver |
getDriver() |
EventDistributor |
getEventDistributor()
Get an
EventDistributor that will distribute events to
all members. |
ExecutionFactory<Object,Object> |
getExecutionFactory(String name) |
protected MaterializationManager |
getMaterializationManager() |
protected MetadataRepository<?,?> |
getMetadataRepository(String repoType) |
int |
getPort(int transport)
Return the bound port for the transport number
|
protected SessionAwareCache<PreparedPlan> |
getPpcCache() |
protected SessionAwareCache<CachedResults> |
getRsCache() |
String |
getSchemaDdl(String vdbName,
String schemaName)
Get the effective ddl text for the given schema
|
protected TranslatorRepository |
getTranslatorRepository() |
protected VDBRepository |
getVDBRepository() |
protected void |
loadMetadata(VDBMetaData vdb,
ModelMetaData model,
ConnectorManagerRepository cmr,
MetadataRepository metadataRepository,
MetadataStore store,
AtomicInteger loadCount,
VDBResources vdbResources)
TODO: consolidate this logic more into the abstract deployer
|
void |
start(EmbeddedConfiguration config) |
void |
stop()
Stops the server.
|
void |
undeployVDB(String vdbName) |
void |
undeployVDB(String vdbName,
String version) |
addMetadataRepository, assignMetadataRepositories, createMetadataFactory, getConnectorManagers, loadMetadata, metadataLoaded
protected DQPCore dqp
protected VDBRepository repo
protected boolean throwMetadataErrors
protected SessionServiceImpl sessionService
protected ObjectReplicator replicator
protected BufferServiceImpl bufferService
protected TransactionServerImpl transactionService
protected boolean waitForLoad
protected ClientServiceRegistryImpl services
protected LogonImpl logon
protected ConnectorManagerRepository cmr
protected AbstractEventDistributorFactoryService eventDistributorFactoryService
protected boolean useCallingThread
protected ArrayList<SocketListener> transports
public void addConnectionFactoryProvider(String name, EmbeddedServer.ConnectionFactoryProvider<?> connectionFactoryProvider)
EmbeddedServer.ConnectionFactoryProvider
with the given connection name to replace the default JNDI lookup strategy.name
- connectionFactoryProvider
- for a basic wrapper
public void addConnectionFactory(String name, Object connectionFactory)
name
- connectionFactory
- public void start(EmbeddedConfiguration config)
protected BufferService getBufferService()
protected MaterializationManager getMaterializationManager()
public void addTranslator(Class<? extends ExecutionFactory> clazz) throws TranslatorException
ExecutionFactory
using the default name either from the Translator
annotation or the class name.
Only ExecutionFactory
classes with a Translator
annotation can be referenced by addTranslator(String, String, Map)
ef
- TranslatorException
public void addTranslator(String name, String type, Map<String,String> properties) throws TranslatorException
name
- type
- the name of an existing translator to overrideproperties
- TranslatorException
public void addTranslator(String name, ExecutionFactory<?,?> ef)
ExecutionFactory
. NOTE: Only this single instance will be shared for all usage.name
- ef
- the already started ExecutionFactory#addTranslator(String, String, Map)} or {@link #addTranslator(Class)}
public void deployVDB(String name, ModelMetaData... models) throws ConnectorManagerRepository.ConnectorManagerException, VirtualDatabaseException, TranslatorException
name
- models
- ConnectorManagerRepository.ConnectorManagerException
VirtualDatabaseException
TranslatorException
public void deployVDB(InputStream is) throws VirtualDatabaseException, ConnectorManagerRepository.ConnectorManagerException, TranslatorException, IOException
is,
- which will be closed by this deploymentTranslatorException
ConnectorManagerRepository.ConnectorManagerException
VirtualDatabaseException
IOException
public void deployVDB(InputStream is, boolean ddl) throws VirtualDatabaseException, ConnectorManagerRepository.ConnectorManagerException, TranslatorException, IOException
is,
- which will be closed by this deploymentddl,
- true if the file contents are DDLTranslatorException
ConnectorManagerRepository.ConnectorManagerException
VirtualDatabaseException
IOException
public void deployVDBZip(URL url) throws VirtualDatabaseException, ConnectorManagerRepository.ConnectorManagerException, TranslatorException, IOException, URISyntaxException
protected boolean allowOverrideTranslators()
protected void deployVDB(VDBMetaData vdb, VDBResources resources) throws ConnectorManagerRepository.ConnectorManagerException, VirtualDatabaseException, TranslatorException
protected MetadataRepository<?,?> getMetadataRepository(String repoType) throws VirtualDatabaseException
getMetadataRepository
in class AbstractVDBDeployer
VirtualDatabaseException
protected void loadMetadata(VDBMetaData vdb, ModelMetaData model, ConnectorManagerRepository cmr, MetadataRepository metadataRepository, MetadataStore store, AtomicInteger loadCount, VDBResources vdbResources) throws TranslatorException
loadMetadata
in class AbstractVDBDeployer
TranslatorException
public void undeployVDB(String vdbName)
protected EmbeddedConfiguration getConfiguration()
public void stop()
public TeiidDriver getDriver()
public EventDistributor getEventDistributor()
EventDistributorFactory
EventDistributor
that will distribute events to
all members.getEventDistributor
in interface EventDistributorFactory
public ExecutionFactory<Object,Object> getExecutionFactory(String name) throws ConnectorManagerRepository.ConnectorManagerException
getExecutionFactory
in interface ConnectorManagerRepository.ExecutionFactoryProvider
ExecutionFactory
or throw a ConnectorManagerRepository.ConnectorManagerException
if it does not existConnectorManagerRepository.ConnectorManagerException
protected VDBRepository getVDBRepository()
getVDBRepository
in class AbstractVDBDeployer
public String getSchemaDdl(String vdbName, String schemaName)
vdbName
- schemaName
- public int getPort(int transport)
transport
- protected TranslatorRepository getTranslatorRepository()
protected ConcurrentHashMap<String,EmbeddedServer.ConnectionFactoryProvider<?>> getConnectionFactoryProviders()
protected SessionAwareCache<CachedResults> getRsCache()
protected SessionAwareCache<PreparedPlan> getPpcCache()
public Admin getAdmin()
public static void createPreParser(VDBMetaData deployment) throws TeiidException
TeiidException
Copyright © 2018 JBoss by Red Hat. All rights reserved.