Add the supplied consumerKey to a keyGroup, create the keyGroup if required
437826
public ConsumerKeyGroup joinKeyGroup(ConsumerKey consumerKey, OrderingContextImpl orderingGroup) 
  throws SIResourceException, SISessionDroppedException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "joinKeyGroup", new Object[] {consumerKey, orderingGroup});

    JSKeyGroup keyGroup = null;

    // We need to hold the keyGroup lock while we add a member (to prevent the
    // member count (and therefore the ready state) changing under an existing
    // member's feet). We also need the readyConsumerPointLock while we're adding
    // a new keyGroup to the hashmap (as users of different groups may attempt to
    // join at the same time). But we cannot hold the readyConsumerPointLock while we
    // do this as it is below the keyGroup lock in the hierarchy. Instead we lock
    // the orderingGroup as a whole, this prevents anyone else trying to come along
    // and join a new keyGroup (and possibly leave it - causing it to be removed)
    // before we manage to add ourselves to it.
    synchronized(orderingGroup)
    {
      synchronized(_baseDestHandler.getReadyConsumerPointLock())
      {
        // See if a keyGroup (specific to a CD) for the supplied orderingGroup is
        // currently attached to this CD
        if((keyGroup = keyGroups.get(orderingGroup)) == null)
        {
          // If not, create one
          // We pass the consumerSet as parameter. This will only be non-null
          // where XD has registered for message classification
          JSConsumerSet consumerSet = null;
          if(consumerKey instanceof ConsumableKey)
          {
            consumerSet = ((ConsumableKey)consumerKey).getConsumerSet();
            keyGroup = createConsumerKeyGroup(consumerSet);
            if (keyGroup!=null)
              keyGroups.put(orderingGroup, keyGroup);
          }
        }
      }

      //Add this key to the keyGroup
      if (keyGroup!=null)
        ((ConsumableKey) consumerKey).joinKeyGroup(keyGroup);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "joinKeyGroup", keyGroup);

    return keyGroup;
  }
544863
@NotNull
    @ObjectiveCName("addTrustedKey:")
    public ConfigurationBuilder addTrustedKey(String trustedKey) {
        trustedKeys.add(new TrustedKey(trustedKey));
        return this;
    }
614761
public void attachMessage(ConsumableKey consumerKey)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "attachMessage", msgAttachedMember);
      SibTr.exit(tc, "attachMessage", consumerKey);
    }
    if(msgAttachedMember == null)
      msgAttachedMember = consumerKey;
    else
    {
      // We already have a message attached
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "attachMessage", "SIErrorException");
        throw new SIErrorException(
          nls.getFormattedMessage(
            "INTERNAL_MESSAGING_ERROR_CWSIP0001",
            new Object[] {
              "com.ibm.ws.sib.processor.impl.LocalQPConsumerKeyGroup",
              "1:1027:1.6.1.14" },
            null));
    }
  }
50341
function KeyPair(privkey) {
  if (!(this instanceof KeyPair)) {
    return new KeyPair(privkey);
  }

  if (privkey) {
    this._keypair = ecdsa.keyFromPrivate(privkey);
  } else {
    this._keypair = ecdsa.genKeyPair();
  }
}
161075
def keypair_add(name, pubfile=None, pubkey=None, profile=None, **kwargs):
    '''
    
    '''
    conn = _auth(profile, **kwargs)
    return conn.keypair_add(
        name,
        pubfile,
        pubkey
    )
40243
void addConsumer(ConsumerSessionImpl consumer) {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "addConsumer", consumer);

        _consumerList.add(consumer);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "addConsumer");
    }
120002
private KeyManager[] createKeyManagers() throws ClientSslSocketFactoryException {

        final KeyManagerFactory factory;

        try {
            factory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
            factory.init(this.keyStore, this.keyStorePassword.toCharArray());
        } catch (NoSuchAlgorithmException e) {
            throw new ClientSslSocketFactoryException(
                    String.format("Failed to create the key store because the algorithm %s is not supported. ",
                            KeyManagerFactory.getDefaultAlgorithm()), e);
        } catch (UnrecoverableKeyException e) {
        	throw new ClientSslSocketFactoryException("Unrecoverable Key Exception initializing key manager factory; this is probably fatal", e);
		} catch (KeyStoreException e) {
			throw new ClientSslSocketFactoryException("KeyStore exception initializing key manager factory; this is probably fatal", e);
		}

        KeyManager[] managers = factory.getKeyManagers();

        LOGGER.debug("Key managers are initialized. Total {} managers. ", managers.length);
        
        return managers;
    }
472166
@SuppressWarnings( "unchecked" )
    public synchronized void addConsumer( MessageConsumer<? extends Serializable> consumer ) {
        consumers.add((MessageConsumer<Serializable>)consumer);
    }
1238989
public static <K> Consumer<K> from(K group, K name) {

        LettuceAssert.notNull(group, "Group must not be null");
        LettuceAssert.notNull(name, "Name must not be null");

        return new Consumer<>(group, name);
    }
316967
public static void put(String key, ToolCreator toolCreator) {
		if (null != key && null != toolCreator) {
			REGISTRY.put(key, toolCreator);
		}
	}
476540
public static Properties buildKafkaConsumerProps(String bootstrapServers,
            String consumerGroupId, boolean consumeFromBeginning, boolean autoCommitOffsets) {
        return buildKafkaConsumerProps(bootstrapServers, consumerGroupId, consumeFromBeginning,
                autoCommitOffsets, null);
    }
621976
def add_user(self, user, group):
        
        if self.is_user_in(user, group):
            raise UserAlreadyInAGroup
        self.new_groups.add(group, user)
599243
def AddSubkey(self, registry_key):
    
    name = registry_key.name.upper()
    if name in self._subkeys:
      raise KeyError(
          'Subkey: {0:s} already exists.'.format(registry_key.name))

    self._subkeys[name] = registry_key

    key_path = self._JoinKeyPath([self._key_path, registry_key.name])
    registry_key._key_path = key_path
585003
public void setKeyAndKeyGroup(@Nonnull K key, @Nonnegative int keyGroupId) {
		try {
			serializeKeyGroupAndKey(key, keyGroupId);
		} catch (IOException shouldNeverHappen) {
			throw new FlinkRuntimeException(shouldNeverHappen);
		}
	}
673716
public Key register(Watchable watchable, Iterable<? extends WatchEvent.Kind<?>> eventTypes)
      throws IOException {
    checkOpen();
    return new Key(this, watchable, eventTypes);
  }
349207
public function addConsumerRequestToken ( $consumer_key, $options = array() )
	{
		$token  = $this->generateKey(true);
		$secret = $this->generateKey();
		 

		if (isset($options['token_ttl']) && is_numeric($options['token_ttl']))
		{
			$ttl = intval($options['token_ttl']);
		}
		else
		{
			$ttl = $this->max_request_token_ttl;
		}

		if (!isset($options['oauth_callback'])) {
	 		// 1.0a Compatibility : store callback url associated with request token
			$options['oauth_callback']='oob';
 		}
		$options_oauth_callback =$options['oauth_callback'];
		$sql = "BEGIN SP_ADD_CONSUMER_REQUEST_TOKEN(:P_TOKEN_TTL, :P_CONSUMER_KEY, :P_TOKEN, :P_TOKEN_SECRET, :P_CALLBACK_URL, :P_RESULT); END;";

			// parse sql
		$stmt = oci_parse($this->conn, $sql) or die ('Can not parse query');
 
		// Bind In and Out Variables
		oci_bind_by_name($stmt, ':P_TOKEN_TTL', $ttl, 20);
		oci_bind_by_name($stmt, ':P_CONSUMER_KEY', $consumer_key, 255);
		oci_bind_by_name($stmt, ':P_TOKEN', $token, 255);
		oci_bind_by_name($stmt, ':P_TOKEN_SECRET', $secret, 255);
		oci_bind_by_name($stmt, ':P_CALLBACK_URL', $options_oauth_callback, 255);
		oci_bind_by_name($stmt, ':P_RESULT', $result, 20);

		//Execute the statement
		oci_execute($stmt);
		

		$returnArray= array('token'=>$token, 'token_secret'=>$secret, 'token_ttl'=>$ttl);
		return $returnArray;
	}
990752
public function addToGroup($notificationKeyName, $notificationKey, array $registrationIds)
    {
        $request = new GroupRequest(self::ADD, $notificationKeyName, $notificationKey, $registrationIds);
        $response = $this->client->request('post', $this->url, $request->build());

        return $this->getNotificationToken($response);
    }