public class SimpleMapFactory extends Object implements MapFactory
MapFactory
interface, used to create map
instances for the MapStore
.Modifier and Type | Field and Description |
---|---|
static String |
MAP_CLASS |
static String |
MAP_CLASS_DEFAULT |
Constructor and Description |
---|
SimpleMapFactory() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear any currently configured Maps.
|
Element |
cloneElement(Element element,
Schema schema)
Clone an element.
|
<K,V> Map<K,V> |
getMap(String mapName,
Class<K> keyClass,
Class<V> valueClass)
Retrieve a named
Map . |
<K,V> MultiMap<K,V> |
getMultiMap(String mapName,
Class<K> keyClass,
Class<V> valueClass)
Retrieve a named
MultiMap . |
void |
initialise(Schema schema,
MapStoreProperties properties)
Initialise the map with the specified schema and properties.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
updateValue
public static final String MAP_CLASS
public static final String MAP_CLASS_DEFAULT
public void initialise(Schema schema, MapStoreProperties properties)
MapFactory
initialise
in interface MapFactory
schema
- the schema to applyproperties
- the store properties to applypublic <K,V> Map<K,V> getMap(String mapName, Class<K> keyClass, Class<V> valueClass)
MapFactory
Map
.
If the requested map does not exist, a new map is created and cached.getMap
in interface MapFactory
K
- the type of the map keysV
- the type of the map valuesmapName
- the name of the map to retrievekeyClass
- the class type to use for the map keysvalueClass
- the class type to use for the map valuesMap
objectpublic <K,V> MultiMap<K,V> getMultiMap(String mapName, Class<K> keyClass, Class<V> valueClass)
MapFactory
MultiMap
.
If the requested map does not exist, a new multi map is created and cached.getMultiMap
in interface MapFactory
K
- the type of the map keysV
- the type of the map valuesmapName
- the name of the multi map to retrievekeyClass
- the class type to use for the map keysvalueClass
- the class type to use for the map valuesMultiMap
objectpublic void clear()
MapFactory
clear
in interface MapFactory
public Element cloneElement(Element element, Schema schema)
MapFactory
cloneElement
in interface MapFactory
element
- the element to cloneschema
- the relevant schemaCopyright © 2022. All rights reserved.