Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


oracle.ifs.fdk
Interface CacheManager


public interface CacheManager

The cache management interface.


Method Summary
 void addItem(Item item)
          Adds an Item to the Cache.
 Item getItem(long item, AttributeRequest[] attributes)
          Gets an Item containing the set of attributes specified.
 NamedValue[] getItemInvalidations()
          Gets the set of Item invalidations for items the session has registered interest for.
 void registerItemSetInvalidationListener(ItemSetInvalidationListener listener, java.util.List items)
          Register the ItemSetInvalidationListener.
 void removeItem(long itemId)
          Removes an Item from the Cache.
 void resetItemSetInvalidationListener(ItemSetInvalidationListener listener)
          Reset the ItemSetInvalidationListener to begin watching for invalidations for the previously specified set of items.
 void resetItemSetInvalidationListener(ItemSetInvalidationListener listener, java.util.List items)
          Reset the ItemSetInvalidationListener to begin watching for invalidations based on the newly specified set of items.
 void unregisterItemSetInvalidationListener(ItemSetInvalidationListener listener)
          Unregister an ItemSetInvalidationListener.

 

Method Detail

addItem

public void addItem(Item item)
             throws FdkException
Adds an Item to the Cache.
Parameters:
item - the item to add to the cache.
Throws:
FdkException - if the operation fails.

getItem

public Item getItem(long item,
                    AttributeRequest[] attributes)
             throws FdkException
Gets an Item containing the set of attributes specified.

An item is returned from the cache if it contains the values for at least the specified atttributes. An Item can be returned that contains values for more attributes than the ones specified.

If the cache does not have such an Item, this manager delegates to CommonManager, and the item returned gets added to the cache.

Parameters:
attributes - the attributes of interest
Returns:
the requested item
Throws:
FdkException - if the operation fails.

getItemInvalidations

public NamedValue[] getItemInvalidations()
                                  throws FdkException
Gets the set of Item invalidations for items the session has registered interest for.

Returns the set of invalidations since the last invocation of this method.

Returns:
the set of Item invalidations.
Throws:
FdkException - if the operation fails.

registerItemSetInvalidationListener

public void registerItemSetInvalidationListener(ItemSetInvalidationListener listener,
                                                java.util.List items)
                                         throws FdkException
Register the ItemSetInvalidationListener.

This registers the ItemSetInvalidationListener for the specified set of items.

Parameters:
listener - the ItemSetInvalidationListener to register
items - the items that will be watched for invalidations
Throws:
FdkException - if the operation fails.

removeItem

public void removeItem(long itemId)
                throws FdkException
Removes an Item from the Cache.

No action is taken if an Item with the specified ID is not currently present in the item cache, or if one or more InvalidationListeners are registered for the item.

Parameters:
itemId - the ID of the item to remove from the cache.
Throws:
FdkException - if the operation fails.

resetItemSetInvalidationListener

public void resetItemSetInvalidationListener(ItemSetInvalidationListener listener)
                                      throws FdkException
Reset the ItemSetInvalidationListener to begin watching for invalidations for the previously specified set of items.
Parameters:
listener - the ItemSetInvalidationListener to reset
Throws:
FdkException - if the operation fails.

resetItemSetInvalidationListener

public void resetItemSetInvalidationListener(ItemSetInvalidationListener listener,
                                             java.util.List items)
                                      throws FdkException
Reset the ItemSetInvalidationListener to begin watching for invalidations based on the newly specified set of items.
Parameters:
listener - the ItemSetInvalidationListener to reset
items - the items that will be watched for invalidations
Throws:
FdkException - if the operation fails.

unregisterItemSetInvalidationListener

public void unregisterItemSetInvalidationListener(ItemSetInvalidationListener listener)
                                           throws FdkException
Unregister an ItemSetInvalidationListener.

This should be called this when the ItemSetInvalidationListener is no longer in use, to free up resources that would not otherwise be freed until the FdkSession is disconnected.

Parameters:
listener - the ItemSetInvalidationListener to reset
Throws:
FdkException - if the operation fails.

Oracle® Content Services Web Services Java API Reference
10g Release 1 (10.1.1)

B19047-01


Copyright © 2002, 2005, Oracle. All rights reserved.