net.esper.eql.db
Class PollExecStrategyDBQuery

java.lang.Object
  extended by net.esper.eql.db.PollExecStrategyDBQuery
All Implemented Interfaces:
PollExecStrategy

public class PollExecStrategyDBQuery
extends Object
implements PollExecStrategy

Viewable providing historical data from a database.


Constructor Summary
PollExecStrategyDBQuery(EventAdapterService eventAdapterService, EventType eventType, ConnectionCache connectionCache, String preparedStatementText, Map<String,DBOutputTypeDesc> outputTypes)
          Ctor.
 
Method Summary
 void destroy()
          Indicate we are no going to use this object again.
 void done()
          Indicate we are done polling and can release resources.
 List<EventBean> poll(Object[] lookupValues)
          Poll events using the keys provided.
 void start()
          Start the poll, called before any poll operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollExecStrategyDBQuery

public PollExecStrategyDBQuery(EventAdapterService eventAdapterService,
                               EventType eventType,
                               ConnectionCache connectionCache,
                               String preparedStatementText,
                               Map<String,DBOutputTypeDesc> outputTypes)
Ctor.

Parameters:
eventAdapterService - for generating event beans
preparedStatementText - is the SQL to use for polling
outputTypes - describe columns selected by the SQL
eventType - is the event type that this poll generates
connectionCache - caches Connection and PreparedStatement
Method Detail

start

public void start()
Description copied from interface: PollExecStrategy
Start the poll, called before any poll operation.

Specified by:
start in interface PollExecStrategy

done

public void done()
Description copied from interface: PollExecStrategy
Indicate we are done polling and can release resources.

Specified by:
done in interface PollExecStrategy

destroy

public void destroy()
Description copied from interface: PollExecStrategy
Indicate we are no going to use this object again.

Specified by:
destroy in interface PollExecStrategy

poll

public List<EventBean> poll(Object[] lookupValues)
Description copied from interface: PollExecStrategy
Poll events using the keys provided.

Specified by:
poll in interface PollExecStrategy
Parameters:
lookupValues - is keys for exeuting a query or such
Returns:
a list of events for the keys

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com