Code example for Function

Methods: apply

0
   } 
 
   // base EC2 driver currently does not support key import 
   protected String createOrImportKeyPair(String region, String group, TemplateOptions options) { 
      RegionAndName regionAndGroup = new RegionAndName(region, group); 
      KeyPair keyPair = makeKeyPair.apply(new RegionAndName(region, group)); 
      // make sure that we don't request multiple keys simultaneously 
      // if there is already a keypair for the group specified, use it 
      // otherwise create a new keypair and key it under the group and also the regular keyname 
      KeyPair origValue = credentialsMap.putIfAbsent(regionAndGroup, keyPair); 
      if (origValue != null) { 
         return origValue.getKeyName(); 
      } 
 
      credentialsMap.put(new RegionAndName(region, keyPair.getKeyName()), keyPair); 
      return keyPair.getKeyName(); 
   } 
 
   @VisibleForTesting 
   public Set<String> getSecurityGroupsForTagAndOptions(String region, @Nullable String group, TemplateOptions options) { 
Contextual code suggestions in your IDE  Get Codota for Java