/* (non-Javadoc)
@see com.ibm.ws.sib.processor.runtime.ControlAdapter#dereferenceControllable()
508786
public void dereferenceControllable()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "dereferenceControllable", tsm);
    
    streamSet = null;
    tsm = null;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "dereferenceControllable"); 
  }
953789
@Override
    public final boolean lockItemIfAvailable(long lockID) throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "lockItemIfAvailable", Long.valueOf(lockID));

        boolean locked = false;
        if (AbstractItem.NO_LOCK_ID == lockID)
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "lockItemIfAvailable");
            throw new SevereMessageStoreException("invalid lockID - clashes with internal constant NO_LOCK_ID");
        }
        boolean hasBecomeNonReleasable = false;
        synchronized (this)
        {
            if (!isExpired() && isAvailable())
            {
                if (ItemLinkState.STATE_AVAILABLE == _itemLinkState)
                {
                    ListStatistics stats = getParentStatistics();
                    synchronized (stats)
                    {
                        stats.incrementLocked();
                        stats.decrementAvailable();
                    }
                }
                else
                {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                        SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        SibTr.exit(this, tc, "lockItemIfAvailable");
                    throw new StateException(_itemLinkState.toString());
                }
                locked = true;
                _lockID = lockID;
                hasBecomeNonReleasable = _declareNotDiscardable(_getItemNoRestore());
                _itemLinkState = ItemLinkState.STATE_LOCKED;
            }
        }
        if (hasBecomeNonReleasable)
        {
            _declareNotReleasable();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "lockItemIfAvailable", Boolean.valueOf(locked));
        return locked;
    }
1134266
protected void setDeferrableScheduledExecutor(ServiceReference<ScheduledExecutorService> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setDeferrableScheduledExecutor", ref);
        deferrableSchedXSvcRef.setReference(ref);
    }
804680
static boolean mayEffectMutableState(Node n, AbstractCompiler compiler) {
    checkNotNull(compiler);
    return checkForStateChangeHelper(n, true, compiler);
  }
1075013
@Override
    public void deregisterControlAdapterMBean()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "deregisterControlAdapterAsMBean");
        subscriptionControlAdaptor.dereferenceControllable();
        subscriptionControlAdaptor = null;
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "deregisterControlAdapterAsMBean");
    }
269541
@Reference(name = KEY_GENERATOR, service = DDLGenerationParticipant.class, policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.MULTIPLE)
    protected void setGenerator(ServiceReference<DDLGenerationParticipant> ref) {
        generators.addReference(ref);
    }
1219214
private final void _declareNotReleasable() throws SevereMessageStoreException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "_declareNotReleasable");

        if (_isStorageManaged)
        {
            _itemCache.unmanage(this);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "_declareNotReleasable");
    }
230646
@SuppressWarnings("unchecked")
	public <T extends RepresentationModel<T>> T invokeProcessorsFor(T value, ResolvableType referenceType) {

		Assert.notNull(value, "Value must not be null!");
		Assert.notNull(referenceType, "Reference type must not be null!");

		// For Resources implementations, process elements first
		if (RepresentationModelProcessorHandlerMethodReturnValueHandler.COLLECTION_MODEL_TYPE
				.isAssignableFrom(referenceType)) {

			CollectionModel<?> collectionModel = (CollectionModel<?>) value;
			Class<?> rawClass = referenceType.getRawClass();

			if (rawClass == null) {
				throw new IllegalArgumentException(String.format("%s does not expose a raw type!", referenceType));
			}

			ResolvableType elementTargetType = ResolvableType.forClass(CollectionModel.class, rawClass).getGeneric(0);
			List<Object> result = new ArrayList<>(collectionModel.getContent().size());

			for (Object element : collectionModel) {

				ResolvableType elementType = ResolvableType.forClass(element.getClass());

				if (!getRawType(elementTargetType).equals(elementType.getRawClass())) {
					elementTargetType = elementType;
				}

				result.add(invokeProcessorsFor(element, elementTargetType));
			}

			if (RepresentationModelProcessorHandlerMethodReturnValueHandler.CONTENT_FIELD != null) {

				ReflectionUtils.setField( //
						RepresentationModelProcessorHandlerMethodReturnValueHandler.CONTENT_FIELD, //
						collectionModel, //
						result //
				);
			}
		}

		return (T) invokeProcessorsFor((Object) value, referenceType);
	}
1245706
private Value deref(Value value)
	{
		if (value instanceof ReferenceValue || value instanceof UpdatableValue
				|| value instanceof TransactionValue)
		{
			return value.deref();
		} else
		{
			return value;
		}
	}
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");
  }
619819
@Override
    public T take(final WaitStrategy.Takeable<T> t) throws InterruptedException {
        double currentBackoff = backoffNanos;
        T result;

        while ((result = t.take()) == null) {
            LockSupport.parkNanos((long) currentBackoff);
            currentBackoff = currentBackoff * coefficient;

        }

        return result;
    }
262081
public void reachabilityChange(boolean reachable)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this,tc, "reachabilityChange", Boolean.valueOf(reachable));
    Object[] clonedConsumerPoints = null;
    synchronized (consumerPoints)
    {      
      // If we went from reachable to not reachable - clone the consumer points
      if (_currentReachability && !reachable)
      {
        // we clone the list before notifying the exception, since the CP's may call methods on the CD in the
        // context of the notification, and don't want a deadlock
        clonedConsumerPoints = consumerPoints.toArray();
      }
      _currentReachability = reachable;
    }
    if (clonedConsumerPoints != null)
    {
      // unreachable. throw exception to ConsumerPoints
      SIResourceException e = new SIResourceException(
        nls.getFormattedMessage("ANYCAST_STREAM_UNAVAILABLE_CWSIP0471",
                                new Object[]{getDestName(), SIMPUtils.getMENameFromUuid(getLocalisationUuid().toString())},
                                null));
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.exception(tc, e);

      for (int i=0; i<clonedConsumerPoints.length; i++)
      {
        DispatchableKey ck = (DispatchableKey) clonedConsumerPoints[i];
        
        // Only close non gathering consumer points - the 
        
        ck.getConsumerPoint().implicitClose(null, e, _aih.getLocalisationUuid() );
      }
    }
    if (TraceComponent.isAnyTracingEnabled() &&  tc.isEntryEnabled()) SibTr.exit(tc, "reachabilityChange");
  }
220776
public void dereferenceControllable()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "dereferenceControllable");

    _destinationManager = null;
    _foreignBus = null;
    _mpControl = null;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "dereferenceControllable");    
  }
622722
@Override
    public final void setPriority(int value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setPriority", Integer.valueOf(value));
        if ((value >= MfpConstants.MIN_PRIORITY) && (value <= MfpConstants.MAX_PRIORITY)) {
            /* Call the superclass's method to set the value into the field */
            super.setPriority(value);
        }
        else {
            IllegalArgumentException e = new IllegalArgumentException(Integer.toString(value));
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "setPriority", e);
            throw e;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setPriority");
    }
108672
protected void setVariableRegistry(ServiceReference<VariableRegistry> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setVariableRegistry", ref);
        variableRegistryRef.setReference(ref);
    }
1127996
@Override
    public void deregisterStoppableAsynchConsumerCallback()
                    throws SISessionUnavailableException, SISessionDroppedException,
                    SIErrorException,
                    SIIncorrectCallException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConsumerSession.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConsumerSession.tc, "deregisterStoppableAsynchConsumerCallback", this);
        //Deregister the AsynchConsumer by registering null with the LCP
        //the other params don't matter
        registerStoppableAsynchConsumerCallback(null, 1, 0, 1, null, 0, 0);
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConsumerSession.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConsumerSession.tc, "deregisterStoppableAsynchConsumerCallback");
    }
49593
public void initializeReferenceData() {
        if (_referenceDataActivationManager == null) {
            return;
        }
        final Collection<Object> referenceDataCollection = _referenceDataActivationManager.getAllReferenceData();
        for (Object referenceData : referenceDataCollection) {
            ComponentDescriptor<? extends Object> descriptor = Descriptors.ofComponent(referenceData.getClass());

            assignProvidedProperties(descriptor, referenceData);
            initialize(descriptor, referenceData);
        }
    }