Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


oracle.stellent.wcm.server.cache
Class ThreadSafeCacheContainer

java.lang.Object
  extended by oracle.stellent.wcm.server.cache.ThreadSafeCacheContainer

All Implemented Interfaces:
CacheContainer

public class ThreadSafeCacheContainer
extends java.lang.Object
implements CacheContainer

Cache of the content items used in the WCM server. Employs a locking mechanism so this class is safe to share among threads. Has a concept of maximum size using LRU-style alogrithm.


Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.stellent.wcm.server.cache.CacheContainer
CacheContainer.Key<T>

 

Field Summary

 

Fields inherited from interface oracle.stellent.wcm.server.cache.CacheContainer
KEY_ASSET_TYPES, KEY_CONTENT_INFO, KEY_CONVERSION_DEFINITION, KEY_ELEMENT_DEFINITION, KEY_MANAGED_DATAFILE, KEY_PLACEHOLDER_DEFINITION, KEY_REGION_DEFINITION, KEY_TIMESTAMP, KEY_WEB_CONTENT

 

Constructor Summary
ThreadSafeCacheContainer(Provider provider, int cacheSize, long timeout)
           

 

Method Summary
 void clear()
          Clear all items from cache
 void clearContentObjects(ContentID contentID)
          Clear all objects under a given content ID
 boolean containsKey(ContentID contentID, java.lang.String name)
          Determine if the cache contains the given key
<T> T
getContentObject(ContentID contentID, CacheContainer.Key<T> key)
          Retrieve an item from the cache that is of the type specified by the key
 java.lang.Object getContentObject(ContentID contentID, java.lang.String name)
          Retrieve an item from the cache
<T> void
setContentObject(ContentID contentID, CacheContainer.Key<T> key, T object)
          Associate the object with the given content ID and key name
 void setContentObject(ContentID contentID, java.lang.String name, java.lang.Object object)
          Associate the object with the given content ID and key
 void updateContentObjectsWithRS(oracle.stellent.ridc.model.DataResultSet resultSet)
          Update existing content objects or create new content objects in the cache for each row in the result set.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ThreadSafeCacheContainer

public ThreadSafeCacheContainer(Provider provider,
                                int cacheSize,
                                long timeout)

Method Detail

getContentObject

public <T> T getContentObject(ContentID contentID,
                              CacheContainer.Key<T> key)
Retrieve an item from the cache that is of the type specified by the key
Specified by:
getContentObject in interface CacheContainer
Parameters:
contentID - the content ID
key - the item key
Returns:
the item or null

getContentObject

public java.lang.Object getContentObject(ContentID contentID,
                                         java.lang.String name)
Retrieve an item from the cache
Specified by:
getContentObject in interface CacheContainer
Parameters:
contentID - the content ID of the item
name - the item key
Returns:
the item or null

setContentObject

public <T> void setContentObject(ContentID contentID,
                                 CacheContainer.Key<T> key,
                                 T object)
Associate the object with the given content ID and key name
Specified by:
setContentObject in interface CacheContainer
Parameters:
contentID - the content ID
key - the item key
object - the object

setContentObject

public void setContentObject(ContentID contentID,
                             java.lang.String name,
                             java.lang.Object object)
Associate the object with the given content ID and key
Specified by:
setContentObject in interface CacheContainer
Parameters:
contentID - the content ID
name - the item name
object - the object

clearContentObjects

public void clearContentObjects(ContentID contentID)
Clear all objects under a given content ID
Specified by:
clearContentObjects in interface CacheContainer
Parameters:
contentID - the content ID

containsKey

public boolean containsKey(ContentID contentID,
                           java.lang.String name)
Determine if the cache contains the given key
Specified by:
containsKey in interface CacheContainer
Parameters:
contentID - the content ID
name - the key name
Returns:
true if this is in the cache, false otherwise

updateContentObjectsWithRS

public void updateContentObjectsWithRS(oracle.stellent.ridc.model.DataResultSet resultSet)
Update existing content objects or create new content objects in the cache for each row in the result set. It is assumed the row will contain a "dDocName" parameter.
Specified by:
updateContentObjectsWithRS in interface CacheContainer
Parameters:
resultSet - the result set, each row containing at least a "dDocName" value

clear

public void clear()
Clear all items from cache
Specified by:
clear in interface CacheContainer

Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.