/*
(non-Javadoc)

@see com.ibm.ws.sib.admin.ControllableRegistrationService#deregister(com.ibm.ws.sib.admin.Controllable, com.ibm.ws.sib.admin.ControllableType)
494768
@Override
    public void deregister(Controllable controllable, ControllableType type)
                    throws NotRegisteredException, SIBExceptionInvalidValue {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "deregister", new Object[] { controllable, type });
        try {
            if (type == ControllableType.QUEUE_POINT) {
                ServiceRegistration<QueueMBean> qMBean = (ServiceRegistration<QueueMBean>) this.serviceObjects.get(controllable.getName());
                qMBean.unregister();
            } else if (type == ControllableType.PUBLICATION_POINT) {
                ServiceRegistration<TopicMBean> topicMBean = (ServiceRegistration<TopicMBean>) this.serviceObjects.get(controllable.getName());
                topicMBean.unregister();
            } else if (type == ControllableType.SUBSCRIPTION_POINT) {
                ServiceRegistration<SubscriberMBean> subMBean = (ServiceRegistration<SubscriberMBean>) this.serviceObjects.get(controllable.getName());
                subMBean.unregister();
            }
        } catch (Exception e) {
            SibTr.exception(tc, e);
        }

        deregister(controllable);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "deregister");
        return;
    }
1133241
@Override
    public void generate() throws CodeGenerationException
    {
        super.generate();

        /*
        The annotation processor may be passed multiple control client types.  Build a map that
        links each control client type with the set of control types that it uses.
        */

        Map<TypeDeclaration,Set<TypeMirror>> clientsMap = new HashMap<TypeDeclaration,Set<TypeMirror>>();

        for (AnnotationTypeDeclaration atd : _atds)
        {
            if (atd.getSimpleName().equals("Control") )
            {
                AnnotationProcessorEnvironment env = getAnnotationProcessorEnvironment();
                Collection<Declaration> decls = env.getDeclarationsAnnotatedWith(atd);
                for (Declaration decl : decls)
                {
                    if ( decl instanceof FieldDeclaration )
                    {
                        FieldDeclaration fd = (FieldDeclaration)decl;
                        TypeDeclaration clientType = fd.getDeclaringType();
                        TypeMirror controlFieldType = fd.getType();
                        addControlType( clientsMap, clientType, controlFieldType );

                        /*
                        Add the control type to any derived class.  Fields with
                        private and default (package) access are also included
                        here as the controls in superclasses may be exposed
                        through public or protected methods to subclasses.
                        */
                        Collection<TypeDeclaration> specifiedTypeDeclartions = env.getSpecifiedTypeDeclarations();
                        for (TypeDeclaration td : specifiedTypeDeclartions)
                        {
                            if (td instanceof ClassDeclaration)
                            {
                                ClassType superclass = ((ClassDeclaration) td).getSuperclass();
                                while (superclass != null)
                                {
                                    if (superclass.getDeclaration().equals(clientType))
                                    {
                                        addControlType(clientsMap, td, controlFieldType);
                                        break;
                                    }

                                    superclass = superclass.getSuperclass();
                                }
                            }
                        }
                    }
                }
            }
            else if (atd.getSimpleName().equals("ControlReferences"))
            {
                Collection<Declaration> decls = getAnnotationProcessorEnvironment().getDeclarationsAnnotatedWith(atd);
                for (Declaration decl : decls)
                {
                    if ( decl instanceof TypeDeclaration )
                    {
                        TypeDeclaration clientType = (TypeDeclaration)decl;
                        Set<TypeMirror> controlTypes = clientsMap.get( clientType );
                        if ( controlTypes == null )
                        {
                            controlTypes = new HashSet<TypeMirror>();
                            clientsMap.put( clientType, controlTypes );
                        }

                        // Read ControlReferences annotation
                        AnnotationMirror controlMirror = null;
                        for (AnnotationMirror annot : clientType.getAnnotationMirrors())
                        {
                            if (annot.getAnnotationType().getDeclaration().getQualifiedName().equals(
                                    "org.apache.beehive.controls.api.bean.ControlReferences"))
                            {
                                controlMirror = annot;
                                break;
                            }
                        }

                        assert( controlMirror != null );

                        // Add each control type listed in the ControlReferences annotation
                        AptAnnotationHelper controlAnnot = new AptAnnotationHelper(controlMirror);
                        Collection<AnnotationValue> references = (Collection<AnnotationValue>)controlAnnot.getObjectValue("value");
                        if ( references != null )
                        {
                            for ( AnnotationValue av : references )
                            {
                                TypeMirror crType = (TypeMirror)av.getValue();
                                controlTypes.add( crType );
                            }
                        }
                    }
                }
            }
        }

        // For each client type:
        //   1 - emit a controls client manifest in the same dir as the client type's class.
        //   2 - emit a controls client initializer class in the same pkg/dir as the client type's class

        Filer f = getAnnotationProcessorEnvironment().getFiler();
        Set<TypeDeclaration> clientTypes = clientsMap.keySet();
        for ( TypeDeclaration clientType : clientTypes )
        {
            // Emit manifest

            String clientPkg = clientType.getPackage().getQualifiedName();
            File clientManifestName =
                new File( clientType.getSimpleName() + ControlClientManifest.FILE_EXTENSION );

            ControlClientManifest mf = new ControlClientManifest( clientType.getQualifiedName() );

            try
            {
                Set<TypeMirror> controlTypes = clientsMap.get( clientType );
                for ( TypeMirror controlType : controlTypes )
                {
                    InterfaceDeclaration controlIntfOrExt = getControlInterfaceOrExtension(controlType);
                    InterfaceDeclaration controlIntf = getMostDerivedControlInterface( controlIntfOrExt );

                    assert controlIntf != null : "Can't find most derived control intf for=" + controlIntfOrExt;

                    ControlInterface annot = controlIntf.getAnnotation(ControlInterface.class);
                    String defBinding = annot.defaultBinding();

                    defBinding = ControlUtils.resolveDefaultBinding( defBinding, controlIntf.getQualifiedName() );

                    mf.addControlType( controlIntfOrExt.getQualifiedName(), defBinding );
                }

                mf.emit( f, clientPkg, clientManifestName, null );
            }
            catch ( IOException ie )
            {
                printError( clientType, "controls.client.manifest.ioerror" );
                ie.printStackTrace( );
            }

            // Emit initializer

            AnnotationProcessorEnvironment env = getAnnotationProcessorEnvironment();
            Generator genClass = new AptControlClient( clientType, this );

            if ( genClass != null )
            {
                try
                {
                    List<GeneratorOutput> genList = genClass.getGenerateOutput(env.getFiler());
                    if (genList == null || genList.size() == 0)
                        return;

                    for (GeneratorOutput genOut : genList)
                    {
                        getGenerator().generate(genOut);
                    }
                }
                catch (IOException ioe)
                {
                    throw new CodeGenerationException("Code generation failure: ", ioe);
                }
            }
        }
    }
1055946
function ( callbackOnFinishedProcessing ) {
		if ( this.logging.enabled ) console.info( 'WorkerDirector received the deregister call. Terminating all workers!' );

		this.instructionQueuePointer = this.instructionQueue.length;
		this.callbackOnFinishedProcessing = THREE.LoaderSupport.Validator.verifyInput( callbackOnFinishedProcessing, null );

		for ( var name in this.workerDescription.workerSupports ) {

			this.workerDescription.workerSupports[ name ].terminateRequested = true;

		}
	}
92870
@Indexable(type = IndexableType.DELETE)
	@Override
	public CPDefinitionGroupedEntry deleteCPDefinitionGroupedEntry(
		CPDefinitionGroupedEntry cpDefinitionGroupedEntry) {
		return cpDefinitionGroupedEntryPersistence.remove(cpDefinitionGroupedEntry);
	}
569838
public void dereferenceControllable()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "dereferenceControllable");

    destinationManager = null;
    baseDest = null;
    index = null;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "dereferenceControllable");
  }
437239
@Override
    public void deregisterFactories(ChannelFactoryProvider provider) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Removing factory provider; " + provider.getClass().getName());
        }
        for (Entry<String, Class<? extends ChannelFactory>> entry : provider.getTypes().entrySet()) {
            this.providers.remove(entry.getKey());
            deregisterFactory(entry.getKey());
        }
        this.activatedProviders.remove(provider);
    }
849151
@Override
  public void deregisterHost(final String host)
      throws HostNotFoundException, HostStillInUseException {
    final ZooKeeperClient client = provider.get("deregisterHost");
    ZooKeeperRegistrarUtil.deregisterHost(client, host);
  }
177426
@Override
    public void setMessageControlClassification(String classification)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setMessageControlClassification", classification);
        JsMessage localMsg = getJSMessage(true);

        // Cannot set this parameter on a Control message
        if (localMsg.isApiMessage())
        {
            if (localMsg instanceof JsApiMessage)
            {
                ((JsApiMessage) localMsg).setMessageControlClassification(classification);
                messageControlClassification = classification;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setMessageControlClassification");
    }
884888
@Override
    public void remove(TypeCategory typeCategory, String typeName)
            throws AtlasException {

        assertValidTypeCategory(typeCategory);
        remove(typeName);
    }
495596
@Override
    public void contextDestroyed(ServletContextEvent event) {
        // deregister database drivers
        try {
            for (Enumeration<Driver> e = DriverManager.getDrivers(); e
                    .hasMoreElements();) {
                Driver driver = e.nextElement();
                if (driver.getClass().getClassLoader() == getClass()
                        .getClassLoader()) {
                    DriverManager.deregisterDriver(driver);
                }
            }
        } catch (Throwable e) {
            // Any errors thrown in clearing the caches aren't significant to
            // the normal execution of the application, so we ignore them
        }
        // Clean the axis method cache, see FCREPO-496
//        org.apache.axis.utils.cache.MethodCache.getInstance().clearCache();
    }
664795
public static void deregisterTx(Session tx) {
        if (tx == null) {
            return;
        }
        synchronized (allFields) {
            for (TransientField<?> f: allFields.keySet()) {
                //returns null if key does not exist.
                synchronized (f) {
                    if (f.txMap.containsKey(tx)) {
                        f.txMap.remove(tx).clear();
                    }
                }
            }
        }
    }
263748
@Override
    public void removedService(ServiceReference<ManagedServiceFactory> reference, ManagedServiceFactory service) {
        String[] factoryPids = getServicePid(reference);

        if (factoryPids == null) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "removedService(): Invalid service.pid type: " + reference);
            }
            return;
        }

        synchronized (caFactory.getConfigurationStore()) {
            for (String pid : factoryPids) {
                remove(reference, pid);
            }
        }

        context.ungetService(reference);
    }
232048
@SuppressWarnings("unchecked")
	@Override
	public <E> SqlEntityDelete<E> delete(final Class<? extends E> entityType) {
		@SuppressWarnings("rawtypes")
		EntityHandler handler = this.getEntityHandler();
		if (!handler.getEntityType().isAssignableFrom(entityType)) {
			throw new IllegalArgumentException("Entity type not supported");
		}

		try {
			TableMetadata metadata = handler.getMetadata(this.transactionManager, entityType);

			SqlContext context = handler.createDeleteContext(this, metadata, entityType, false);
			context.setSqlKind(SqlKind.DELETE);

			return new SqlEntityDeleteImpl<>(this, handler, metadata, context);
		} catch (SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.DELETE, e);
		}
	}
962933
public final void mDELETE() throws RecognitionException {
		try {
			int _type = DELETE;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// druidG.g:596:17: ( ( 'DELETE' | 'delete' ) )
			// druidG.g:596:18: ( 'DELETE' | 'delete' )
			{
			// druidG.g:596:18: ( 'DELETE' | 'delete' )
			int alt12=2;
			int LA12_0 = input.LA(1);
			if ( (LA12_0=='D') ) {
				alt12=1;
			}
			else if ( (LA12_0=='d') ) {
				alt12=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 12, 0, input);
				throw nvae;
			}

			switch (alt12) {
				case 1 :
					// druidG.g:596:19: 'DELETE'
					{
					match("DELETE"); 

					}
					break;
				case 2 :
					// druidG.g:596:28: 'delete'
					{
					match("delete"); 

					}
					break;

			}

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
423779
void deregisterDestination()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "deregisterDestination");

    try
    {
      if(_registeredInWLM) // defect 241790, guard against attempting delete when not registered
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
          SibTr.debug(tc, "Deregister MQLink: " + getUuid() + ", from LinkManager");       
        _linkManager.deregister(getUuid());
      }
      _registeredInWLM = false;
    }
    catch (LinkException e)
    {
      //Error during create of the link.  Trace an FFST.  If we cant 
      //advertise the link, other ME's wont be able to send to it
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.impl.MQLinkHandler.deregisterDestination",
        "1:769:1.71",
        this);
  
      SibTr.exception(tc, e);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
        SibTr.exit(tc, "deregisterDestination", e);
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "deregisterDestination");  
      
    return;
  }
443683
@Override
	public CompletableFuture<Acknowledge> deregisterApplication(
			final ApplicationStatus finalStatus,
			@Nullable final String diagnostics) {
		log.info("Shut down cluster because application is in {}, diagnostics {}.", finalStatus, diagnostics);

		try {
			internalDeregisterApplication(finalStatus, diagnostics);
		} catch (ResourceManagerException e) {
			log.warn("Could not properly shutdown the application.", e);
		}

		return CompletableFuture.completedFuture(Acknowledge.get());
	}
658659
public void deregister(CacheEntryListenerConfiguration<K, V> configuration) {
    requireNonNull(configuration);
    dispatchQueues.keySet().removeIf(registration ->
        configuration.equals(registration.getConfiguration()));
  }