package-private: Set the trace specification of the service to the input
value.

@param spec
9205
static void setTraceSpec(TraceSpecification spec) {
        if (spec == null)
            return;

        // We must have the lock to proceed
        allTraceComponentsLock.lock();
        try {
            // Since we have the lock, we must process any new trace components and
            // if we do it now, those new components will also get the trace spec given to them.
            processNewTraceComponents();

            if (activeTraceSpec != null && activeTraceSpec.equals(spec)) {
                // equivalent trace specification -- nothing to do here.
                return;
            }
            activeTraceSpec = spec;

            // update all of the current trace components
            for (TraceComponent t : allTraceComponents) {
                t.setTraceSpec(activeTraceSpec);
            }
            // Update the static flag for whether or not any trace is enabled
            // no guarantee about when threads will see this update..  
            TraceComponent.setAnyTracingEnabled(activeTraceSpec.isAnyTraceEnabled());

            // Log the new trace level. This is done after updating TCs to
            // ensure the message goes to trace.log as necessary.
            // =enabled is redundant, and apparently discouraged, so we hide it for message display.
            Tr.info(TraceSpecification.getTc(), "MSG_TRACE_STATE_CHANGED", activeTraceSpec.toDisplayString());

            // Okay as that processing could have taken some time, we need to catch any new
            // trace components that might have appeared (which does leave a tiny window, but that
            // will either be caught on the next setTraceSpec or never processed (because we never
            // needed it).
            processNewTraceComponents();
        } finally {
            allTraceComponentsLock.unlock();
        }
    }
1349064
@Override
    public final void setDiscriminator(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setDiscriminator", value);
        if (value == null || isValidDiscriminator(value)) {
            super.setDiscriminator(value);
        }
        else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "setDiscriminator", "IllegalArgumentException");
            throw new IllegalArgumentException(value);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setDiscriminator");
    }
1153692
public void setMessagingAuthenticationService(
			MessagingAuthenticationService messagingAuthenticationService) {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
			SibTr.entry(tc, CLASS_NAME + "setMessagingAuthenticationService",
					messagingAuthenticationService);
		}
		this.messagingAuthenticationService = messagingAuthenticationService;
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
			SibTr.exit(tc, CLASS_NAME + "setMessagingAuthenticationService");
		}
	}
811765
def add(self, spec):
        
        for limit in spec.limit_to:
            if limit not in self.limit_to:
                self.limit_to.append(limit)
1362258
@Trivial
    protected void setSslSupport(ServiceReference<ChannelFactoryProvider> ref) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.entry(this, tc, "setSslSupport", new Object[] { ref.getProperty("type"), ref });
        }

        // If sslsupport is bound then set it to true 
        _isSSLEnabled = true;

        // bind can get called before unbind for new config/ modify.Hence the precaution
        if (_sslFactoryProvider.getReference() != null) { // existing chain is still there so destroy 
            if (_isChainStarted)
                performAction(destroyChainAction);
        }

        _sslFactoryProvider.setReference(ref);
        // we will only invoke createchain if 
        // 1) activate() is complete
        // this is because bind method get called first before activate and without activate we don't have any properties
        // 2) if useSSL is set in config 
        if (_isActivated && _isSSLChain) {
            //TODO: when executor service is used for performaction() make sure about sequence of destroy and create chain
            //Now currently its not threaded
            if (_isChainStarted)
                performAction(destroyChainAction);
            performAction(createChainAction);
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setSslSupport", _isSSLEnabled);
        }
    }
388656
@Override
    public void trace(String format, Object arg) {
        if (isTraceEnabled()) {
            FormattingTuple ft = MessageFormatter.format(format, arg);
            logger.log(FQCN, traceCapable ? Level.TRACE : Level.DEBUG, ft
                    .getMessage(), ft.getThrowable());
        }
    }
945224
void setServiceData(byte[] serviceData) throws InternalLogException
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setServiceData", new java.lang.Object[] { RLSUtils.toHexString(serviceData, RLSUtils.MAX_DISPLAY_BYTES), this });

        // Check that the files are available
        if ((_file1 == null) || (_file2 == null))
        {
            if (tc.isEntryEnabled())
                Tr.exit(tc, "setServiceData", "InternalLogException");
            throw new InternalLogException(null);
        }

        // Cache the service data buffer reference. This class logically 'owns' the buffer.
        _serviceData = serviceData;

        // Pass the reference to the underlying log file objects.
        _file1.setServiceData(serviceData);
        _file2.setServiceData(serviceData);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "setServiceData");
    }
229832
public Map<String, AddSpecResponse> put(Spec spec, boolean triggerListener) {
    Map<String, AddSpecResponse> responseMap = new HashMap<>();
    try {
      Preconditions.checkState(state() == State.RUNNING, String.format("%s is not running.", this.getClass().getName()));
      Preconditions.checkNotNull(spec);

      long startTime = System.currentTimeMillis();
      log.info(String.format("Adding FlowSpec with URI: %s and Config: %s", spec.getUri(),
          ((FlowSpec) spec).getConfigAsProperties()));
      specStore.addSpec(spec);
      metrics.updatePutSpecTime(startTime);
      if (triggerListener) {
        AddSpecResponse<CallbacksDispatcher.CallbackResults<SpecCatalogListener, AddSpecResponse>> response = this.listeners.onAddSpec(spec);
        for (Map.Entry<SpecCatalogListener, CallbackResult<AddSpecResponse>> entry: response.getValue().getSuccesses().entrySet()) {
          responseMap.put(entry.getKey().getName(), entry.getValue().getResult());
        }
      }
    } catch (IOException e) {
      throw new RuntimeException("Cannot add Spec to Spec store: " + spec, e);
    }
    return responseMap;
  }
209
public static void setTrace(boolean trace) {
        FallbackLoggerConfiguration.trace.set(trace);
        if (trace) {
            debug.set(true);
        }
    }
921023
public static void service(TraceComponent tc, String msgKey) {
    if(isTracing()) SibTr.service(tc, msgKey);

  }
836482
public final void setReportExpiry(Byte value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setReportExpiry", value);
        if (value != null) {
            getHdr2().setField(JsHdr2Access.REPORTEXPIRY_VALUE, value);
        }
        else {
            getHdr2().setChoiceField(JsHdr2Access.REPORTEXPIRY, JsHdr2Access.IS_REPORTEXPIRY_UNSET);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setReportExpiry");
    }
553983
public void tracef(String format, Object... params) {
        doLogf(Level.TRACE, FQCN, format, params, null);
    }
779308
public Reifier addTypeSet(Class<?> spec) {
        for (Field field: spec.getDeclaredFields()) {
            if (Modifier.isPublic(field.getModifiers())) {
                String name = field.getName();
                try {
                    _named.put(name, new Validator(name, field.getType(), field));
                } catch (IllegalArgumentException x) {
                    Trace.g.std.note(Reifier.class, "Ignored " + name + ": " + x.getMessage());
                }
            } else {
                Trace.g.std.note(Reifier.class, "Ignored non-public field: " + field.getName());
            }
        }

        return this;
    }
472338
protected void initQueue(T queue, QueueSpec spec) throws Exception {
        queue.setObserver(defaultObserver);
        queue.init();
    }
806885
public static synchronized void setInstrumentation(Instrumentation inst) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setInstrumentation", inst);

        instrumentation = inst;

        if (instrumentation == null) {
        } else if (isJava8TraceEnabled) {
        	setInjectAtTransform(true); //We always inject at transform in this workaround transformer. Either all or nothing here.
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "setInstrumentation");
    }
579206
def specAutoRange(self):
        """"""
        trace_range = self.responsePlots.values()[0].viewRange()[0]
        vb = self.specPlot.getViewBox()
        vb.autoRange(padding=0)
        self.specPlot.setXlim(trace_range)
169071
protected void setSslSupport(SSLSupport service, Map<String, Object> props) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setSslSupport", service);
        }

        sslSupport = service;
        defaultId = (String) props.get(SSL_CFG_REF);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setSslSupport", "defaultConfigId=" + defaultId);
        }
    }