Deletes an individual alias

@param alias
the alias to delete
965611
protected void deleteAlias(MonolingualTextValue alias) {
        String lang = alias.getLanguageCode();
        AliasesWithUpdate currentAliases = newAliases.get(lang);
        if (currentAliases != null) {
            currentAliases.aliases.remove(alias);
            currentAliases.deleted.add(alias);
            currentAliases.write = true;
        }
    }
1149567
public static void createAlias(RestClient client, String alias, String index) throws Exception {
        logger.trace("createAlias({},{})", alias, index);

        assert client != null;
        assert alias != null;
        assert index != null;

        Request request = new Request("POST", "/_aliases/");
        request.setJsonEntity("{\"actions\":[{\"add\":{\"index\":\"" + index +"\",\"alias\":\"" + alias +"\"}}]}");
        Response response = client.performRequest(request);

        if (response.getStatusLine().getStatusCode() != 200) {
            logger.warn("Could not create alias [{}] on index [{}]", alias, index);
            throw new Exception("Could not create alias ["+alias+"] on index ["+index+"].");
        }
        logger.trace("/createAlias({},{})", alias, index);
    }
135216
public void setRemoveLicenseSpecifications(java.util.Collection<LicenseSpecification> removeLicenseSpecifications) {
        if (removeLicenseSpecifications == null) {
            this.removeLicenseSpecifications = null;
            return;
        }

        this.removeLicenseSpecifications = new java.util.ArrayList<LicenseSpecification>(removeLicenseSpecifications);
    }
931732
def remove_alias_name(alias_name, file, new_file)
      started_removing = false
      file.each do |line|
        started_removing ||= line.include?("Host #{alias_name}")
        if started_removing
          # I will never stop till I find another host that is not the one I'm removing
          stop_removing = (started_removing && line.include?('Host ') && !(line =~ /\b#{alias_name}\b/))
          PRINTER.verbose_print line unless stop_removing
          if stop_removing && started_removing
            new_file.write(line)
          end
          started_removing = !stop_removing
        else
          # Everything else should be transfered safely to the other file
          new_file.write(line)
        end
      end
      file.close
      new_file.close
    end
938384
public void setAlias(String alias) {
        this.alias = (alias != null && alias.isEmpty() == false ? alias : null);
    }
651585
public void delete(Class clazz, Object identifier) {
        try {
            //noinspection ConstantConditions
            persistenceManager.deleteEntity(persistenceManager.findById(clazz, identifier));
        } catch (InitializationException ignore){}
        catch (Exception e) {
            e.printStackTrace();
        }

    }
746305
public function hasAlias($alias)
    {
        if ($this->name == $alias) {
            return true;
        }

        return in_array($alias, $this->aliases);
    }
1337185
protected function deleteAlias($name)
    {
        $aliases = $this->getAlias($name);

        if (empty($aliases)) {
            return;
        }

        foreach ($aliases as $index => $alias) {
            $deletePayload = (new RawPayload())
                ->set('index', $index)
                ->set('name', $name)
                ->get();

            ElasticClient::indices()
                ->deleteAlias($deletePayload);

            $this->info(sprintf(
                'The %s alias for the %s index was deleted.',
                $name,
                $index
            ));
        }
    }
1020084
final protected void common_removeAlias(Object alias) {
        ValidateUtility.objectNotNull(alias, "alias");
        cache.removeAlias(
                          alias,
                          cache.shouldPull(this.sharingPolicy, alias),
                          true);
    }
1230549
public void setAliases(java.util.Collection<String> aliases) {
        if (aliases == null) {
            this.aliases = null;
            return;
        }

        this.aliases = new java.util.ArrayList<String>(aliases);
    }
1238070
public void removeTargettingAlias(DestinationHandler aliasDestinationHandler)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeTargettingAlias", aliasDestinationHandler);
    
    synchronized(aliasesThatTargetThisDest)
    { 
      aliasesThatTargetThisDest.remove(aliasDestinationHandler);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "removeTargettingAlias");
  }
374221
private void removeCache(final String alias, final boolean removeFromConfig) {
    statusTransitioner.checkAvailable();
    final CacheHolder cacheHolder = caches.remove(alias);
    if(cacheHolder != null) {
      final InternalCache<?, ?> ehcache = cacheHolder.retrieve(cacheHolder.keyType, cacheHolder.valueType);
      if (ehcache != null) {
        if (removeFromConfig) {
          configuration.removeCacheConfiguration(alias);
        }

        if (!statusTransitioner.isTransitioning()) {
          for (CacheManagerListener listener : listeners) {
            listener.cacheRemoved(alias, ehcache);
          }
        }

        ehcache.close();
        closeEhcache(alias, ehcache);
      }
      LOGGER.info("Cache '{}' removed from {}.", alias, simpleName);
    }
  }
785725
public static base_response delete(nitro_service client, String aliasname) throws Exception {
		dnscnamerec deleteresource = new dnscnamerec();
		deleteresource.aliasname = aliasname;
		return deleteresource.delete_resource(client);
	}
961793
public void delete_device_alias(Database database, String alias)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        argIn.insert(alias);
        command_inout(database, "DbDeleteDeviceAlias", argIn);
    }
1359098
public function setAlias($name, $alias)
    {
        if ($alias === null && isset($this->aliases[$name])) {
            unset($this->aliases[$name]);
        } else {
            $this->aliases[$name] = $alias;
        }

        return $this;
    }
179145
public void deleteAliases(CmsDbContext dbc, CmsProject project, CmsAliasFilter filter) throws CmsException {

        I_CmsVfsDriver vfsDriver = getVfsDriver(dbc);
        vfsDriver.deleteAliases(dbc, project, filter);
    }
304214
def remove_alias(alias_names):
    
    alias_table = get_alias_table()
    for alias_name in alias_names:
        if alias_name not in alias_table.sections():
            raise CLIError(ALIAS_NOT_FOUND_ERROR.format(alias_name))
        alias_table.remove_section(alias_name)
    _commit_change(alias_table)