Show / Hide Table of Contents

Class ConditionalExtractor

An IndexAwareExtractor implementation that is only used to create a ConditionalIndex.

The underlying IValueExtractor is used for value extraction during index creation and is the extractor that is associated with the created ConditionalIndex in the given index map. Using the ConditionalExtractor to extract values in not supported.

Inheritance
object
AbstractExtractor
ConditionalExtractor
Implements
IQueryCacheComparer
IComparer
IIndexAwareExtractor
IValueExtractor
IPortableObject
Inherited Members
AbstractExtractor.Target
AbstractExtractor.Compare(object, object)
AbstractExtractor.CompareEntries(IQueryCacheEntry, IQueryCacheEntry)
AbstractExtractor.ExtractFromEntry(ICacheEntry)
AbstractExtractor.ExtractOriginalFromEntry(CacheEntry)
AbstractExtractor.VALUE
AbstractExtractor.KEY
AbstractExtractor.m_target
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Util.Extractor
Assembly: Coherence.dll
Syntax
public class ConditionalExtractor : AbstractExtractor, IQueryCacheComparer, IComparer, IIndexAwareExtractor, IValueExtractor, IPortableObject

Constructors

ConditionalExtractor()

Construct the ConditionalExtractor.

Declaration
public ConditionalExtractor()

ConditionalExtractor(IFilter, IValueExtractor, bool)

Construct the ConditionalExtractor.

Declaration
public ConditionalExtractor(IFilter filter, IValueExtractor extractor, bool forwardIndex)
Parameters
Type Name Description
IFilter filter

The filter used by this extractor to create a ConditionalIndex; must not be null.

IValueExtractor extractor

The extractor used by this extractor to create a ConditionalIndex; the created index will be associated with this extractor in the given index map; must not be null.

bool forwardIndex

Specifies whether or not this extractor will create a ConditionalIndex that supports a forward index.

Properties

Extractor

The underlying extractor.

Declaration
protected IValueExtractor Extractor { get; }
Property Value
Type Description
IValueExtractor

Filter

The filter used by this extractor.

Declaration
protected IFilter Filter { get; }
Property Value
Type Description
IFilter

IsForwardIndexSupported

Specifies whether or not this extractor will create a ConditionalIndex that supports a forward index.

Declaration
protected bool IsForwardIndexSupported { get; }
Property Value
Type Description
bool

Methods

CreateIndex(bool, IComparer, IDictionary)

Create an index and associate it with the corresponding extractor.

Important: it is a responsibility of this method's implementations to place the necessary <IValueExtractor, ICacheEntry> entry into the given map of indexes.

Declaration
public ICacheIndex CreateIndex(bool ordered, IComparer comparer, IDictionary dict)
Parameters
Type Name Description
bool ordered

true iff the contents of the indexed information should be ordered; false otherwise.

IComparer comparer

The IComparator object which imposes an ordering of entries in the index contents; or null if the entries' values natural ordering should be used.

IDictionary dict

IDictionary to be updated with the created index.

Returns
Type Description
ICacheIndex

The created index; null if the index has not been created.

DestroyIndex(IDictionary)

Destroy an existing index and remove it from the given dictionary of indexes.

Declaration
public ICacheIndex DestroyIndex(IDictionary dict)
Parameters
Type Name Description
IDictionary dict

IDictionary to be updated by removing the index being destroyed.

Returns
Type Description
ICacheIndex

The destroyed index; null if the index does not exist.

Equals(object)

Compare the ConditionalExtractor with another object to determine equality.

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
object o

The reference object with which to compare.

Returns
Type Description
bool

true if this ConditionalExtractor and the passed object are equivalent.

Overrides
object.Equals(object)
Remarks

Two ConditionalExtractor objects are considered equal iff their underlying IFilters, IValueExtractors and support for forward indices are equal.

Extract(object)

Using a ConditionalExtractor to extract values is not supported.

Declaration
public override object Extract(object oTarget)
Parameters
Type Name Description
object oTarget

An object to retrieve the value from.

Returns
Type Description
object

The extracted value as an object; null is an acceptable value.

Overrides
AbstractExtractor.Extract(object)
Exceptions
Type Condition
InvalidOperationException

ConditionalExtractor may not be used as an extractor.

GetHashCode()

Determine a hash value for the ConditionalExtractor object according to the general Object.GetHashCode contract.

Declaration
public override int GetHashCode()
Returns
Type Description
int

An integer hash value for this ConditionalExtractor object.

Overrides
object.GetHashCode()

ReadExternal(IPofReader)

Deserialize model using specified reader.

Declaration
public void ReadExternal(IPofReader reader)
Parameters
Type Name Description
IPofReader reader

Reader to use.

ToString()

Return a human-readable description for this ConditionalExtractor.

Declaration
public override string ToString()
Returns
Type Description
string

a String description of the ConditionalExtractor

Overrides
object.ToString()

WriteExternal(IPofWriter)

Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.

Declaration
public void WriteExternal(IPofWriter writer)
Parameters
Type Name Description
IPofWriter writer

The IPofWriter to which to write the object's state.

Exceptions
Type Condition
IOException

If an I/O error occurs.

Implements

IQueryCacheComparer
IComparer
IIndexAwareExtractor
IValueExtractor
IPortableObject
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.