Go to main content
1/43
Contents
List of Examples
List of Figures
List of Tables
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
Part I Getting Started
1
Introduction
1.1
Components Overview
1.2
Types Of Clients
1.2.1
Data Clients
1.2.2
Real Time Clients
1.3
Client APIs
1.4
POF Serialization
1.5
Understanding Client Configuration Files
2
Installing a Client Distribution
2.1
Installing Coherence for Java
2.2
Installing the C++ Client Distribution
2.2.1
Supported Environments
2.2.2
Microsoft-Specific Requirements
2.2.3
Extracting the Coherence for C++ Distribution
2.3
Installing the .NET Client Distribution
2.3.1
Prerequisites
2.3.2
Running the Installer
2.3.3
Deploying Coherence for .NET
2.4
Compatibility Between Coherence*Extend Versions
3
Setting Up Coherence*Extend
3.1
Overview
3.2
Configuring the Cluster Side
3.2.1
Setting Up Extend Proxy Services
3.2.1.1
Defining a Proxy Service
3.2.1.2
Defining Multiple Proxy Service Instances
3.2.1.3
Defining Multiple Proxy Services
3.2.1.4
Disabling Cluster Service Proxies
3.2.1.5
Specifying Read-Only NamedCache Access
3.2.1.6
Specifying NamedCache Locking
3.2.2
Defining Caches for Use By Extend Clients
3.3
Configuring the Client Side
3.3.1
Defining a Remote Cache
3.3.2
Using a Remote Cache as a Back Cache
3.3.3
Defining Remote Invocation Schemes
3.3.4
Defining Multiple Remote Addresses
3.3.5
Detecting Connection Errors
3.3.6
Disabling TCMP Communication
3.4
Using an Address Provider for TCP Addresses
3.5
Load Balancing Connections
3.5.1
Using Proxy-Based Load Balancing
3.5.1.1
Understanding the Proxy-Based Load Balancing Default Algorithm
3.5.1.2
Implementing a Custom Proxy-Based Load Balancing Strategy
3.5.2
Using Client-Based Load Balancing
4
Building Your First Extend Client
4.1
Overview of the Extend Example
4.2
Step 1: Configure the Cluster Side
4.3
Step 2: Configure the Client Side
4.4
Step 3: Create the Sample Client
4.5
Step 4: Start the Cache Server Process
4.6
Step 5: Run the Application
5
Best Practices for Coherence*Extend
5.1
Run Proxy Servers with Local Storage Disabled
5.2
Do Not Run a Near Cache on a Proxy Server
5.3
Configure Heap NIO Space to be Equal to the Max Heap Size
5.4
Set Worker Thread Pool Sizes According to the Needs of the Application
5.5
Be Careful When Making InvocationService Calls
5.6
Be Careful When Placing Collection Classes in the Cache
5.7
Configure POF Serializers for Cache Servers
5.8
Use Node Locking Instead of Thread Locking
Part II Creating Java Extend Clients
Part III Creating C++ Extend Clients
6
Setting Up C++ Application Builds
6.1
Setting up the Compiler for Coherence-Based Applications
6.2
Including Coherence Header Files
6.3
Linking the Coherence Library
6.4
Setting the run-time Library and Search Path
6.5
Deploying Coherence for C++
7
Configuration and Usage for C++ Clients
7.1
General Instructions
7.2
Implementing the C++ Application
7.3
Compiling and Linking the Application
7.4
Configure Paths
7.5
Configure Coherence*Extend
7.5.1
Configure Coherence*Extend in the Cluster
7.5.2
Configuring Coherence*Extend on the Client
7.5.2.1
Defining a Local Cache for C++ Clients
7.5.2.2
Defining a Near Cache for C++ Clients
7.5.3
Connection Error Detection and Failover
7.6
Obtaining a Cache Reference with C++
7.7
Cleaning up Resources Associated with a Cache
7.8
Configuring and Using the Coherence for C++ Client Library
7.8.1
Setting the Configuration File Location with an Environment Variable
7.8.2
Setting the Configuration File Location Programmatically
7.9
Operational Configuration File (tangosol-coherence-override.xml)
7.10
Configuring a Logger
7.11
Launching a Coherence DefaultCacheServer Proxy
8
Understanding the Coherence for C++ API
8.1
CacheFactory
8.2
NamedCache
8.3
QueryMap
8.4
ObservableMap
8.5
InvocableMap
8.6
Filter
8.7
Value Extractors
8.8
Entry Processors
8.9
Entry Aggregators
9
Using the Coherence C++ Object Model
9.1
Using the Object Model
9.1.1
Coherence Namespaces
9.1.2
Understanding the Base Object
9.1.3
Automatically Managed Memory
9.1.3.1
Referencing Managed Objects
9.1.3.2
Using handles
9.1.3.3
Managed Object Instantiation
9.1.4
Managed Strings
9.1.4.1
String Instantiation
9.1.4.2
Auto-Boxed Strings
9.1.5
Type Safe Casting
9.1.5.1
Down Casting
9.1.6
Managed Arrays
9.1.7
Collection Classes
9.1.8
Managed Exceptions
9.1.9
Object Immutability
9.1.10
Integrating Existing Classes into the Object Model
9.2
Writing New Managed Classes
9.2.1
Specification-Based Managed Class Definition
9.2.2
Equality, Hashing, Cloning, Immutability, and Serialization
9.2.3
Threading
9.2.4
Weak References
9.2.5
Virtual Constructors
9.2.6
Advanced Handle Types
9.2.7
Thread Safety
9.2.7.1
Synchronization and Notification
9.2.7.2
Thread Safe Handles
9.2.7.3
Escape Analysis
9.2.7.4
Thread-Local Allocator
9.3
Diagnostics and Troubleshooting
9.3.1
Thread Dumps
9.3.2
Memory Leak Detection
9.3.3
Memory Corruption Detection
9.4
Application Launcher - Sanka
9.4.1
Command line syntax
9.4.2
Built-in Executables
9.4.3
Sample Custom Executable Class
10
Building Integration Objects (C++)
10.1
POF Intrinsics
10.2
Serialization Options
10.2.1
Managed<T> (Free-Function Serialization)
10.2.2
PortableObject (Self-Serialization)
10.2.3
PofSerializer (External Serialization)
10.3
Using POF Object References
10.3.1
Enabling POF Object References
10.3.2
Registering POF Object Identities for Circular and Nested Objects
10.4
Registering Custom C++ Types
10.5
Implementing a Java Version of a C++ Object
10.6
Understanding Serialization Performance
10.7
Using POF Annotations to Serialize Objects
10.7.1
Annotating Objects for POF Serialization
10.7.2
Registering POF Annotated Objects
10.7.3
Enabling Automatic Indexing
10.7.4
Providing a Custom Codec
11
Performing Continuous Queries (C++)
11.1
Uses for Continuous Query Caching
11.2
Understanding Continuous Query Caching
11.3
Defining a Continuous Query Cache
11.4
Cleaning up Continuous Query Cache Resources
11.5
Caching Only Keys Versus Keys and Values
11.5.1
CacheValues Property and Event Listeners
11.5.2
Using ReflectionExtractor with Continuous Query Caches
11.6
Listening to a Continuous Query Cache
11.6.1
Avoiding Unexpected Results
11.6.2
Achieving a Stable Materialized View
11.6.3
Support for Synchronous and Asynchronous Listeners
11.7
Making a Continuous Query Cache Read-Only
12
Querying a Cache (C++)
12.1
Query Functionality
12.2
Simple Queries
12.2.1
Querying Partitioned Caches
12.2.2
Querying Near Caches
12.3
Query Concepts
12.4
Queries Involving Multi-Value Attributes
12.5
ChainedExtractor
12.6
QueryRecorder
13
Performing Remote Invocations (C++)
13.1
Configuring and Using the Remote Invocation Service
13.2
Registering Invocable Implementation Classes
14
Using Cache Events (C++)
14.1
Listener Interface and Event Object
14.2
Caches and Classes that Support Events
14.3
Signing Up for all Events
14.4
MultiplexingMapListener
14.5
Configuring a MapListener for a Cache
14.6
Signing Up for Events on Specific Identities
14.7
Filtering Events
14.8
"Lite" Events
14.9
Advanced: Listening to Queries
14.10
Advanced: Synthetic Events
14.11
Advanced: Backing Map Events
14.12
Advanced: Synchronous Event Listeners
15
Performing Transactions (C++)
15.1
Using the Transaction API within an Entry Processor
15.2
Creating a Stub Class for a Transactional Entry Processor
15.3
Registering a Transactional Entry Processor User Type
15.4
Configuring the Cluster-Side Transactional Caches
15.5
Configuring the Client-Side Remote Cache
15.6
Using a Transactional Entry Processor from a C++ Client
16
Sample C++ Application
16.1
Prerequisites for Building and Running the Sample Applications
16.2
Starting a Coherence Proxy Service and Cache Server
16.3
Building the Sample Applications
16.4
Starting a Sample Application
16.5
Running the hellogrid Example
16.6
Running the console Example
16.7
Running the contacts Example
Part IV Creating .NET Extend Clients
17
Configuration and Usage for .NET Clients
17.1
General Instructions
17.2
Configuring Coherence*Extend
17.2.1
Configuring Coherence*Extend in the Cluster
17.2.2
Configuring Coherence*Extend on the Client
17.2.2.1
Defining a Local Cache for .NET Clients
17.2.2.2
Defining a Near Cache for .NET Clients
17.2.3
Connection Error Detection and Failover
17.3
Starting a Coherence DefaultCacheServer Process
17.4
Obtaining a Cache Reference with .NET
17.5
Cleaning Up Resources Associated with a Cache
18
Building Integration Objects (.NET)
18.1
Overview of Building Integration Objects (.NET)
18.2
Creating an IPortableObject Implementation
18.3
Implementing a Java Version of a .NET Object
18.3.1
Creating a PortableObject Implementation (Java)
18.4
Registering Custom Types on the .NET Client
18.5
Registering Custom Types in the Cluster
18.6
Evolvable Portable User Types
18.7
Making Types Portable Without Modification
18.8
Using POF Object References
18.8.1
Enabling POF Object References
18.8.2
Registering POF Object Identities for Circular and Nested Objects
18.9
Using POF Annotations to Serialize Objects
18.9.1
Annotating Objects for POF Serialization
18.9.2
Registering POF Annotated Objects
18.9.3
Enabling Automatic Indexing
18.9.4
Providing a Custom Codec
19
Using the Coherence .NET Client Library
19.1
Setting Up the Coherence .NET Client Library
19.2
Using the Coherence .NET APIs
19.2.1
CacheFactory
19.2.2
IConfigurableCacheFactory
19.2.3
DefaultConfigurableCacheFactory
19.2.4
Logger
19.2.5
Using the Common.Logging Library
19.2.6
INamedCache
19.2.7
IQueryCache
19.2.8
QueryRecorder
19.2.9
IObservableCache
19.2.9.1
Responding to Cache Events
19.2.10
IInvocableCache
19.2.11
Filters
19.2.12
Value Extractors
19.2.13
Entry Processors
19.2.14
Entry Aggregators
20
Performing Continuous Queries (.NET)
20.1
Uses for Continuous Query Caching
20.2
Understanding Continuous Query Caching
20.3
Constructing a Continuous Query Cache
20.4
Cleaning Up Continuous Query Cache Resources
20.5
Caching Only Keys Versus Keys and Values
20.6
Listening to a Continuous Query Cache
20.6.1
Achieving a Stable Materialized View
20.6.2
Support for Synchronous and Asynchronous Listeners
20.7
Making a Continuous Query Cache Read-Only
21
Performing Remote Invocations (.NET)
21.1
Configuring and Using the Remote Invocation Service
22
Performing Transactions (.NET)
22.1
Using the Transaction API within an Entry Processor
22.2
Creating a Stub Class for a Transactional Entry Processor
22.3
Registering a Transactional Entry Processor User Type
22.4
Configuring the Cluster-Side Transactional Caches
22.5
Configuring the Client-Side Remote Cache
22.6
Using a Transactional Entry Processor from a .NET Client
23
Managing ASP.NET Session State
23.1
Overview
23.2
Setting Up Coherence Session Management
23.2.1
Enable the Coherence Session Provider
23.2.2
Configure the Cluster-Side ASP Session Caches
23.2.3
Configure a Client-Side ASP Session Remote Cache
23.3
Selecting a Session Model
23.3.1
Specify the Session Model
23.3.1.1
Registering the Backing Map Listener
23.4
Specifying a Serializer
23.4.1
Using POF for Session Serialization
23.5
Sharing Session State Across Applications
24
Sample Windows Forms Application for .NET Clients
24.1
Create a Windows Application Project
24.2
Add a Reference to the Coherence for .NET Library
24.3
Create an App.config File
24.4
Create Coherence for .NET Configuration Files
24.5
Create and Design the Application
24.6
Implement the Application
25
Sample Web Application for .NET Clients
25.1
Create an ASP.NET Project
25.2
Add a Reference to the Coherence for .NET Library
25.3
Configure the Web.config File
25.4
Create Coherence for .NET Configuration Files
25.5
Create the Web Form
25.6
Implement the Web Application
25.6.1
Global.asax File
25.6.2
Business Object Definition
25.6.3
Service Layer Implementation
25.6.4
Code-behind the ASP.NET Page
Part V Using Coherence REST
26
Introducing Coherence Rest
26.1
Overview of Coherence REST
26.2
Dependencies for Coherence REST
26.3
Overview of Configuration for Coherence REST
26.4
Understanding Data Format Support
26.4.1
Using XML as the Data Format
26.4.2
Using JSON as the Data Format
27
Building Your First Coherence REST Application
27.1
Overview of the Coherence REST Example
27.2
Step 1: Configure the Cluster Side
27.3
Step 2: Create a User Type
27.4
Step 3: Configure REST Services
27.5
Step 4: Start the Cache Sever Process
27.6
Step 5: Test the Coherence REST API
28
Using the Coherence REST API
28.1
Specifying Key and Value Types
28.2
Performing Single-Object REST Operations
28.3
Performing Multi-Object REST Operations
28.4
Performing Partial-Object REST Operations
28.5
Performing Queries with REST
28.6
Performing Aggregations with REST
28.6.1
Aggregation Syntax for REST
28.6.2
Listing of Pre-Defined Aggregators
28.6.3
Creating Custom Aggergators
28.7
Performing Entry Processing with REST
28.7.1
Entry Processor Syntax for REST
28.7.2
Listing of Pre-defined Entry Processors
28.7.3
Creating Custom Entry Processors
28.8
Understanding Concurrency Control
28.9
Specifying Cache Aliases
29
Deploying Coherence REST
29.1
Deploying with the Embedded HTTP Server
29.2
Deploying to a Java EE Server
29.2.1
Packaging Coherence REST for Deployment
29.2.2
Deploying to WebLogic Server
29.2.3
Deploying to GlassFish
29.2.4
Deploying to a Servlet Container
30
Modifying the Default REST Implementation
30.1
Using Custom Providers and Resources
30.2
Changing the Embedded HTTP Server
30.2.1
Using Grizzly HTTP Server
30.2.2
Using Simple HTTP Server
A
REST Configuration Elements
A.1
REST Configuration File
Element Index
aggregator
aggregators
marshaller
processor
processors
resource
resources
rest
B
Integrating with F5 BIG-IP LTM
B.1
Basic Concepts
B.2
Creating Nodes
B.3
Configuring a Load Balancing Pool
B.3.1
Creating a Load Balancing Pool
B.3.2
Adding a Load Balancing Pool Member
B.4
Configuring a Virtual Server
B.5
Configuring Coherence*Extend to Use BIG-IP LTM
B.6
Using Advanced Health Monitoring
B.6.1
Creating a Custom Health Monitor to Ping Coherence
B.6.2
Associating a Custom Health Monitor With a Load Balancing Pool
B.7
Enabling SSL Offloading
B.7.1
Import the Server's SSL Certificate and Key
B.7.2
Create the Client SSL Profile
B.7.3
Associate the Client SSL Profile
Scripting on this page enhances content navigation, but does not change the content in any way.