Code example for LoadingCache

Methods: getUnchecked

0
         if (!from.getBootDeviceIds().isEmpty()) {
            String bootDeviceId = Iterables.get(from.getBootDeviceIds(), 0);
            Device bootDevice = from.getDevices().get(bootDeviceId);
            if (bootDevice != null) {
               try { 
                  DriveInfo drive = cache.getUnchecked(bootDevice.getDriveUuid());
                  imageId = drive.getName();
               } catch (NullPointerException e) {
                  logger.debug("drive %s not found", bootDevice.getDriveUuid());
               } catch (UncheckedExecutionException e) {
                  logger.warn(e, "error finding drive %s: %s", bootDevice.getDriveUuid(), e.getMessage());
               } 
            } 
         } 
         return imageId;
      } 
   } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE