public class GroupMemberInfo 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 |
|---|
GroupMemberInfo() |
GroupMemberInfo(String groupId,
String memberId,
String memberName,
Map<String,String> memberContext,
Map<String,String> dataIdMap) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getDataIdMap() |
String |
getGroupId() |
Map<String,String> |
getMemberContext() |
String |
getMemberId() |
String |
getMemberName() |
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 |
setGroupId(String groupId)
The group triggerId for which this will be a member trigger.
|
void |
setMemberContext(Map<String,String> memberContext)
The member context.
|
void |
setMemberId(String memberId)
The member triggerId.
|
void |
setMemberName(String memberName)
The member triggerName.
|
String |
toString() |
public String getGroupId()
public void setGroupId(String groupId)
public String getMemberId()
public void setMemberId(String memberId)
public String getMemberName()
public void setMemberName(String memberName)
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.