#include <coherence/util/aggregator/QueryRecorder.hpp>
For example, the following code will return a QueryPlan, containing the estimated query cost and corresponding execution steps.
QueryRecorder::Handle hAgent = QueryRecorder::create(QueryRecorder::explain); QueryRecord::View vRecord = cast<QueryRecord::View>(hCache->aggregate(filter, agent));
Public Types | |
enum | RecordType { explain, trace } |
RecordType enum specifies whether the QueryRecorder should be used to produce a QueryRecord object that contains an estimated or an actual cost of the query execution. More... | |
typedef spec::Handle | Handle |
QueryRecorder Handle definition. | |
typedef spec::View | View |
QueryRecorder View definition. | |
typedef spec::Holder | Holder |
QueryRecorder Holder definition. | |
Public Member Functions | |
virtual QueryRecorder::RecordType | getType () const |
Get the record type for this query recorder. | |
virtual Object::Holder | aggregate (Set::View vSetEntries) |
virtual InvocableMap::EntryAggregator::Handle | getParallelAggregator () |
virtual Object::Holder | aggregateResults (Collection::View vCollResults) |
virtual void | readExternal (PofReader::Handle hIn) |
virtual void | writeExternal (PofWriter::Handle hOut) const |
Protected Member Functions | |
QueryRecorder () | |
Default constructor (necessary for the PortableObject interface). | |
QueryRecorder (QueryRecorder::RecordType type) | |
Construct a QueryRecorder. | |
Protected Attributes | |
enum RecordType | m_type |
This aggregator record type. |
enum RecordType |
RecordType enum specifies whether the QueryRecorder should be used to produce a QueryRecord object that contains an estimated or an actual cost of the query execution.
explain | Produce a QueryRecord object that contains an estimated cost of the query execution. |
trace | Produce a QueryRecord object that contains the actual cost of the query execution. |
QueryRecorder | ( | QueryRecorder::RecordType | type | ) | [protected] |
virtual QueryRecorder::RecordType getType | ( | ) | const [virtual] |
Get the record type for this query recorder.