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

E69640-01

MapEventFilter Class Reference

#include <coherence/util/filter/MapEventFilter.hpp>

Inherited by CacheEventFilter.

List of all members.


Detailed Description

Filter which evaluates the content of a MapEvent object according to the specified criteria.

This filter is intended to be used by various ObservableMap listeners that are interested in particular subsets of MapEvent notifications emitted by the map.

Usage examples:

see ValueChangeEventFilter

Author:
djl 2008.05.19

Public Types

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

Public Member Functions

virtual bool evaluate (Object::View v) const
 
virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 
virtual bool equals (Object::View v) const
 
virtual size32_t hashCode () const
 
virtual TypedHandle
< const String > 
toString () const
 
virtual String::View getDescription () const
 
virtual int32_t getEventMask () const
 Obtain the event mask.
virtual Filter::View getFilter () const
 Obtain the Filter object used to evaluate the event value(s).

Static Public Member Functions

static int32_t getMask (size32_t iEvent)
 Event id to event mask translation.

Static Public Attributes

static const int32_t e_inserted
 This value indicates that MapEvent::entry_inserted entry_inserted} events should be evaluated.
static const int32_t e_updated
 This value indicates that MapEvent::entry_updated entry_updated events should be evaluated.
static const int32_t e_deleted
 This value indicates that MapEvent::entry_deleted entry_deleted events should be evaluated.
static const int32_t e_updated_entered
 This value indicates that MapEvent::entry_updated entry_updated events should be evaluated, but only if filter evaluation is false for the old value and true for the new value.
static const int32_t e_updated_left
 This value indicates that MapEvent::entry_updated entry_updated events should be evaluated, but only if filter evaluation is true for the old value and false for the new value.
static const int32_t e_updated_within
 This value indicates that MapEvent::entry_updated entry_updated events should be evaluated, but only if filter evaluation is true for both the old and the new value.
static const int32_t e_all
 This value indicates that all events should be evaluated.
static const int32_t e_keyset
 This value indicates that all events that would affect the result of a coherence::util::QueryMap::keySet(coherence::util::Filter) query should be evaluated.

Protected Member Functions

 MapEventFilter ()
 Default constructor (necessary for the PortableObject interface).
 MapEventFilter (Filter::View vFilter)
 Construct a MapEventFilter that evaluates MapEvent objects that would affect the results of a keySet filter issued by a previous call to coherence::util::QueryMap::keySet(coherence::util::Filter::View).
 MapEventFilter (int32_t nMask, Filter::View vFilter=NULL)
 Construct a MapEventFilter that evaluates MapEvent objects based on the specified combination of event types.

Protected Attributes

int32_t m_nMask
 The event mask.
FinalView< Filter > f_vFilter
 The event value(s) filter.

Constructor & Destructor Documentation

MapEventFilter ( Filter::View  vFilter  )  [protected]

Construct a MapEventFilter that evaluates MapEvent objects that would affect the results of a keySet filter issued by a previous call to coherence::util::QueryMap::keySet(coherence::util::Filter::View).

It is possible to easily implement continuous query functionality.

Using this constructor is equivalent to: MapEventFilter::create(e_keyset, vFilter);

Parameters:
vFilter the filter passed previously to a keySet() query method

MapEventFilter ( int32_t  nMask,
Filter::View  vFilter = NULL 
) [protected]

Construct a MapEventFilter that evaluates MapEvent objects based on the specified combination of event types.

Parameters:
nMask combination of any of the e_* values
vFilter (optional) the filter used for evaluating event values


Member Function Documentation

virtual int32_t getEventMask (  )  const [virtual]

Obtain the event mask.

The mask value is concatenation of any of the E_* values.

Returns:
the event mask

virtual Filter::View getFilter (  )  const [virtual]

Obtain the Filter object used to evaluate the event value(s).

Returns:
the filter used to evaluate the event value(s)

static int32_t getMask ( size32_t  iEvent  )  [static]

Event id to event mask translation.

Parameters:
iEvent the event index
Returns:
the translated event mask


Member Data Documentation

const int32_t e_inserted [static]

This value indicates that MapEvent::entry_inserted entry_inserted} events should be evaluated.

The event will be fired if there is no filter specified or the filter evaluates to true for a new value.

const int32_t e_updated [static]

This value indicates that MapEvent::entry_updated entry_updated events should be evaluated.

The event will be fired if there is no filter specified or the filter evaluates to true when applied to either old or new value.

const int32_t e_deleted [static]

This value indicates that MapEvent::entry_deleted entry_deleted events should be evaluated.

The event will be fired if there is no filter specified or the filter evaluates to true for an old value.

const int32_t e_updated_entered [static]

This value indicates that MapEvent::entry_updated entry_updated events should be evaluated, but only if filter evaluation is false for the old value and true for the new value.

This corresponds to an item that was not in a keySet filter result changing such that it would now be in that keySet filter result.

const int32_t e_updated_left [static]

This value indicates that MapEvent::entry_updated entry_updated events should be evaluated, but only if filter evaluation is true for the old value and false for the new value.

This corresponds to an item that was in a keySet filter result changing such that it would no longer be in that keySet filter result.

const int32_t e_updated_within [static]

This value indicates that MapEvent::entry_updated entry_updated events should be evaluated, but only if filter evaluation is true for both the old and the new value.

This corresponds to an item that was in a keySet filter result changing but not leaving the keySet filter result.


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