Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.util.filter
Class WrapperQueryRecorderFilter

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.util.filter.AbstractQueryRecorderFilter
                  extended by com.tangosol.util.filter.WrapperQueryRecorderFilter

All Implemented Interfaces:
Filter, EntryFilter, QueryRecorderFilter

public class WrapperQueryRecorderFilter
extends AbstractQueryRecorderFilter

QueryRecorderFilter wrapper class.

Since:
Coherence 3.7.1
Author:
tb 2011.06.05

Constructor Summary
WrapperQueryRecorderFilter(Filter filter)
          Construct a WrapperQueryRecorderFilter.

 

Method Summary
 boolean evaluate(java.lang.Object o)
          Apply the test to the object.
 boolean evaluateEntry(java.util.Map.Entry entry)
          Apply the test to a Map Entry.
 void explain(QueryContext ctx, QueryRecord.PartialResult.ExplainStep step, java.util.Set setKeys)
          Record the projected query execution cost by this filter.
 boolean trace(QueryContext ctx, QueryRecord.PartialResult.TraceStep step, java.util.Map.Entry entry)
          Evaluate the specified entry against this filter and record the evaluation cost on the given step of the QueryRecord.
 Filter trace(QueryContext ctx, QueryRecord.PartialResult.TraceStep step, java.util.Set setKeys)
          Filter the given keys using available indexes and record the cost of execution on the given step of the QueryRecord.

 

Methods inherited from class com.tangosol.util.filter.AbstractQueryRecorderFilter
explain, trace, trace

 

Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong, toLong

 

Constructor Detail

WrapperQueryRecorderFilter

public WrapperQueryRecorderFilter(Filter filter)
Construct a WrapperQueryRecorderFilter.
Parameters:
filter - the filter to wrap

Method Detail

evaluate

public boolean evaluate(java.lang.Object o)
Apply the test to the object.
Parameters:
o - the object to test
Returns:
true if the test passes, false otherwise

evaluateEntry

public boolean evaluateEntry(java.util.Map.Entry entry)
Apply the test to a Map Entry.
Parameters:
entry - the Map Entry to evaluate; never null
Returns:
true if the test passes, false otherwise

explain

public void explain(QueryContext ctx,
                    QueryRecord.PartialResult.ExplainStep step,
                    java.util.Set setKeys)
Record the projected query execution cost by this filter.

This method is expected to record the order of execution and estimated cost of applying corresponding indexes in the given step without actually applying any indexes or evaluating entries.

Specified by:
explain in interface QueryRecorderFilter
Overrides:
explain in class AbstractQueryRecorderFilter
Parameters:
ctx - the query context
step - the step used to record the estimated execution cost
setKeys - the set of keys that would be filtered

trace

public Filter trace(QueryContext ctx,
                    QueryRecord.PartialResult.TraceStep step,
                    java.util.Set setKeys)
Filter the given keys using available indexes and record the cost of execution on the given step of the QueryRecord.

This method should record the size of the given key set before and after applying corresponding indexes using QueryRecord.PartialResult.RecordableStep.recordPreFilterKeys(int) and QueryRecord.PartialResult.TraceStep.recordPostFilterKeys(int) as well as the corresponding execution time using the QueryRecord.PartialResult.TraceStep.recordDuration(long) method.

This method is only called if the filter is an IndexAwareFilter and its implementations should explicitly call applyIndex() to actually perform the query. Additionally, this method should return the filter object (if any) returned by the applyIndex() call.

Specified by:
trace in interface QueryRecorderFilter
Overrides:
trace in class AbstractQueryRecorderFilter
Parameters:
ctx - the query context
step - the step used to record the execution cost
setKeys - the mutable set of keys that remain to be filtered
Returns:
the filter returned from IndexAwareFilter.applyIndex(Map, Set)

trace

public boolean trace(QueryContext ctx,
                     QueryRecord.PartialResult.TraceStep step,
                     java.util.Map.Entry entry)
Evaluate the specified entry against this filter and record the evaluation cost on the given step of the QueryRecord.

This method should record the corresponding latencies using QueryRecord.PartialResult.TraceStep.recordDuration(long).

Implementations are responsible for explicitly calling evaluateEntry() method to perform the actual entry evaluation. Additionally, this method should return the result of the evaluateEntry call.

Specified by:
trace in interface QueryRecorderFilter
Overrides:
trace in class AbstractQueryRecorderFilter
Parameters:
ctx - the context
step - the step used to record the evaluation cost
entry - the entry to evaluate
Returns:
the result returned from EntryFilter.evaluateEntry(Map.Entry)

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.