Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.coherence.config
Class CacheMappingRegistry

java.lang.Object
  extended by com.tangosol.coherence.config.CacheMappingRegistry

All Implemented Interfaces:
java.lang.Iterable

public class CacheMappingRegistry
extends java.lang.Object
implements java.lang.Iterable

A CacheMappingRegistry provides a mechanism manage a collection of CacheMappings, together with the ability to search the registry for said CacheMappings, possibly using wild-cards.

CacheMappingRegistrys are Iterable, the order of iteration being that in which the CacheMappings where added to the said CacheMappingRegistry.

Since:
Coherence 12.1.2
Author:
bo 2011.06.29

Constructor Summary
CacheMappingRegistry()
          Construct a CacheMappingRegistry.

 

Method Summary
 CacheMapping findCacheMapping(java.lang.String sCacheName)
          Attempts to find the CacheMapping that matches the specified cache name.
 java.util.Iterator iterator()
          
 void register(CacheMapping cacheMapping)
          Registers a CacheMapping with the CacheMappingRegistry.
 int size()
          Determines the number of CacheMappings in the CacheMappingRegistry.

 

Constructor Detail

CacheMappingRegistry

public CacheMappingRegistry()
Construct a CacheMappingRegistry.

Method Detail

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable

register

public void register(CacheMapping cacheMapping)
              throws java.lang.IllegalArgumentException
Registers a CacheMapping with the CacheMappingRegistry.
Parameters:
cacheMapping - the CacheMapping to register
Throws:
java.lang.IllegalArgumentException - if a CacheMapping with the same pattern has already been registered

findCacheMapping

public CacheMapping findCacheMapping(java.lang.String sCacheName)
Attempts to find the CacheMapping that matches the specified cache name.

The matching algorithm first attempts to find an exact match of a CacheMapping with the provided cache name. Should that fail, all of the currently registered wild-carded CacheMappings are searched to find a match (in the order in which they were registered), with the most specific (longest match) being returned if there are multiple matches.

Parameters:
sCacheName - the cache name
Returns:
null if a CacheMapping could not be located for the specified cache name

size

public int size()
Determines the number of CacheMappings in the CacheMappingRegistry.
Returns:
the number of CacheMappings

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.