Oracle® Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.2.1.1.0)

E69640-01

AbstractExtractor Class Reference

#include <coherence/util/extractor/AbstractExtractor.hpp>

Inherited by AbstractCompositeExtractor, ConditionalExtractor, EntryExtractor, IdentityExtractor, KeyExtractor, PofExtractor, and ReflectionExtractor.

List of all members.


Detailed Description

Abstract base for ValueExtractor implementations.

It provides common functionality that allows any extending extractor to be used as a value Comparator.

Starting with Coherence 3.5, when used to extract information that is coming from a Map, subclasses have the additional ability to operate against the Map::Entry instead of just the value. In other words, like the EntryExtractor class, this allows an extractor implementation to extract a desired value using all available information on the corresponding Map::Entry object and is intended to be used in advanced custom scenarios, when application code needs to look at both key and value at the same time or can make some very specific assumptions regarding to the implementation details of the underlying Entry object. To maintain full backwards compatibility, the default behavior remains to extract from the Value property of the Map::Entry.

Note: subclasses are responsible for initialization and POF serialization of the m_nTarget field.

Author:
djl 2008.03.10

Public Types

typedef spec::Handle Handle
 AbstractExtractor Handle definition.
typedef spec::View View
 AbstractExtractor View definition.
typedef spec::Holder Holder
 AbstractExtractor Holder definition.

Public Member Functions

virtual Object::Holder extract (Object::Holder ohTarget) const
 
virtual int32_t compareEntries (QueryMap::Entry::View vEntry1, QueryMap::Entry::View vEntry2) const
 
virtual int32_t compare (Object::View v1, Object::View v2) const
 
virtual Object::Holder extractFromEntry (Map::Entry::Holder ohEntry) const
 Extract the value from the passed Entry object.
virtual Object::Holder extractOriginalFromEntry (MapTrigger::Entry::Holder ohEntry) const
 Extract the value from the "original value" of the passed Entry object.
virtual int32_t getTarget () const
 Return the target of the extractor.

Static Public Attributes

static const int32_t value
 Indicates that the extractFromEntry operation should use the Entry's value.
static const int32_t key
 Indicates that the extractFromEntry operation should use the Entry's value.

Protected Attributes

int32_t m_nTarget
 Specifies which part of the entry should be used by the extractFromEntry operation.

Member Function Documentation

virtual Object::Holder extractFromEntry ( Map::Entry::Holder  ohEntry  )  const [virtual]

Extract the value from the passed Entry object.

The returned value should follow the conventions outlined in the extract method. By overriding this method, an extractor implementation is able to extract a desired value using all available information on the corresponding Map::Entry object and is intended to be used in advanced custom scenarios, when application code needs to look at both key and value at the same time or can make some very specific assumptions regarding to the implementation details of the underlying Entry object.

Parameters:
ohEntry an Entry object to extract a desired value from
Returns:
the extracted value
Since:
Coherence 3.5

Reimplemented in PofExtractor.

virtual Object::Holder extractOriginalFromEntry ( MapTrigger::Entry::Holder  ohEntry  )  const [virtual]

Extract the value from the "original value" of the passed Entry object.

This method's conventions are exactly the same as for the extractFromEntry method.

Parameters:
ohEntry an Entry object whose original value should be used to extract the desired value from
Returns:
the extracted value or NULL if the original value is not present
Since:
Coherence 3.6

virtual int32_t getTarget (  )  const [virtual]

Return the target of the extractor.

Returns:
the target of the extractor
Since:
Coherence 12.2.1


Member Data Documentation

const int32_t value [static]

Indicates that the extractFromEntry operation should use the Entry's value.

Since:
Coherence 3.5

const int32_t key [static]

Indicates that the extractFromEntry operation should use the Entry's value.

Since:
Coherence 3.5

int32_t m_nTarget [protected]

Specifies which part of the entry should be used by the extractFromEntry operation.

Legal values are value (default) or key.

Note: subclasses are responsible for initialization and POF serialization of this field.

Since:
Coherence 3.5


The documentation for this class was generated from the following file:
Copyright © 2000, 2016, Oracle and/or its affiliates. All rights reserved.