Set the secret to all mediated transfers.

    The secret should have been learned from the secret registry.
346043
def set_onchain_secret(
        state: MediatorTransferState,
        channelidentifiers_to_channels: ChannelMap,
        secret: Secret,
        secrethash: SecretHash,
        block_number: BlockNumber,
) -> List[Event]:
    
    state.secret = secret

    for pair in state.transfers_pair:
        payer_channel = channelidentifiers_to_channels.get(
            pair.payer_transfer.balance_proof.channel_identifier,
        )
        if payer_channel:
            channel.register_onchain_secret(
                payer_channel,
                secret,
                secrethash,
                block_number,
            )

        payee_channel = channelidentifiers_to_channels.get(
            pair.payee_transfer.balance_proof.channel_identifier,
        )
        if payee_channel:
            channel.register_onchain_secret(
                channel_state=payee_channel,
                secret=secret,
                secrethash=secrethash,
                secret_reveal_block_number=block_number,
            )

    # Like the off-chain secret reveal, the secret should never be revealed
    # on-chain if there is a waiting transfer.
    if state.waiting_transfer:
        payer_channel = channelidentifiers_to_channels.get(
            state.waiting_transfer.transfer.balance_proof.channel_identifier,
        )
        if payer_channel:
            channel.register_onchain_secret(
                channel_state=payer_channel,
                secret=secret,
                secrethash=secrethash,
                secret_reveal_block_number=block_number,
            )

        unexpected_reveal = EventUnexpectedSecretReveal(
            secrethash=secrethash,
            reason='The mediator has a waiting transfer.',
        )
        return [unexpected_reveal]

    return list()
910843
function setKey($key) {
		$this->cnxn->confirmTransaction('setKey');
		$currKey = $this->key;
		if (!is_null($currKey) && is_null($key)) {
			$this->cnxn->unregisterStructWithKey($this, $currKey);
		} else if (is_null($currKey) && !is_null($key)) {
			$this->cnxn->registerStructWithKey($this, $key);
		} else if ($currKey != $key) {
			$this->cnxn->unregisterStructWithKey($this, $currKey);
			$this->cnxn->registerStructWithKey($this, $key);
		}
		$this->key = $key;
	}
1311875
def set_transfer_spec(self):
        '''  '''
        _ret = False
        try:
            self._args.transfer_spec_func(self._args)
            _ret = True
        except Exception as ex:
            self.notify_exception(AsperaTransferSpecError(ex), False)
        return _ret
945368
private function setCCI()
    {
        $cci = $this->mailable->get('_cci');

        if (!is_null($cci)) {
            foreach ($cci as $mail) {
                $this->message->setBcc($mail);
            }
        }
    }
329294
def _domain_event_tunable_cb(conn, domain, params, opaque):
    '''
    
    '''
    _salt_send_domain_event(opaque, conn, domain, opaque['event'], {
        'params': params
    })
427853
def _secret_event_value_changed_cb(conn, secret, opaque):
    '''
    
    '''
    _salt_send_event(opaque, conn, {
        'secret': {
            'uuid': secret.UUIDString()
        },
        'event': opaque['event']
    })
628449
def set_value(self, value):
        """"""
        self._value = value

        for proxy in self.get_proxies():
            proxy.handler_block(self._changed_handlers[proxy])
            proxy.set_value(self._value)
            proxy.handler_unblock(self._changed_handlers[proxy])
            pass

        self.emit('changed')
        return
159397
def setKey(self, key):
		""""""
		key = self._guardAgainstUnicode(key)
		self.__key = key
903180
def declare(self, exchange, type, passive=False, durable=False,
                nowait=True, arguments=None, ticket=None, cb=None):
        
        nowait = nowait and self.allow_nowait() and not cb

        args = Writer()
        args.write_short(ticket or self.default_ticket).\
            write_shortstr(exchange).\
            write_shortstr(type).\
            write_bits(passive, durable, False, False, nowait).\
            write_table(arguments or {})
        self.send_frame(MethodFrame(self.channel_id, 40, 10, args))

        if not nowait:
            self._declare_cb.append(cb)
            self.channel.add_synchronous_cb(self._recv_declare_ok)
41866
def register_onchain_secret(
        channel_state: NettingChannelState,
        secret: Secret,
        secrethash: SecretHash,
        secret_reveal_block_number: BlockNumber,
        delete_lock: bool = True,
) -> None:
    
    our_state = channel_state.our_state
    partner_state = channel_state.partner_state

    register_onchain_secret_endstate(
        our_state,
        secret,
        secrethash,
        secret_reveal_block_number,
        delete_lock,
    )
    register_onchain_secret_endstate(
        partner_state,
        secret,
        secrethash,
        secret_reveal_block_number,
        delete_lock,
    )
440300
def handle_offchain_secretreveal(
        target_state: TargetTransferState,
        state_change: ReceiveSecretReveal,
        channel_state: NettingChannelState,
        pseudo_random_generator: random.Random,
        block_number: BlockNumber,
) -> TransitionResult[TargetTransferState]:
    
    valid_secret = is_valid_secret_reveal(
        state_change=state_change,
        transfer_secrethash=target_state.transfer.lock.secrethash,
        secret=state_change.secret,
    )
    has_transfer_expired = channel.is_transfer_expired(
        transfer=target_state.transfer,
        affected_channel=channel_state,
        block_number=block_number,
    )

    if valid_secret and not has_transfer_expired:
        channel.register_offchain_secret(
            channel_state=channel_state,
            secret=state_change.secret,
            secrethash=state_change.secrethash,
        )

        route = target_state.route
        message_identifier = message_identifier_from_prng(pseudo_random_generator)
        target_state.state = TargetTransferState.OFFCHAIN_SECRET_REVEAL
        target_state.secret = state_change.secret
        recipient = route.node_address

        reveal = SendSecretReveal(
            recipient=recipient,
            channel_identifier=CHANNEL_IDENTIFIER_GLOBAL_QUEUE,
            message_identifier=message_identifier,
            secret=target_state.secret,
        )

        iteration = TransitionResult(target_state, [reveal])

    else:
        # TODO: event for byzantine behavior
        iteration = TransitionResult(target_state, list())

    return iteration
737365
def setSenderKeyState(self, id, iteration, chainKey, signatureKey):
        
        del self.senderKeyStates[:]
        self.senderKeyStates.append(SenderKeyState(id, iteration, chainKey, signatureKeyPair=signatureKey))
666252
function configure(receiver, secret) {
    this.Configuration.setDefault(new this.Configuration(receiver, secret));
    this.config = this.Configuration.getDefault();
  }
539040
def set_all(self, path, body):
        ""
        # Do some error checking
        if not isinstance(body, dict):
            raise HttpBadRequest("body_not_a_dict")
        for hostname, details in body.items():
            error = self.host_errors(hostname, details)
            if error:
                raise HttpBadRequest("%s:%s" % (hostname, error))
        # Replace
        old_hostnames = set(self.balancer.hosts.keys())
        new_hostnames = set(body.keys())
        self.balancer.hosts = body
        # Clean up stats dict
        for hostname in new_hostnames - old_hostnames:
            self.balancer.stats[hostname] = {}
        for hostname in old_hostnames - new_hostnames:
            try:
                del self.balancer.stats[hostname]
            except KeyError:
                pass
        return {"ok": True}
914197
def set(gandi, g, key, value):
    """"""
    gandi.configure(global_=g, key=key, val=value)
813964
public void setMsgId(long msgId) 
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "setMsgId", Long.valueOf(msgId)); 

    // No need to harden this. We only call this as part of restoring an AOValue->AIMessageItem link
    // for an IME (remote gathering). If the ME goes down we dont need the msgId anyway.
    this.msgId = msgId;
    restored = true;
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "setMsgId"); 
  }
223327
def transfer_state_data(cls, source_entity, target_entity):
        
        state_data = cls.get_state_data(source_entity)
        cls.set_state_data(target_entity, state_data)