PofExtractor Class Reference

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

Inherits AbstractExtractor, and PortableObject.

List of all members.


Detailed Description

POF-based ValueExtractor implementation.

Author:
as/gm 2009.04.02
Since:
Coherence 3.5

Public Types

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

Public Member Functions

virtual Object::Holder extractFromEntry (Map::Entry::Holder ohEntry) const
 Extract the value from the passed Entry object.
virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 
virtual bool equals (Object::View v) const
 Compare the PofExtractor with another object to determine equality.
virtual size32_t hashCode () const
 Determine a hash value for the PofExtractor object according to the general Object#hashCode() contract.
virtual void toStream (std::ostream &out) const
 Return a human-readable description for this PofExtractor.
virtual
PofNavigator::View 
getNavigator () const
 Obtain the PofPath for this extractor.

Protected Member Functions

 PofExtractor ()
 Default constructor (for backward compatibility).
 PofExtractor (int32_t iProp)
 Constructs a PofExtractor based on a property index.
 PofExtractor (PofNavigator::View vNavigator, int32_t nTarget=VALUE)
 Constructs a PofExtractor based on a property path and the entry extraction target.

Constructor & Destructor Documentation

PofExtractor ( int32_t  iProp  )  [protected]

Constructs a PofExtractor based on a property index.

This constructor is equivalent to:

   PofExtractor::View vExtractor =
       PofExtractor::create(SimplePofPath::create(iProp), VALUE);
 

Parameters:
iProp property index

PofExtractor ( PofNavigator::View  vNavigator,
int32_t  nTarget = VALUE 
) [protected]

Constructs a PofExtractor based on a property path and the entry extraction target.

Parameters:
vNavigator POF navigator
nTarget one of the VALUE or KEY values


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.

This method will always throw a UnsupportedOperationException if called directly by the C++ client application, as its execution is only meaningful within the cluster.

It is expected that this extractor will only be used against POF-encoded binary entries within a remote partitioned cache.

Parameters:
entry an Entry object to extract a desired value from
Exceptions:
UnsupportedOperationException always, as it is expected that this extractor will only be executed within the cluster.
Returns:
the extracted value

Reimplemented from AbstractExtractor.

virtual bool equals ( Object::View  v  )  const [virtual]

Compare the PofExtractor with another object to determine equality.

Two PofExtractor objects are considered equal iff their paths are equal and they have the same target (key or value).

Returns:
true iff this PofExtractor and the passed object are equivalent

virtual size32_t hashCode (  )  const [virtual]

Determine a hash value for the PofExtractor object according to the general Object#hashCode() contract.

Returns:
an integer hash value for this PofExtractor object

Reimplemented from Object.

virtual void toStream ( std::ostream &  out  )  const [virtual]

Return a human-readable description for this PofExtractor.

Returns:
a String description of the PofExtractor

Reimplemented from Object.

virtual PofNavigator::View getNavigator (  )  const [virtual]

Obtain the PofPath for this extractor.

Returns:
the PofPath value


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