Skip to content
Browse files
deprecate group.members.delegate and prevent delegate creation when a…
…dding to quarantine

- use of delegate to denote quarantine group membership in the jsgui is no longer required due to #929
  • Loading branch information
johnmccabe committed Jan 13, 2016
1 parent d058158 commit f0e4070343a768fe766d9251edbd90253d48fef7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
@@ -58,8 +58,12 @@ public interface AbstractGroup extends Entity, Group, Changeable {
AttributeSensor<Entity> FIRST = Sensors.newSensor(Entity.class,
"cluster.first.entity", "The first member of the cluster");

* @deprecated since 0.9.0, the UI no longer relies on the use of delegates to represent group membership (see #929)
ConfigKey<Boolean> MEMBER_DELEGATE_CHILDREN = ConfigKeys.newBooleanConfigKey(
"group.members.delegate", "Add delegate child entities for members of the group", Boolean.FALSE);
"group.members.delegate", "Deprecated: Add delegate child entities for members of the group", Boolean.FALSE);

ConfigKey<String> MEMBER_DELEGATE_NAME_FORMAT = ConfigKeys.newStringConfigKey(
"group.members.delegate.nameFormat", "Delegate members name format string (Use %s for the original entity display name)", "%s");
@@ -146,6 +146,7 @@ public boolean addMember(Entity member) {
sensors().emit(MEMBER_ADDED, member);

if (Boolean.TRUE.equals(getConfig(MEMBER_DELEGATE_CHILDREN))) {
log.warn("Use of deprecated ConfigKey {} in {} (as of 0.9.0)", MEMBER_DELEGATE_CHILDREN.getName(), this);
Optional<Entity> result = Iterables.tryFind(getChildren(), Predicates.equalTo(member));
if (!result.isPresent()) {
String nameFormat = Optional.fromNullable(getConfig(MEMBER_DELEGATE_NAME_FORMAT)).or("%s");
@@ -27,8 +27,6 @@
public interface QuarantineGroup extends AbstractGroup {

ConfigKey<Boolean> MEMBER_DELEGATE_CHILDREN = ConfigKeys.newConfigKeyWithDefault(AbstractGroup.MEMBER_DELEGATE_CHILDREN, Boolean.TRUE);

@Effector(description="Removes all members of the quarantined group, unmanaging them")
void expungeMembers(
@EffectorParam(name="firstStop", description="Whether to first call stop() on those members that are stoppable") boolean stopFirst);

0 comments on commit f0e4070

Please sign in to comment.