@Deprecated public class BeanRepository extends Object
BeanIdRegister
to optimize the access performance. If
all the BeanId
objects are registered with the BeanIdList before this object
is created then you get direct access performance. If you regularly register new
BeanId
objects with the BeanIdRegister
, after this object is created
then the BeanRepository needs to sync up with the BeanIdRegister
. That
sync process takes some time, so it is adviced to register all the BeanId's up front.
Only BeanId
objects from the BeanIdRegister
, which is set on
this BeanRepository, can be used with almost all of the methods.
For ease of use it is also possible to get the bean by it's beanId name. This has however
not the direct access performance because a Map lookup is done. It is advised to use
the BeanId
to get the bean from the repository.Constructor and Description |
---|
BeanRepository(BeanContext beanContext)
Deprecated.
|
BeanRepository(ExecutionContext executionContext,
BeanIdRegister beanIdRegister,
Map<String,Object> beanMap)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addBean(BeanId beanId,
Object bean)
Deprecated.
|
void |
addBean(String beanId,
Object bean)
Deprecated.
|
void |
changeBean(BeanId beanId,
Object bean)
Deprecated.
|
void |
clear()
Deprecated.
|
boolean |
containsBean(BeanId beanId)
Deprecated.
|
Object |
getBean(BeanId beanId)
Deprecated.
|
Object |
getBean(String beanId)
Deprecated.
|
BeanId |
getBeanId(String beanId)
Deprecated.
|
Map<String,Object> |
getBeanMap()
Deprecated.
|
static BeanRepository |
getInstance(ExecutionContext executionContext)
Deprecated.
Get the
BeanRepository of the given ExecutionContext . |
Object |
removeBean(BeanId beanId)
Deprecated.
|
Object |
removeBean(String beanId)
Deprecated.
|
void |
setBeanInContext(BeanId beanId,
boolean inContext)
Deprecated.
|
String |
toString()
Deprecated.
|
public BeanRepository(BeanContext beanContext)
public BeanRepository(ExecutionContext executionContext, BeanIdRegister beanIdRegister, Map<String,Object> beanMap)
public static BeanRepository getInstance(ExecutionContext executionContext)
BeanRepository
of the given ExecutionContext
.BeanRepository
of the given ExecutionContext
.BeanRepositoryManager#getBeanRepository(org.milyn.container.ExecutionContext)}.
public void clear()
public boolean containsBean(BeanId beanId)
public void setBeanInContext(BeanId beanId, boolean inContext)
Copyright © 2014. All rights reserved.