Code example for Function

Methods: apply

0
      String[] parts = AWSUtils.parseHandle(id);
      String region = parts[0];
      String instanceId = parts[1];
      try { 
         RunningInstance runningInstance = getRunningInstanceInRegion(region, instanceId);
         return runningInstanceToNodeMetadata.apply(runningInstance);
      } catch (NoSuchElementException e) {
         return null; 
      } 
   } 
 
   public RunningInstance getRunningInstanceInRegion(String region, String id) {
      return getOnlyElement(Iterables.concat(client.getInstanceApi().get().describeInstancesInRegion(region, id)));
   } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java