Interface ServerGroupEffect
-
public interface ServerGroupEffect
Encapsulates information about the relationship of a resource to server groups in a domain.- Author:
- Brian Stansberry (c) 2013 Red Hat Inc.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
getAffectedServerGroups()
Gets the names of the server groups affected by this resource, ornull
ifisServerGroupEffectGlobal()
returnstrue
PathAddress
getResourceAddress()
Gets the address of the resource whose server group relationships are described by this object.boolean
isServerGroupAdd()
Gets whether this effect adds the affected server groups.boolean
isServerGroupEffectGlobal()
Gets whether the resource logically affects all server groups, including server groups that may not presently exist.boolean
isServerGroupEffectUnassigned()
Gets whether the resource logically only affects certain server groups but hasn't been specifically associated with a particular server group.boolean
isServerGroupRemove()
Gets whether this effect removes the affected server groups.
-
-
-
Method Detail
-
getResourceAddress
PathAddress getResourceAddress()
Gets the address of the resource whose server group relationships are described by this object.- Returns:
- the resource address. Will not be
null
-
isServerGroupEffectGlobal
boolean isServerGroupEffectGlobal()
Gets whether the resource logically affects all server groups, including server groups that may not presently exist.A resource that by its nature does not automatically have the potential to affect all server groups will not return
true
even if currently all server groups that currently exist are affected by it. For example, in a domain with a single profile and a single server group, that profile affects all server groups. But a profile does not by its nature affect all server groups, and a new server group could be added that does not use the profile. So in that case this method will returnfalse
.Conversely, many host level resources (e.g.
/host=x/system-property=y)
only affect the servers managed by that host, and thus could be said to only affect those servers' server groups. However, a new server could be added to that host, with a new server group mapping, and once that is done the host level resource will affect that server group. So, for that host level resource this method will returntrue
.- Returns:
true
if the resource logically affects all server groups;false
if the resource is logically limited to a set of server groups.
-
isServerGroupEffectUnassigned
boolean isServerGroupEffectUnassigned()
Gets whether the resource logically only affects certain server groups but hasn't been specifically associated with a particular server group.- Returns:
-
getAffectedServerGroups
Set<String> getAffectedServerGroups()
Gets the names of the server groups affected by this resource, ornull
ifisServerGroupEffectGlobal()
returnstrue
- Returns:
- the names of the server groups, or
null
ifisServerGroupEffectGlobal()
returnstrue
. Will not returnnull
ifisServerGroupEffectGlobal()
returnsfalse
, although it may return an empty set.
-
isServerGroupAdd
boolean isServerGroupAdd()
Gets whether this effect adds the affected server groups.- Returns:
true
if the effect is to add the affected groups.
-
isServerGroupRemove
boolean isServerGroupRemove()
Gets whether this effect removes the affected server groups.- Returns:
true
if the effect is to remove the affected groups.
-
-