com.metamatrix.dqp.embedded.services
Class EmbeddedConfigurationService

java.lang.Object
  extended by com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService
      extended by com.metamatrix.dqp.embedded.services.EmbeddedConfigurationService
All Implemented Interfaces:
ApplicationService, ConfigurationService

public class EmbeddedConfigurationService
extends EmbeddedBaseDQPService
implements ConfigurationService

A File based configuration service implementation Implementation notes - While loading the VDBs also keep track of Connector Bindings loaded separately - While loading the VDBs also keep track of Connector types loaded separately - The above list also should contain the list from server config file. - Onlu used get, save, delete of any configuration on public api

Since:
4.3

Field Summary
 
Fields inherited from class com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService
SYSTEM_PHYSICAL_MODEL_NAME
 
Fields inherited from interface com.metamatrix.dqp.service.ConfigurationService
NEXT_VDB_VERSION, USER_DEFINED_FUNCTION_MODEL
 
Constructor Summary
EmbeddedConfigurationService()
           
 
Method Summary
 ConnectorBinding addConnectorBinding(java.lang.String deployedBindingName, ConnectorBinding binding, boolean replace)
           
 VDBArchive addVDB(VDBArchive vdb, boolean replaceBindings)
           
 void assignConnectorBinding(java.lang.String vdbName, java.lang.String version, java.lang.String modelName, ConnectorBinding[] bindings)
           
 void deleteConnectorBinding(java.lang.String deployedConnectorBindingName)
           
 void deleteConnectorType(java.lang.String deployedConnectorType)
           
 void deleteExtensionModule(java.lang.String extModuleName)
           
 void deleteVDB(VDBArchive vdb)
           
 java.lang.String getBufferMemorySize()
          Size of Memory in MB allocated to be used by the Resultset Management before disk buffering kicks in.
 java.util.Set<ServerConnection> getClientConnections()
           
 java.net.URL[] getCommonExtensionClasspath()
           
 java.net.URL getConfigFile()
           
 ServerConnectionListener getConnectionListener()
           
 java.lang.String getConnectorBatchSize()
           
 ConnectorBinding getConnectorBinding(java.lang.String deployedBindingName)
           
 java.util.List getConnectorBindings()
           
 ConnectorBindingType getConnectorType(java.lang.String connectorType)
           
 java.util.List getConnectorTypes()
           
 java.util.Properties getDefaultProperties(ConnectorBinding binding)
          Get the default properties for the connector binding given.
 java.io.File getDiskBufferDirectory()
          Get the directory to use for the disk buffering
 java.net.URL getEncryptionKeyStore()
           
 ExtensionModule getExtensionModule(java.lang.String extModuleName)
           
 java.util.List getExtensionModules()
           
 java.net.URL getExtensionPath()
           
 java.lang.String getInstanceIdenifier()
           
 java.net.URL getLogFile()
           
 java.lang.String getLogLevel()
           
 java.lang.String getProcessorBatchSize()
           
 ConfigurationModelContainer getSystemConfiguration()
           
 java.util.Properties getSystemProperties()
           
 java.net.URL getSystemVdb()
           
 java.net.URL getUDFFile()
           
 VDBArchive getVDB(java.lang.String vdbName, java.lang.String vdbVersion)
           
 java.net.URL[] getVDBLocations()
          Get path(s) for VDB(s) that are availble from the configuration to the DQP engine.
 java.util.List<VDBArchive> getVDBs()
           
 void initializeService(java.util.Properties properties)
           
 boolean isFullyConfiguredVDB(VDBArchive vdb)
           
 void loadUDF()
          Load the User defined functions file
 void register(ConnectorBindingLifeCycleListener listener)
          Register a listener for the VDB life cycle events, and get notified for when vdb is loded and unloaded
 void register(VDBLifeCycleListener listener)
          Register a listener for the VDB life cycle events, and get notified for when vdb is loded and unloaded
 void saveConnectorType(ConnectorBindingType type)
           
 void saveExtensionModule(ExtensionModule extModule)
           
 void saveVDB(VDBArchive srcVdb, java.lang.String version)
           
 void setSystemProperty(java.lang.String key, java.lang.String value)
           
 void startService(ApplicationEnvironment environment)
           
 void stopService()
           
 void unloadUDF()
          Unload the UDF file at the end of the DQP, because the same JVM could be used to load another DQP and we do want the static function library hanging on to old function libraries
 void unregister(ConnectorBindingLifeCycleListener listener)
           
 void unregister(VDBLifeCycleListener listener)
           
 ConnectorBinding updateConnectorBinding(ConnectorBinding binding)
           
 void updateSystemProperties(java.util.Properties properties)
           
 boolean useDiskBuffering()
          Use disk for buffering for result set management during the processing
 boolean useExtensionClasspath()
           
 
Methods inherited from class com.metamatrix.dqp.embedded.services.EmbeddedBaseDQPService
getConfigurationService, initialize, isStarted, isValidVDB, lookupService, start, stop, vdbId, vdbId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.metamatrix.common.application.ApplicationService
initialize, start, stop
 

Constructor Detail

EmbeddedConfigurationService

public EmbeddedConfigurationService()
Method Detail

getSystemVdb

public java.net.URL getSystemVdb()
Specified by:
getSystemVdb in interface ConfigurationService
Since:
4.3
See Also:
ConfigurationService.getSystemVdb()

getSystemProperties

public java.util.Properties getSystemProperties()
Specified by:
getSystemProperties in interface ConfigurationService
Since:
4.3
See Also:
ConfigurationService.getSystemProperties()

setSystemProperty

public void setSystemProperty(java.lang.String key,
                              java.lang.String value)
                       throws MetaMatrixComponentException
Specified by:
setSystemProperty in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.setSystemProperty(java.lang.String, java.lang.String)

updateSystemProperties

public void updateSystemProperties(java.util.Properties properties)
                            throws MetaMatrixComponentException
Specified by:
updateSystemProperties in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.updateSystemProperties(java.util.Properties)

getSystemConfiguration

public ConfigurationModelContainer getSystemConfiguration()
                                                   throws MetaMatrixComponentException
Specified by:
getSystemConfiguration in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getSystemConfiguration()

getConfigFile

public java.net.URL getConfigFile()
Specified by:
getConfigFile in interface ConfigurationService
See Also:
ConfigurationService.getConfigFile()

getUDFFile

public java.net.URL getUDFFile()
Specified by:
getUDFFile in interface ConfigurationService
Since:
4.3
See Also:
ConfigurationService.getUDFFile()

getCommonExtensionClasspath

public java.net.URL[] getCommonExtensionClasspath()
Specified by:
getCommonExtensionClasspath in interface ConfigurationService
See Also:
ConfigurationService.getCommonExtensionClasspath()

getLogFile

public java.net.URL getLogFile()
Specified by:
getLogFile in interface ConfigurationService
Since:
4.3
See Also:
ConfigurationService.getLogFile()

getLogLevel

public java.lang.String getLogLevel()
Specified by:
getLogLevel in interface ConfigurationService
Since:
4.3
See Also:
ConfigurationService.getLogLevel()

getVDBs

public java.util.List<VDBArchive> getVDBs()
                                   throws MetaMatrixComponentException
Specified by:
getVDBs in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getVDBs()

getVDB

public VDBArchive getVDB(java.lang.String vdbName,
                         java.lang.String vdbVersion)
                  throws MetaMatrixComponentException
Specified by:
getVDB in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getVDB(java.lang.String, java.lang.String)

saveVDB

public void saveVDB(VDBArchive srcVdb,
                    java.lang.String version)
             throws MetaMatrixComponentException
Specified by:
saveVDB in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
com.metamatrix.dqp.service.ConfigurationService#saveVDB(com.metamatrix.metadata.runtime.admin.vdb.VDBDefn)

addVDB

public VDBArchive addVDB(VDBArchive vdb,
                         boolean replaceBindings)
                  throws MetaMatrixComponentException
Specified by:
addVDB in interface ConfigurationService
Throws:
MetaMatrixComponentException
See Also:
com.metamatrix.dqp.service.ConfigurationService#addVDB(com.metamatrix.common.vdb.api.VDBDefn, boolean)

deleteVDB

public void deleteVDB(VDBArchive vdb)
               throws MetaMatrixComponentException
Specified by:
deleteVDB in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
com.metamatrix.dqp.service.ConfigurationService#deleteVDB(java.lang.String, java.lang.String)

assignConnectorBinding

public void assignConnectorBinding(java.lang.String vdbName,
                                   java.lang.String version,
                                   java.lang.String modelName,
                                   ConnectorBinding[] bindings)
                            throws MetaMatrixComponentException
Specified by:
assignConnectorBinding in interface ConfigurationService
Throws:
MetaMatrixComponentException
See Also:
ConfigurationService.assignConnectorBinding(java.lang.String, java.lang.String, java.lang.String, com.metamatrix.common.config.api.ConnectorBinding[])

getConnectorBindings

public java.util.List getConnectorBindings()
                                    throws MetaMatrixComponentException
Specified by:
getConnectorBindings in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getConnectorBindings()

getConnectorBinding

public ConnectorBinding getConnectorBinding(java.lang.String deployedBindingName)
                                     throws MetaMatrixComponentException
Specified by:
getConnectorBinding in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getConnectorBinding(java.lang.String)

getDefaultProperties

public java.util.Properties getDefaultProperties(ConnectorBinding binding)
Get the default properties for the connector binding given.

Specified by:
getDefaultProperties in interface ConfigurationService
Parameters:
binding -
Returns:
properties for the connector binding given

addConnectorBinding

public ConnectorBinding addConnectorBinding(java.lang.String deployedBindingName,
                                            ConnectorBinding binding,
                                            boolean replace)
                                     throws MetaMatrixComponentException
Specified by:
addConnectorBinding in interface ConfigurationService
Throws:
MetaMatrixComponentException
See Also:
ConfigurationService.addConnectorBinding(java.lang.String, com.metamatrix.common.config.api.ConnectorBinding, boolean)

updateConnectorBinding

public ConnectorBinding updateConnectorBinding(ConnectorBinding binding)
                                        throws MetaMatrixComponentException
Specified by:
updateConnectorBinding in interface ConfigurationService
Throws:
MetaMatrixComponentException
See Also:
ConfigurationService.updateConnectorBinding(com.metamatrix.common.config.api.ConnectorBinding)

deleteConnectorBinding

public void deleteConnectorBinding(java.lang.String deployedConnectorBindingName)
                            throws MetaMatrixComponentException
Specified by:
deleteConnectorBinding in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.deleteConnectorBinding(java.lang.String)

getConnectorTypes

public java.util.List getConnectorTypes()
                                 throws MetaMatrixComponentException
Specified by:
getConnectorTypes in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getConnectorTypes()

getExtensionPath

public java.net.URL getExtensionPath()
Specified by:
getExtensionPath in interface ConfigurationService
Since:
4.3
See Also:
ConfigurationService.getExtensionPath()

useExtensionClasspath

public boolean useExtensionClasspath()
Specified by:
useExtensionClasspath in interface ConfigurationService
See Also:
ConfigurationService.useExtensionClasspath()

getExtensionModule

public ExtensionModule getExtensionModule(java.lang.String extModuleName)
                                   throws MetaMatrixComponentException
Specified by:
getExtensionModule in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getExtensionModule(java.lang.String)

getExtensionModules

public java.util.List getExtensionModules()
                                   throws MetaMatrixComponentException
Specified by:
getExtensionModules in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.getExtensionModules()

saveExtensionModule

public void saveExtensionModule(ExtensionModule extModule)
                         throws MetaMatrixComponentException
Specified by:
saveExtensionModule in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.saveExtensionModule(com.metamatrix.common.config.api.ExtensionModule)

deleteExtensionModule

public void deleteExtensionModule(java.lang.String extModuleName)
                           throws MetaMatrixComponentException
Specified by:
deleteExtensionModule in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.deleteExtensionModule(java.lang.String)

getConnectorType

public ConnectorBindingType getConnectorType(java.lang.String connectorType)
                                      throws MetaMatrixComponentException
Specified by:
getConnectorType in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
com.metamatrix.dqp.service.ConfigurationService#getConnectorType(com.metamatrix.common.config.api.ComponentTypeID)

saveConnectorType

public void saveConnectorType(ConnectorBindingType type)
                       throws MetaMatrixComponentException
Specified by:
saveConnectorType in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
com.metamatrix.dqp.service.ConfigurationService#addConnectorType(com.metamatrix.common.config.api.ComponentType)

deleteConnectorType

public void deleteConnectorType(java.lang.String deployedConnectorType)
                         throws MetaMatrixComponentException
Specified by:
deleteConnectorType in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3
See Also:
ConfigurationService.deleteConnectorType(java.lang.String)

loadUDF

public void loadUDF()
             throws MetaMatrixComponentException
Load the User defined functions file

Specified by:
loadUDF in interface ConfigurationService
Throws:
MetaMatrixComponentException
Since:
4.3

unloadUDF

public void unloadUDF()
Unload the UDF file at the end of the DQP, because the same JVM could be used to load another DQP and we do want the static function library hanging on to old function libraries

Specified by:
unloadUDF in interface ConfigurationService

initializeService

public void initializeService(java.util.Properties properties)
                       throws ApplicationInitializationException
Specified by:
initializeService in class EmbeddedBaseDQPService
Throws:
ApplicationInitializationException
Since:
4.3
See Also:
EmbeddedBaseDQPService.initializeService(java.util.Properties)

startService

public void startService(ApplicationEnvironment environment)
                  throws ApplicationLifecycleException
Specified by:
startService in class EmbeddedBaseDQPService
Throws:
ApplicationLifecycleException
Since:
4.3
See Also:
EmbeddedBaseDQPService.startService(com.metamatrix.common.application.ApplicationEnvironment)

stopService

public void stopService()
                 throws ApplicationLifecycleException
Specified by:
stopService in class EmbeddedBaseDQPService
Throws:
ApplicationLifecycleException
Since:
4.3
See Also:
EmbeddedBaseDQPService.stopService()

getVDBLocations

public java.net.URL[] getVDBLocations()
Get path(s) for VDB(s) that are availble from the configuration to the DQP engine.

Specified by:
getVDBLocations in interface ConfigurationService
Returns:
URLs to the resources.

getEncryptionKeyStore

public java.net.URL getEncryptionKeyStore()
Specified by:
getEncryptionKeyStore in interface ConfigurationService
See Also:
ConfigurationService.getEncryptionKeyStore()

getConnectionListener

public ServerConnectionListener getConnectionListener()
Specified by:
getConnectionListener in interface ConfigurationService
Since:
4.3.2
See Also:
ConfigurationService.getConnectionListener()

getClientConnections

public java.util.Set<ServerConnection> getClientConnections()
Specified by:
getClientConnections in interface ConfigurationService
See Also:
ConfigurationService.getClientConnections()

isFullyConfiguredVDB

public boolean isFullyConfiguredVDB(VDBArchive vdb)
                             throws MetaMatrixComponentException
Specified by:
isFullyConfiguredVDB in interface ConfigurationService
Throws:
MetaMatrixComponentException

register

public void register(ConnectorBindingLifeCycleListener listener)
Register a listener for the VDB life cycle events, and get notified for when vdb is loded and unloaded

Specified by:
register in interface ConfigurationService
Parameters:
listener - - lister object

register

public void register(VDBLifeCycleListener listener)
Register a listener for the VDB life cycle events, and get notified for when vdb is loded and unloaded

Specified by:
register in interface ConfigurationService
Parameters:
listener - - lister object

useDiskBuffering

public boolean useDiskBuffering()
Use disk for buffering for result set management during the processing

Specified by:
useDiskBuffering in interface ConfigurationService
Returns:
true if yes to use buffering; false otherwise

getDiskBufferDirectory

public java.io.File getDiskBufferDirectory()
Get the directory to use for the disk buffering

Specified by:
getDiskBufferDirectory in interface ConfigurationService
Returns:
must a return a location; and exist too.

getBufferMemorySize

public java.lang.String getBufferMemorySize()
Size of Memory in MB allocated to be used by the Resultset Management before disk buffering kicks in.

Specified by:
getBufferMemorySize in interface ConfigurationService
Returns:
must a return a location

getInstanceIdenifier

public java.lang.String getInstanceIdenifier()
Specified by:
getInstanceIdenifier in interface ConfigurationService
See Also:
ConfigurationService.getInstanceIdenifier()

getProcessorBatchSize

public java.lang.String getProcessorBatchSize()
Specified by:
getProcessorBatchSize in interface ConfigurationService

getConnectorBatchSize

public java.lang.String getConnectorBatchSize()
Specified by:
getConnectorBatchSize in interface ConfigurationService

unregister

public void unregister(VDBLifeCycleListener listener)
Specified by:
unregister in interface ConfigurationService

unregister

public void unregister(ConnectorBindingLifeCycleListener listener)
Specified by:
unregister in interface ConfigurationService


Copyright © 2009. All Rights Reserved.