Fork me on GitHub

The Common Package

Overview

Provides a collection of utility packages and classes commonly used to support the implementation of other Oracle Coherence Incubator projects.

Distribution

The Common Package implementation is distributed in the jar file called: coherence-common-11.3.1-SNAPSHOT.jar.

However as the Common Package has several other dependencies, we **strongly recommend** that developers adopt and use tools like Apache Maven/Ivy/Gradle to transitively resolve the said dependencies, instead of attempting to do so manually.

To configure your Apache Maven-based application to use the Common Package, simply add the following declaration to your application pom.xml file <dependencies> element.

<dependency>
    <groupId>com.oracle.coherence.incubator</groupId>
    <artifactId>coherence-common</artifactId>
    <version>11.3.1-SNAPSHOT</version>
</dependency>

Contents

Noteworthy packages, classes and interfaces:

  • The ExtensibleEnvironment Class:

    A replacement for the standard Coherence ConfigurableCacheFactory implementation, responsible for processing cache configurations, that allows developers to independently create custom configurations and runtime extensions to Coherence.

  • The com.oracle.coherence.common.events Package:

    A simple framework to enable the development of server-side synchronous and asynchronous event-based applications, embedded within Coherence.

  • The CoherenceLogHandler Class:

    A Java Log Handler that writes java.util.logging.LogRecords to the Coherence Logger. This allows applications to use the standard java.util.logging framework, but have the log records appended asynchronously to the configured Coherence Logger.

  • The com.oracle.coherence.common.sequencegenerators Package:

    A set of interfaces and classes to simplify the creation of sequence numbers, either locally in a Java Virtual Machine, or across a cluster.

  • The com.oracle.coherence.common.processors Package:

    Containing a collection of useful new Entry Processors, including the InvokeMethodProcessor for remotely invoking methods through reflection.

  • The ObjectProxyFactory Class:

    A class to enable the creation of local proxies of objects stored in a cache, thus allowing direct use of the said objects directly without knowing their location in a cluster and without using EntryProcessors for access.

  • The EC2AddressProvider Class:

    A class to simplify and automate the dynamic formation a cluster on Amazon EC2, without needing multi-cast or manually specifying individual IP addresses.

  • Several utility packages for the creation of different types of Identifiers (often useful for cache keys), handling Tickets, Ranges, Tuples, Leases and some customized ThreadFactories.

Further Documentation

Extensible Environments

The Oracle Coherence Incubator provides a mechanism to support custom extension of Cache Configurations through the use of what we call ExtensibleEnvironments, including the ability to introduce other cache configurations. The following section provides information about said extensions.

Cache Configuration Namespaces defined by the Coherence Incubator Common Package

  • The Coherence Namespace: The default and implicitly defined namespace for processing Coherence Cache Configuration elements.

  • The Element Namespace: A namespace enabling runtime transformation of XML elements in a cache configuration. ie: provides <cache-config element:introduce-cache-config="..."> and other functionality.

  • The Filter Namespace: A utility namespace providing the ability to define Coherence Filters in Cache Configurations.

  • The JNDI Namespace: A utility namespace providing the ability to lookup resources from JNDI.

  • The Instance Namespace (deprecated): A utility namespace providing the ability to specify how custom classes may be instantiated.

  • The Value Namespace (deprecated): A utility namespace providing the ability to define strongly typed values.

The Amazon EC2 Address Provider

  • The Amazon EC2 AddressProvider

    Amazon provides compute power on demand through its Elastic Compute Cloud (EC2). The EC2AddressProvider makes it easier to run a Coherence-based application on EC2.