com.xenonsoft.bridgetown.soa.spi
Interface IContextCacheContainer

All Known Implementing Classes:
ContextCacheContainerImpl

public interface IContextCacheContainer

A interface contract for the context cache instance container, which manages a collection of context caches.

Version:
$Id: IContextCacheContainer.java,v 1.2 2005/02/23 01:31:09 peter_pilgrim Exp $
Author:
Peter Pilgrim, Aug 26, 2004 3:37:50 PM

Method Summary
 void clear()
          Clear the cache container of all instance caches
 boolean contains(ContextConfig context)
          Returns a boolean if the context configuration is stored in the cache container
 IContextCache[] getContextCacheList()
          Retrieves a primitive array of instance element elements inside the cache container
 java.lang.Object getLocalBean(ContextConfig contextConfig, java.lang.String serviceId)
          Retrieves the service bean stored in the context instance cache by name
 void putLocalBean(ContextConfig contextConfig, java.lang.String serviceId, java.lang.Object bean)
          Stores the service bean stored in the context instance cache by name
 IContextCache removeContextCache(ContextConfig contextConfig)
          Removes the cache instance from the container by its context configuration
 int size()
          Returns the current size of the cache container
 

Method Detail

getLocalBean

public java.lang.Object getLocalBean(ContextConfig contextConfig,
                                     java.lang.String serviceId)
Retrieves the service bean stored in the context instance cache by name

Parameters:
contextConfig - the context configuration
serviceId - the service bean name
Returns:
the bean instance or null if it is not managed

putLocalBean

public void putLocalBean(ContextConfig contextConfig,
                         java.lang.String serviceId,
                         java.lang.Object bean)
Stores the service bean stored in the context instance cache by name

Parameters:
contextConfig - the context configuration
serviceId - the service bean name
bean - the service bean instance to store

size

public int size()
Returns the current size of the cache container

Returns:
the size

contains

public boolean contains(ContextConfig context)
Returns a boolean if the context configuration is stored in the cache container

Parameters:
context - the context configuration
Returns:
true if the bean is returned

clear

public void clear()
Clear the cache container of all instance caches

Returns:
the size

removeContextCache

public IContextCache removeContextCache(ContextConfig contextConfig)
Removes the cache instance from the container by its context configuration

Returns:
the context cache that has been removed or null

getContextCacheList

public IContextCache[] getContextCacheList()
Retrieves a primitive array of instance element elements inside the cache container

Returns:
the array of cache instance elements


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.