Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


oracle.wcps.cache
Interface Cache<K,V>

All Superinterfaces:
java.util.Map<K,V>

public interface Cache<K,V>
extends java.util.Map<K,V>

A cache. Essentially this is just a named Map, however keys and values must be Serializable. A cache does not support null keys.

It is also assumed that the cache is managed in some way, so that old or expired entries are removed, etc. Therefore, a get operation is not guaranteed to return a value that was put - even one that was recently put, as the cache may be disabled, or that entry might have expired or been purged by the backing store of the cache.

Cache instances are obtained from the CacheFactory. Caches obtained from the factory are singletons keyed by their name, so that two caches with the same name should represent the same cached values.


Nested Class Summary

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>

 

Method Summary
 java.util.Set<java.util.Map.Entry<K,V>> entrySet()
          Returns a Set view of the mappings contained in this map.
 CacheConfig getCacheConfig()
          retrieve the configuration for this cache.
 java.util.Set<K> keySet()
          Returns a Set view of the keys contained in this cache.
 java.util.Collection<V> values()
          Returns a Collection view of the values contained in this cache.

 

Methods inherited from interface java.util.Map
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size

 

Method Detail

getCacheConfig

CacheConfig getCacheConfig()
retrieve the configuration for this cache.

keySet

java.util.Set<K> keySet()
Returns a Set view of the keys contained in this cache. Unlike the Map.keySet() method, the set returned by this method might not be backed by the cache, so changes made to the set might not be reflected in the map (and vice-versa). Iterators obtained from this set therefore might not support removal of elements from the cache.
Specified by:
keySet in interface java.util.Map<K,V>
Returns:
a set view of the keys contained in this cache

values

java.util.Collection<V> values()
Returns a Collection view of the values contained in this cache. Unlike the Map.values() method, the collection returned by this method might not be backed by the cache, so changes made to the collection might not be reflected in the map (and vice-versa). Iterators obtained from this collection therefore might not support removal of elements from the cache.
Specified by:
values in interface java.util.Map<K,V>
Returns:
a collection view of the values contained in this cache

entrySet

java.util.Set<java.util.Map.Entry<K,V>> entrySet()
Returns a Set view of the mappings contained in this map. Unlike the Map.entrySet() method, the set returned by this method might not be backed by the cache, so changes made to the set might not be reflected in the map (and vice-versa). Iterators obtained from this set therefore might not support removal of elements from the cache.
Specified by:
entrySet in interface java.util.Map<K,V>
Returns:
a set view of the mappings contained in this cache

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal
11g Release 1 (11.1.1.7.0)
E15995-06


Copyright © 2009, 2013, Oracle and/or its affiliates. All rights reserved.