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

    Modifier and Type
    Method
    Description
    Gets the names of the server groups affected by this resource, or null if isServerGroupEffectGlobal() returns true
    Gets the address of the resource whose server group relationships are described by this object.
    boolean
    Gets whether this effect adds the affected server groups.
    boolean
    Gets whether the resource logically affects all server groups, including server groups that may not presently exist.
    boolean
    Gets whether the resource logically only affects certain server groups but hasn't been specifically associated with a particular server group.
    boolean
    Gets whether this effect removes the affected server groups.
  • Method Details

    • 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 return false.

      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 return true.

      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, or null if isServerGroupEffectGlobal() returns true
      Returns:
      the names of the server groups, or null if isServerGroupEffectGlobal() returns true. Will not return null if isServerGroupEffectGlobal() returns false, 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.