com.espertech.esper.dataflow.core
Class DataFlowServiceImpl

java.lang.Object
  extended by com.espertech.esper.dataflow.core.DataFlowServiceImpl
All Implemented Interfaces:
EPDataFlowRuntime, DataFlowService

public class DataFlowServiceImpl
extends java.lang.Object
implements DataFlowService


Constructor Summary
DataFlowServiceImpl(EPServiceProvider epService, DataFlowConfigurationStateService configurationState)
           
 
Method Summary
 void addStartGraph(CreateDataFlowDesc desc, StatementContext statementContext, EPServicesContext servicesContext, AgentInstanceContext agentInstanceContext, boolean newStatement)
           
 void destroy()
           
 EPDataFlowDescriptor getDataFlow(java.lang.String dataFlowName)
          Returns a descriptor for the given data flow, or null if the data flow has not been declared.
 java.lang.String[] getDataFlows()
          Returns the names of all declared data flows.
 EPDataFlowSavedConfiguration getSavedConfiguration(java.lang.String configurationName)
          Returns a saved dataflow configuration or null if it is not found.
 java.lang.String[] getSavedConfigurations()
          Returns the names of a saved data flow configurations.
 EPDataFlowInstance getSavedInstance(java.lang.String instanceName)
          Returns a specific saved data flow instance, or null if it has not been found
 java.lang.String[] getSavedInstances()
          Returns the instance names of a saved data flow instances.
 EPDataFlowInstance instantiate(java.lang.String dataFlowName)
          Instantiate a data flow.
 EPDataFlowInstance instantiate(java.lang.String dataFlowName, EPDataFlowInstantiationOptions options)
          Instantiate a data flow, with options.
 EPDataFlowInstance instantiateSavedConfiguration(java.lang.String configurationName)
          Instantiate a data flow from a saved configuration.
 void removeGraph(java.lang.String graphName)
           
 boolean removeSavedConfiguration(java.lang.String configurationName)
          Remove a previously saved data flow configuration.
 boolean removeSavedInstance(java.lang.String instanceName)
          Remove an instance previously saved.
 void saveConfiguration(java.lang.String dataflowConfigName, java.lang.String dataFlowName, EPDataFlowInstantiationOptions options)
          Save an existing data flow configuration (data flow name and its options) for later retrieval.
 void saveInstance(java.lang.String instanceName, EPDataFlowInstance instance)
          Save an existing instance with the runtime, for later retrieval.
 void stopGraph(java.lang.String graphName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataFlowServiceImpl

public DataFlowServiceImpl(EPServiceProvider epService,
                           DataFlowConfigurationStateService configurationState)
Method Detail

getDataFlow

public EPDataFlowDescriptor getDataFlow(java.lang.String dataFlowName)
Description copied from interface: EPDataFlowRuntime
Returns a descriptor for the given data flow, or null if the data flow has not been declared.

Specified by:
getDataFlow in interface EPDataFlowRuntime
Parameters:
dataFlowName - data flow name
Returns:
data flow descriptor

getDataFlows

public java.lang.String[] getDataFlows()
Description copied from interface: EPDataFlowRuntime
Returns the names of all declared data flows.

Specified by:
getDataFlows in interface EPDataFlowRuntime
Returns:
data flow names

addStartGraph

public void addStartGraph(CreateDataFlowDesc desc,
                          StatementContext statementContext,
                          EPServicesContext servicesContext,
                          AgentInstanceContext agentInstanceContext,
                          boolean newStatement)
                   throws ExprValidationException
Specified by:
addStartGraph in interface DataFlowService
Throws:
ExprValidationException

stopGraph

public void stopGraph(java.lang.String graphName)
Specified by:
stopGraph in interface DataFlowService

removeGraph

public void removeGraph(java.lang.String graphName)
Specified by:
removeGraph in interface DataFlowService

instantiate

public EPDataFlowInstance instantiate(java.lang.String dataFlowName)
Description copied from interface: EPDataFlowRuntime
Instantiate a data flow.

Specified by:
instantiate in interface EPDataFlowRuntime
Parameters:
dataFlowName - name of data flow to instantiate
Returns:
data flow instance

instantiate

public EPDataFlowInstance instantiate(java.lang.String dataFlowName,
                                      EPDataFlowInstantiationOptions options)
Description copied from interface: EPDataFlowRuntime
Instantiate a data flow, with options.

Specified by:
instantiate in interface EPDataFlowRuntime
Parameters:
dataFlowName - name of data flow to instantiate
options - populate options to control parameterization, instantiation etc.
Returns:
data flow instance

destroy

public void destroy()
Specified by:
destroy in interface DataFlowService

saveConfiguration

public void saveConfiguration(java.lang.String dataflowConfigName,
                              java.lang.String dataFlowName,
                              EPDataFlowInstantiationOptions options)
Description copied from interface: EPDataFlowRuntime
Save an existing data flow configuration (data flow name and its options) for later retrieval.

Specified by:
saveConfiguration in interface EPDataFlowRuntime
Parameters:
dataflowConfigName - configuration name to save, must be unique
dataFlowName - data flow name
options - options object

getSavedConfigurations

public java.lang.String[] getSavedConfigurations()
Description copied from interface: EPDataFlowRuntime
Returns the names of a saved data flow configurations.

Specified by:
getSavedConfigurations in interface EPDataFlowRuntime
Returns:
data flow configuration names

getSavedConfiguration

public EPDataFlowSavedConfiguration getSavedConfiguration(java.lang.String configurationName)
Description copied from interface: EPDataFlowRuntime
Returns a saved dataflow configuration or null if it is not found.

Specified by:
getSavedConfiguration in interface EPDataFlowRuntime
Parameters:
configurationName - name to find
Returns:
data flow configuration

instantiateSavedConfiguration

public EPDataFlowInstance instantiateSavedConfiguration(java.lang.String configurationName)
                                                 throws EPDataFlowInstantiationException
Description copied from interface: EPDataFlowRuntime
Instantiate a data flow from a saved configuration.

Specified by:
instantiateSavedConfiguration in interface EPDataFlowRuntime
Parameters:
configurationName - configuration name
Returns:
instance
Throws:
EPDataFlowInstantiationException - if the configuration name could not be found

removeSavedConfiguration

public boolean removeSavedConfiguration(java.lang.String configurationName)
Description copied from interface: EPDataFlowRuntime
Remove a previously saved data flow configuration.

Specified by:
removeSavedConfiguration in interface EPDataFlowRuntime
Parameters:
configurationName - to remove
Returns:
indicator whether found and removed

saveInstance

public void saveInstance(java.lang.String instanceName,
                         EPDataFlowInstance instance)
                  throws EPDataFlowAlreadyExistsException
Description copied from interface: EPDataFlowRuntime
Save an existing instance with the runtime, for later retrieval.

Specified by:
saveInstance in interface EPDataFlowRuntime
Parameters:
instanceName - name to use to save, must be unique among currently saved instances
instance - saved
Throws:
EPDataFlowAlreadyExistsException - if an instance by this name already exists

getSavedInstances

public java.lang.String[] getSavedInstances()
Description copied from interface: EPDataFlowRuntime
Returns the instance names of a saved data flow instances.

Specified by:
getSavedInstances in interface EPDataFlowRuntime
Returns:
data flow instance names

getSavedInstance

public EPDataFlowInstance getSavedInstance(java.lang.String instanceName)
Description copied from interface: EPDataFlowRuntime
Returns a specific saved data flow instance, or null if it has not been found

Specified by:
getSavedInstance in interface EPDataFlowRuntime
Parameters:
instanceName - to look for
Returns:
instance

removeSavedInstance

public boolean removeSavedInstance(java.lang.String instanceName)
Description copied from interface: EPDataFlowRuntime
Remove an instance previously saved.

Specified by:
removeSavedInstance in interface EPDataFlowRuntime
Parameters:
instanceName - to be removed
Returns:
indicator whether found or not

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com