/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.AbstractControllable#dereferenceControllable()
183721
public void dereferenceControllable()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "dereferenceControllable");
      
    _issueTime = 0;
    _timeout = 0;
    _selectionCriterias = null;
    _ackingDME = 0;  
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "dereferenceControllable");
  }
1299944
protected ProcessApplicationInterface lookupSelfReference() {

    try {
      InitialContext ic = new InitialContext();
      SessionContext sctxLookup = (SessionContext) ic.lookup(EJB_CONTEXT_PATH);
      return sctxLookup.getBusinessObject(getBusinessInterface());
    }
    catch (NamingException e) {
      throw LOG.ejbPaCannotLookupSelfReference(e);
    }

  }
579983
public boolean decrement() {
		synchronized (lock) {
			if (isDisposed) {
				return false;
			}

			referenceCount--;

			if (referenceCount <= disposeOnReferenceCount) {
				isDisposed = true;
			}

			return isDisposed;
		}
	}
982210
private synchronized void disableDeferredReferenceData() {
        deferredReferenceDataEnabled = false;
        if (parent != null && deferredReferenceDatas != null) {
            parent.removeDeferredReferenceData(this);
            deferredReferenceDatas = null;
        }
    }
1245706
private Value deref(Value value)
	{
		if (value instanceof ReferenceValue || value instanceof UpdatableValue
				|| value instanceof TransactionValue)
		{
			return value.deref();
		} else
		{
			return value;
		}
	}
1159772
@Override
  public void process(Node externs, Node root) {
    checkState(compiler.getLifeCycleStage().isNormalized());
    if (!allowRemovalOfExternProperties) {
      referencedPropertyNames.addAll(compiler.getExternProperties());
    }
    traverseAndRemoveUnusedReferences(root);
    // This pass may remove definitions of getter or setter properties.
    GatherGettersAndSetterProperties.update(compiler, externs, root);
  }
89883
function dereference (parser, options) {
  // console.log('Dereferencing $ref pointers in %s', parser.$refs._root$Ref.path);
  var dereferenced = crawl(parser.schema, parser.$refs._root$Ref.path, "#", [], parser.$refs, options);
  parser.$refs.circular = dereferenced.circular;
  parser.schema = dereferenced.value;
}
474116
@Override
    public void deregisterAsynchConsumerCallback()
                    throws SISessionUnavailableException, SISessionDroppedException,
                    SIErrorException,
                    SIIncorrectCallException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConsumerSession.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConsumerSession.tc, "deregisterAsynchConsumerCallback", this);
        //Deregister the AsynchConsumer by registering null with the LCP
        //the other params don't matter
        registerAsynchConsumerCallback(null, 1, 0, 1, null);
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConsumerSession.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConsumerSession.tc, "deregisterAsynchConsumerCallback");
    }
401978
@Override
    public boolean removeFirstOccurrence(DelayedEntry incoming) {
        Data incomingKey = (Data) incoming.getKey();
        Object incomingValue = incoming.getValue();

        DelayedEntry current = map.get(incomingKey);
        if (current == null) {
            return false;
        }

        Object currentValue = current.getValue();
        if (incomingValue == null && currentValue == null
                || incomingValue != null && currentValue != null && incomingValue.equals(currentValue)) {
            map.remove(incomingKey);
            return true;
        }

        return false;
    }
1126700
function dereference(o,definitions,options) {
    if (!options) options = {};
    if (!options.cache) options.cache = {};
    if (!options.state) options.state = {};
    options.state.identityDetection = true;
    // options.depth allows us to limit cloning to the first invocation
    options.depth = (options.depth ? options.depth+1 : 1);
    let obj = (options.depth > 1 ? o : clone(o));
    let container = { data: obj };
    let defs = (options.depth > 1 ? definitions : clone(definitions));
    // options.master is the top level object, regardless of depth
    if (!options.master) options.master = obj;

    let logger = getLogger(options);

    let changes = 1;
    while (changes > 0) {
        changes = 0;
    recurse(container,options.state,function(obj,key,state){
        if (isRef(obj,key)) {
            let $ref = obj[key]; // immutable
            changes++;
            if (!options.cache[$ref]) {
                let entry = {};
                entry.path = state.path.split('/$ref')[0];
                entry.key = $ref;
                logger.warn('Dereffing %s at %s',$ref,entry.path);
                entry.source = defs;
                entry.data = jptr(entry.source,entry.key);
                if (entry.data === false) {
                    entry.data = jptr(options.master,entry.key);
                    entry.source = options.master;
                }
                if (entry.data === false) {
                    logger.warn('Missing $ref target',entry.key);
                }
                options.cache[$ref] = entry;
                entry.data = state.parent[state.pkey] = dereference(jptr(entry.source,entry.key),entry.source,options);
                if ((options.$ref) && (typeof state.parent[state.pkey] === 'object')) state.parent[state.pkey][options.$ref] = $ref;
                entry.resolved = true;
            }
            else {
                let entry = options.cache[$ref];
                if (entry.resolved) {
                    // we have already seen and resolved this reference
                    logger.warn('Patching %s for %s',$ref,entry.path);
                    state.parent[state.pkey] = entry.data;
                    if ((options.$ref) && (typeof state.parent[state.pkey] === 'object')) state.parent[state.pkey][options.$ref] = $ref;
                }
                else if ($ref === entry.path) {
                    // reference to itself, throw
                    throw new Error(`Tight circle at ${entry.path}`);
                }
                else {
                    // we're dealing with a circular reference here
                    logger.warn('Unresolved ref');
                    state.parent[state.pkey] = jptr(entry.source,entry.path);
                    if (state.parent[state.pkey] === false) {
                        state.parent[state.pkey] = jptr(entry.source,entry.key);
                    }
                    if ((options.$ref) && (typeof state.parent[state.pkey] === 'object')) state.parent[options.$ref] = $ref;
                }
            }
        }
    });
    }
    return container.data;
}
490551
public synchronized void removeDeferredReferenceData(DeferredReferenceData refData) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "removeDeferredReferenceData", "this=" + this, refData);
        }

        if (deferredReferenceDatas != null) {
            deferredReferenceDatas.remove(refData);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "removeDeferredReferenceData");
        }
    }
1340295
public final EObject entryRuleMultiTypeReference() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleMultiTypeReference = null;


        try {
            // InternalSARL.g:10414:59: (iv_ruleMultiTypeReference= ruleMultiTypeReference EOF )
            // InternalSARL.g:10415:2: iv_ruleMultiTypeReference= ruleMultiTypeReference EOF
            {
            if ( state.backtracking==0 ) {
               newCompositeNode(grammarAccess.getMultiTypeReferenceRule()); 
            }
            pushFollow(FOLLOW_1);
            iv_ruleMultiTypeReference=ruleMultiTypeReference();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {
               current =iv_ruleMultiTypeReference; 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return current;

            }

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
509893
@Override
    public void dereferenceControlAdapter()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "dereferenceControlAdapter");

        if (controlAdapter != null)
        {
            controlAdapter.dereferenceControllable();
            controlAdapter = null;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "dereferenceControlAdapter");
    }
1080348
protected void writeReference(long offset, Object reference) {
        assert referenceMessageSize != 0 : "References are not in use";
        // Is there a way to compute the element offset once and just
        // arithmetic?
        UnsafeRefArrayAccess.spElement(references, UnsafeRefArrayAccess.calcElementOffset(offset), reference);
    }
1091120
private final Result lockForUpgradeInterruptibly_(L locker) throws InterruptedException {
        if (Thread.interrupted()) {
            throw new InterruptedException();
        }
        Result result;
        if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) {
            result = lockForUpgradeQueuedInterruptibly(locker, addUpgradeWaiter());
        }
        return result;
    }
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;
    }
306414
public void dereferenceControllable()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "dereferenceControllable");
    
    super.dereferenceControllable();
    referenceItemStream = null;
    consumerDispatcher = null;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "dereferenceControllable");
  }