|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xenonsoft.bridgetown.soa.impl.ContextCacheImpl
A cache that stores service bean instances by name and context configuration.
| Field Summary | |
protected java.util.Map |
cacheMap
the cache map |
protected ContextConfig |
contextConfig
the context configuration |
| Constructor Summary | |
ContextCacheImpl(ContextConfig context)
Standard constructor |
|
| Method Summary | |
void |
clear()
Clears the contents of the cache |
boolean |
contains(java.lang.String serviceId)
Returns a boolean if the service bean id is stored in the cache |
java.lang.Object |
getBean(java.lang.String serviceId)
Retrieves the service bean from the cache object by its name |
ContextConfig |
getContextConfig()
Gets the contextConfig |
java.lang.String[] |
getServiceBeanNames()
Retrieves a primitive array of service beans managed inside the cache by name |
void |
putBean(java.lang.String serviceId,
java.lang.Object bean)
Store the service bean in the cache by its name |
java.lang.Object |
removeBean(java.lang.String serviceId)
Removes the service bean from the cache object by its name |
protected void |
setContextConfig(ContextConfig contextConfig)
Sets the contextConfig |
int |
size()
Returns the current size of the cache |
java.lang.String |
toString()
Human debuggable output Implements / overrides toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected ContextConfig contextConfig
protected java.util.Map cacheMap
| Constructor Detail |
public ContextCacheImpl(ContextConfig context)
context - the context configuration| Method Detail |
public ContextConfig getContextConfig()
getContextConfig in interface IContextCacheprotected void setContextConfig(ContextConfig contextConfig)
contextConfig - the new value for contextConfigpublic void clear()
clear in interface IContextCachepublic int size()
size in interface IContextCachepublic boolean contains(java.lang.String serviceId)
contains in interface IContextCacheserviceId - the service bean name
true if the bean is returnedpublic java.lang.Object getBean(java.lang.String serviceId)
getBean in interface IContextCacheserviceId - the service bean name
null
public void putBean(java.lang.String serviceId,
java.lang.Object bean)
putBean in interface IContextCacheserviceId - the service bean namebean - the service beanpublic java.lang.Object removeBean(java.lang.String serviceId)
removeBean in interface IContextCacheserviceId - the service bean name
nullpublic java.lang.String[] getServiceBeanNames()
getServiceBeanNames in interface IContextCachepublic java.lang.String toString()
Object.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||