dropDataViewEngine

Syntax

dropDataViewEngine(name)

Details

Deletes the specified data view engine in the current CEP engine.

Parameters

name is a string indicating the name of the data view engine.

Returns

None.

Examples

class MainMonitor: CEPMonitor {
    def MainMonitor(){
    }
    // Automatically called when the engine is deleted; remove the shared stream table
    def onunload(){ 
      undef('orderDV', SHARED)
      dropDataViewEngine('orderDV')
    }
	def checkOrders(newOrder)
    // Create a DataViewEngine, specifying the primary key as the 'code' column, 
    // to keep track of the latest order information for each stock
    def onload(){
        addEventListener(checkOrders,'Orders',,'all')  
        orderDV = streamTable(array(STRING, 0) as market, array(STRING, 0) as code, array(DOUBLE, 0) as price, array(INT, 0) as qty, array(TIMESTAMP, 0) as updateTime) 
        share(orderDV,'orderDV') 
        createDataViewEngine('orderDV', objByName('orderDV'), `code, `updateTime)
    }
    // Update the latest order information for each stock
    def checkOrders(newOrder){
		getDataViewEngine('orderDV').append!(table(newOrder.market as market, newOrder.code as code, newOrder.price as price, newOrder.qty as qty))
    }
}

Related functions: createCEPEngine, createDataViewEngine, deleteDataViewItems, getDataViewEngine