Remove subscriptions for a given group.

@param group
Name of the group. At Netflix this is typically the cluster that includes
the instance reporting data.
@return
This instance for chaining of update operations.
322250
public Evaluator removeGroupSubscriptions(String group) {
    List<Subscription> oldSubs = subscriptions.remove(group);
    if (oldSubs != null) {
      LOGGER.debug("removed group {} with {} subscriptions", group, oldSubs.size());
    }
    return this;
  }
873492
public void removeGroup(int groupId) {
        PreparedStatement statement = null;

        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_GROUPS
                    + " WHERE " + Constants.GENERIC_ID + " = ?"
            );
            statement.setInt(1, groupId);
            statement.executeUpdate();
            statement.close();

            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_OVERRIDE +
                    " WHERE " + Constants.OVERRIDE_GROUP_ID + " = ?"
            );

            statement.setInt(1, groupId);
            statement.executeUpdate();
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
        removeGroupIdFromTablePaths(groupId);
    }
1280001
public static function removeGroupContent(NodeInterface $node, Group $group) {
    // Try to load group content from entity.
    if ($group_contents = GroupContent::loadByEntity($node)) {
      /* @var @param \Drupal\group\Entity\GroupContent $group_content */
      foreach ($group_contents as $group_content) {
        if ($group->id() === $group_content->getGroup()->id()) {
          $group_content->delete();
        }
      }
    }
  }
950985
def remove_group(self, group):
        
        if not isinstance(group, Group):
            raise TypeError("group must be Group")
        if group not in self.groups:
            raise ValueError("Group doesn't exist / is not bound to this database.")
        
        #save num entries and children before removal to avoid for loop problems
        num_entries = len(group.entries)
        for i in xrange(num_entries):
            self.remove_entry(group.entries[0])

        # Recurse down to remove sub-groups
        num_children = len(group.children)
        for i in xrange(num_children): # We may need to copy this to avoid CME (see below)
            self.remove_group(group.children[0])
        
        # Finally remove group from the parent's list.
        group.parent.children.remove(group) # Concurrent modification exception? Parent in recursive stack is iterating ...
        self.groups.remove(group)
1102323
public void removeGroup(String groupId) {
		for (Iterator<QueryControllerEntity> iterator = entities.iterator(); iterator.hasNext();) {
			Object temporal = iterator.next();
			if (!(temporal instanceof QueryControllerGroup)) {
				continue;
			}
			QueryControllerGroup element = (QueryControllerGroup) temporal;
			if (element instanceof QueryControllerGroup) {
				QueryControllerGroup group = element;
				if (group.getID().equals(groupId)) {
					entities.remove(group);
					fireElementRemoved(group);
					return;
				}
			}
		}
	}
984437
public void removeGroup(@Nullable L group) {
        if (group == null) {
            return;
        }
        List<L> cards = getGroups();
        boolean changed = cards.remove(group);
        if (changed) {
            setData(cards);
        }
    }
1247249
public static CPDefinitionGroupedEntry removeByUUID_G(String uuid,
		long groupId)
		throws com.liferay.commerce.product.type.grouped.exception.NoSuchCPDefinitionGroupedEntryException {
		return getPersistence().removeByUUID_G(uuid, groupId);
	}
1278218
@Override
	public void removeByGroupId(long groupId) {
		for (CommerceUserSegmentEntry commerceUserSegmentEntry : findByGroupId(
				groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceUserSegmentEntry);
		}
	}
364745
public Response deleteGroup(String groupName) {
		return restClient.delete("groups/" + groupName, new HashMap<String, String>());
	}
771980
@Override
	public void removeByGroupId(long groupId) {
		for (CommerceWarehouse commerceWarehouse : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceWarehouse);
		}
	}
495954
@Override
	public void removeByGroupId(long groupId) {
		for (CProduct cProduct : findByGroupId(groupId, QueryUtil.ALL_POS,
				QueryUtil.ALL_POS, null)) {
			remove(cProduct);
		}
	}
537788
@Override
	public void removeByGroupId(long groupId) {
		for (CommercePriceEntry commercePriceEntry : findByGroupId(groupId,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceEntry);
		}
	}
588557
@Override
	public CommerceCountry removeByUUID_G(String uuid, long groupId)
		throws NoSuchCountryException {
		CommerceCountry commerceCountry = findByUUID_G(uuid, groupId);

		return remove(commerceCountry);
	}
202755
public OperationFuture<List<Group>> delete(Group... groups) {
        List<Group> groupList = Arrays.asList(groups);

        List<JobFuture> jobs = groupList.stream()
            .map(group -> delete(group).jobFuture())
            .collect(toList());

        return new OperationFuture<>(
            groupList,
            new ParallelJobsFuture(jobs)
        );
    }
89988
private Membership removeMembership(Session session, String id, boolean broadcast) throws Exception
   {
      MembershipByUserGroupTypeWrapper mWrapper;
      try
      {
         mWrapper = findMembership(session, id);
      }
      catch (ItemNotFoundException e)
      {
         return null;
      }
      catch (PathNotFoundException e)
      {
         return null;
      }

      if (broadcast)
      {
         preDelete(mWrapper.membership);
      }

      removeMembership(mWrapper.refUserNode, mWrapper.refTypeNode);
      session.save();

      removeFromCache(mWrapper.membership);

      if (broadcast)
      {
         postDelete(mWrapper.membership);
      }

      return mWrapper.membership;
   }
885710
public function removeGroup(GroupInterface $group): void
    {
        if (!$group instanceof Production) {
            throw new Exception('Group type not supported.');
        }
        $this->groups->removeElement($group);
    }
962929
def delete_group(self, name):
        
        self.service.delete_group(
            name, self.url_prefix, self.auth, self.session,
            self.session_send_opts)