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

E90870-01

ViewBuilder Class Reference

#include <coherence/net/ViewBuilder.hpp>

Inherits Object.

List of all members.


Detailed Description

The ViewBuilder provides a means to build() a view (ContinuousQueryCache) using a fluent pattern / style.

See also:
ContinuousQueryCache
Author:
rl 6.2.19
Since:
12.2.1.4

Public Types

typedef spec::Handle Handle
 ViewBuilder Handle definition.
typedef spec::View View
 ViewBuilder View definition.
typedef spec::Holder Holder
 ViewBuilder Holder definition.
typedef TypedHandle
< NamedCache
NamedCacheHandle
 NamedCache Handle definition.

Public Member Functions

ViewBuilder::Handle filter (Filter::View vFilter)
 The Filter that will be used to define the entries maintained in this view.
ViewBuilder::Handle listener (MapListener::Handle hListener)
 The MapListener that will receive all events, including those that result from the initial population of the view.
ViewBuilder::Handle map (ValueExtractor::View VMapper)
 The ValueExtractor that this view will use to transform the results from the underlying cache prior to storing them locally.
ViewBuilder::Handle keys ()
 The resulting view will only cache keys.
ViewBuilder::Handle values ()
 The resulting view with cache both keys and values.
NamedCacheHandle build ()
 Construct a view of the NamedCache provided to this builder.

Protected Member Functions

 ViewBuilder (NamedCacheHandle hCache)
 Construct a new ViewBuilder for the provided NamedCache.
 ViewBuilder (Supplier::Handle hSupplierCache)
 Construct a new ViewBuilder for the provided NamedCache.

Protected Attributes

FinalHolder< Supplierf_hSupplierCache
 The Supplier returning a NamedCache from which the view will be created.
MemberView< Filterm_vFilter
 The Filter that will be used to define the entries maintained in this view.
MemberHandle
< MapListener
m_hListener
 The MapListener that will receive all the events from the view, including those corresponding to its initial population.
MemberView
< ValueExtractor
m_vMapper
 The ValueExtractor that will be used to transform values retrieved from the underlying cache before storing them locally; if specified, this view will become read-only.
bool m_fCacheValues
 Flag controlling if the view will cache both keys and values or only keys.

Constructor & Destructor Documentation

ViewBuilder ( NamedCacheHandle  hCache  )  [protected]

Construct a new ViewBuilder for the provided NamedCache.

Parameters:
hCache the NamedCache from which the view will be created

ViewBuilder ( Supplier::Handle  hSupplierCache  )  [protected]

Construct a new ViewBuilder for the provided NamedCache.

The Supplier should return a new NamedCache instance upon each invocation.

Parameters:
hSupplierCache the Supplier returning a NamedCache from which the view will be created


Member Function Documentation

ViewBuilder::Handle filter ( Filter::View  vFilter  ) 

The Filter that will be used to define the entries maintained in this view.

If no Filter is specified, AlwaysFilter::INSTANCE will be used.

Parameters:
vFilter the Filter that will be used to query the underlying NamedCache
Returns:
this ViewBuilder

ViewBuilder::Handle listener ( MapListener::Handle  hListener  ) 

The MapListener that will receive all events, including those that result from the initial population of the view.

Parameters:
hListener the MapListener that will receive all the events from the view, including those corresponding to its initial population.
Returns:
this ViewBuilder

ViewBuilder::Handle map ( ValueExtractor::View  VMapper  ) 

The ValueExtractor that this view will use to transform the results from the underlying cache prior to storing them locally.

Parameters:
vMapper the ValueExtractor that will be used to transform values retrieved from the underlying cache before storing them locally; if specified, this view will become read-only
Returns:
this ViewBuilder

ViewBuilder::Handle keys (  ) 

The resulting view will only cache keys.

NOTE: this is mutually exclusive with values().

Returns:
this ViewBuilder

ViewBuilder::Handle values (  ) 

The resulting view with cache both keys and values.

NOTE: this is mutually exclusive with keys().

Returns:
this ViewBuilder

NamedCacheHandle build (  ) 

Construct a view of the NamedCache provided to this builder.

Returns:
the view of the NamedCache provided to this builder


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