|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.websphere.objectgrid.plugins.io.BasicMapSerializerPlugin
public class BasicMapSerializerPlugin
A basic implementation of a MapSerializerPlugin plug-in that can reference an arbitrary KeyDataSerializer and ValueDataSerializer.
Use the setKeySerializerPluginClass(String)
and setValueSerializerPluginClass(String)
properties to set the key and value data serializer type.
Use the setKeyProperties(String)
and setValueProperties(String)
properties to set one or more string attributes on the target key or value
DataSerializer.
Use the setAssociations(String)
property to describe any associations
between the map in which this MapSerializer references and other maps.
Use the setAddressableKeyName(String)
property to identify the addressable
attribute name to use for accessing KeyDataSerializer data when using partial
key lookups.
Constructor Summary | |
---|---|
BasicMapSerializerPlugin()
Default constructor. |
|
BasicMapSerializerPlugin(KeySerializerPlugin serKey,
ValueSerializerPlugin serValue)
Constructor that sets a KeySerializerPlugin and ValueSerializerPlugin. |
Method Summary | |
---|---|
void |
destroy()
Invoked when the bean's state has been set and is ready to be destroyed. |
String |
getAddressableKeyName()
Retrieve the addressable attribute name for the KeyDataSerializer for this MapSerializer |
String |
getAssociations()
Retrieve the associations for this MapSerializer. |
BackingMap |
getBackingMap()
Retrieve the BackingMap instance associated with this plug-in. |
String |
getKeyProperties()
Retrieve the String property from the KeyDataSerializer. |
KeySerializerPlugin |
getKeySerializerPlugin()
The KeySerializer to use for all key entries in the map. |
String |
getKeySerializerPluginClass()
Retrieves the name of the KeySerializerPlugin class that was set with the setKeySerializerPluginClass(String) method. |
MapDataDescriptor |
getMapDataDescriptor()
The MapDataDescriptor that describes the map. |
String |
getValueProperties()
Retrieve the String property from the ValueDataSerializer. |
ValueSerializerPlugin |
getValueSerializerPlugin()
The ValueSerializer to use for all value entries in the map. |
void |
initialize()
Perform initialization of the map serializer, including but not limited to the following steps. |
boolean |
isDestroyed()
Answers true if the bean is in the destroyed state, false otherwise. |
boolean |
isInitialized()
Answers true if the bean is in the initialized state, false otherwise. |
void |
setAddressableKeyName(String addressableKeyName)
Set the addressableKeyName property for the MapDataDescriptor used by this MapSerializer. |
void |
setAssociations(String mapAssociations)
Associations are a set of comma-delimited properties that identify relationships from object attributes in map entries in the BackingMap associated with this MapSerializer (the source map) to map entries in another map (the target map). |
void |
setBackingMap(BackingMap map)
The BackingMap instance is at an undefined state, depending on the type of plug-in and how it was registered with the map. |
void |
setKeyProperties(String property)
Set the String property on the KeyDataSerializer. |
void |
setKeySerializerPlugin(KeySerializerPlugin keySerializerPlugin)
Used to programmatically set the KeySerializerPlugin for local ObjectGrid instances. |
void |
setKeySerializerPluginClass(String serClass)
Sets the name of the KeySerializerPlugin class. |
void |
setValueProperties(String properties)
Set the String properties on the ValueDataSerializer. |
void |
setValueSerializerPlugin(ValueSerializerPlugin valueSerializerPlugin)
Retrieves the name of the ValueDataSerializer class that was set with the setValueSerializerPluginClass(String). |
void |
setValueSerializerPluginClass(String serClass)
Sets the name of the ValueSerializerPlugin class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicMapSerializerPlugin()
public BasicMapSerializerPlugin(KeySerializerPlugin serKey, ValueSerializerPlugin serValue)
serKey
- the KeySerializerPlugin or null if not defined.serValue
- the ValueSerializerPlugin or null if not defined.Method Detail |
---|
public void setKeyProperties(String property)
propertyName=value[,propertyName=value]. Embedded commas can be specified in the property values by escaping the comma with a back-slash. Additionally, the "\," can be escaped using one additional "\" characters, allowing a terminal "\" on the value. For example:
embeddedCommas=val1\,val2\,val3,trailingBackSlash=val4\\,name3=val5. The properties are not flushed to the ValueDataSerializeer until it is initialized. After that time, the properties cannot be set.
property
- a non-null, comma delimited set of name/value pairs to set on the
KeyDataSerializerpublic String getKeyProperties()
public void setValueProperties(String properties)
propertyName=value[,propertyName=value]. Embedded commas can be specified in the property values by escaping the comma with a back-slash. Additionally, the "\," can be escaped using one additional "\" characters, allowing a terminal "\" on the value. For example:
embeddedCommas=val1\,val2\,val3,trailingBackSlash=val4\\,name3=val5. The properties are not flushed to the ValueDataSerializeer until it is initialized. After that time, the properties cannot be set.
properties
- a non-null, comma delimited set of name/value pairs to set on the
ValueDataSerializerpublic String getValueProperties()
public MapDataDescriptor getMapDataDescriptor()
MapSerializerPlugin
getMapDataDescriptor
in interface MapSerializerPlugin
MapSerializerPlugin.getMapDataDescriptor()
public KeySerializerPlugin getKeySerializerPlugin()
MapSerializerPlugin
getKeySerializerPlugin
in interface MapSerializerPlugin
MapSerializerPlugin.getKeySerializerPlugin()
public void setKeySerializerPlugin(KeySerializerPlugin keySerializerPlugin)
keySerializerPlugin
- the KeySerializerPlugin instance.public void setKeySerializerPluginClass(String serClass)
serClass
- the name of the KeySerializerPlugin class.public String getKeySerializerPluginClass()
public void setValueSerializerPluginClass(String serClass)
serClass
- the name of the ValueSerializerPlugin class.public ValueSerializerPlugin getValueSerializerPlugin()
MapSerializerPlugin
getValueSerializerPlugin
in interface MapSerializerPlugin
MapSerializerPlugin.getValueSerializerPlugin()
public void setValueSerializerPlugin(ValueSerializerPlugin valueSerializerPlugin)
valueSerializerPlugin
- the ValueSerializerPlugin instance.public void setAssociations(String mapAssociations)
I.e. The object attributes hold key values for entries in another map.
Each property is defined as follows:
Property Name | Description |
---|---|
attribute | The name or path to the source attribute that holds the target map entry's key (the foreign key). If the attribute is an attribute on a key object, it must be prefixed by the addressable key name and the path separator (by default "key."). If the attribute is stored inside other embedded attributes, then attribute name must include the entire path to the key, using the DataSerializer's path separator. |
targetMap | The name of the associated map which contains the target map entry |
For example, consider the MapSerializerPlugin associated with the ParentMap, which has a one-to-many bi-directional relationship to the ChildMap and a uni-directional one-to-one relationship with the AddressMap map.
The relationships might be defined as follows:
ParentMap:
"targetMap=ChildMap,attribute=childrenKeys,inverseAttribute=parentKey"
ChildMap:
"targetMap=ParentMap,attribute=parentKey,inverseAttribute=childrenKeys"
The foreign key to the ChildMap may be stored in an embedded attribute:
ParentMap:
"targetMap=ChildMap,attribute=embeddedType/childrenKeys"
mapAssociations
- the list of map associations.public String getAssociations()
setAssociations(String)
public void setAddressableKeyName(String addressableKeyName)
"select c.key.x from Customer c"
"select c.myKey.x from Customer c"
addressableKeyName
- the addressable attribute name to use for accessing KeyDataSerializer data when navigating to key attributes in queries
and indexes.public String getAddressableKeyName()
setAddressableKeyName(String)
public void destroy()
Destroyable
destroy
in interface Destroyable
Destroyable.destroy()
public boolean isDestroyed()
Destroyable
During normal operation, this method may be called to confirm the correct
operation of the Destroyable.destroy()
method.
isDestroyed
in interface Destroyable
Destroyable.isDestroyed()
public void initialize() throws ObjectGridRuntimeException
setKeySerializerPluginClass(String)
or setValueSerializerPluginClass(String)
properties were set.
setKeyProperties(String)
or setValueProperties(String)
setAssociations(String)
initialize
in interface Initializable
ObjectGridRuntimeException
Initializable.initialize()
public boolean isInitialized()
Initializable
During normal operation, this method may be called to confirm the correct
operation of the Initializable.initialize()
method.
isInitialized
in interface Initializable
Initializable.isInitialized()
public void setBackingMap(BackingMap map)
BackingMapPlugin
BackingMap.getState()
method
to determine what state the map is in.
setBackingMap
in interface BackingMapPlugin
map
- the BackingMap associated with this plug-in instance.BackingMapPlugin.setBackingMap(com.ibm.websphere.objectgrid.BackingMap)
public BackingMap getBackingMap()
BackingMapPlugin
During normal operation, this method may be called to confirm the correct
operation of the BackingMapPlugin.
It must return the BackingMap instance previously set using
the BackingMapPlugin.setBackingMap(BackingMap)
method.
getBackingMap
in interface BackingMapPlugin
BackingMapPlugin.getBackingMap()
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |