public class UnorphanMemberInfo extends Object
A group-level condition uses dataId tokens for the dataIds defined in the condition. The group members
must then replace the tokens with actual dataIds. For example, we may define a group ThresholdCondition like
( $SystemLoad$ > 80 ). Each member must then replace $SystemLoad$ with the actual system load dataId for that
member. See setDataIdMap(Map) for details on how to construct the map supplying the dataId substitutions.
| Constructor and Description |
|---|
UnorphanMemberInfo() |
UnorphanMemberInfo(Map<String,String> memberContext,
Map<String,String> dataIdMap) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getDataIdMap() |
Map<String,String> |
getMemberContext() |
void |
setDataIdMap(Map<String,String> dataIdMap)
The
dataIdMap is a map of the dataId tokens in the group conditions to the actual dataIds to
be used for the member being added. |
void |
setMemberContext(Map<String,String> memberContext)
The member context.
|
String |
toString() |
public void setMemberContext(Map<String,String> memberContext)
public void setDataIdMap(Map<String,String> dataIdMap)
dataIdMap is a map of the dataId tokens in the group conditions to the actual dataIds to
be used for the member being added. For example, assume the group trigger has two conditions defined:
ThresholdCondition( $SystemLoad$ > 80 ) and ThresholdCondition( $HeapUsed$ > 70 ). And now let's assume we
are adding a new member, Member1. The map would look like this:
{[key = "$SystemLoad$",
value = "Member1SystemLoad"],
[key = "$HeapUsed$",
value = "Member1HeapUsed"]
}
So, in the example the actual dataIds would be Member1SystemLoad and Member1HeapUsed.
With this Map we can now add the new member trigger.
A NOTE ABOUT EXTERNAL CONDITIONS. ExternalCondition.expression will automatically have the
same token replacement performed. So, all occurrences of the dataId token found in the expression, will be
replaced with the mapping. This allows the expression of a group external condition to be automatically
customized to the member.
dataIdMap - the dataId mappings to be used for the new member trigger.existing member triggers. Can be
empty if the group has no current conditions.Copyright © 2015 Red Hat, Inc.. All rights reserved.