@ComponentSpecification public interface GenericContextFactory
contexts
.Modifier and Type | Method and Description |
---|---|
MutableGenericContext |
createContext()
This method creates a new instance of a
MutableGenericContext . |
MutableGenericContext |
createContext(MapFactory<? extends Map> mapFactory)
This method creates a new instance of a
MutableGenericContext using the given MapFactory . |
MutableGenericContext |
createContext(MapFactory<? extends Map> mapFactory,
GenericValueConverter<Object> valueConverter)
This method creates a new instance of a
MutableGenericContext using the given MapFactory . |
MutableGenericContext createContext()
MutableGenericContext
. It will use a
HashMapFactory
and delegate to createContext(MapFactory)
. child-contexts
are
created and passed to other threads while the original thread is modifying the original context as proved
in the according test-case. However HashMap.get(Object)
is not academically thread-safe
so if you need mission-critical safety, you might want to pass
ConcurrentHashMapFactory
to createContext(MapFactory)
.MutableGenericContext createContext(MapFactory<? extends Map> mapFactory)
MutableGenericContext
using the given MapFactory
.mapFactory
- is the factory used to create maps for the underlying context.MutableGenericContext createContext(MapFactory<? extends Map> mapFactory, GenericValueConverter<Object> valueConverter)
MutableGenericContext
using the given MapFactory
.mapFactory
- is the factory used to create maps for the underlying context.valueConverter
- is the GenericValueConverter
used for
converting
variables if
requested
for a different type.Copyright © 2001–2016 mmm-Team. All rights reserved.