Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed to jclouds, Inc. (jclouds) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. jclouds licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.jclouds.cloudsigma.compute.config;
 
 
 
 

Author(s):
Adrian Cole
 
       extends
 
       super(CloudSigmaClient.classCloudSigmaAsyncClient.class);
    }
 
    @Override
    protected TemplateBuilder provideTemplate(Injector injectorTemplateBuilder template) {
       return template.osFamily(.).imageNameMatches(".*automated SSH Access.*");
    }
 
    @SuppressWarnings({ "unchecked""rawtypes" })
    @Override
    protected void configure() {
       super.configure();
       }).to(CloudSigmaComputeServiceAdapter.class);
       bind(new TypeLiteral<Function<ServerInfoNodeMetadata>>() {
       }).to(ServerInfoToNodeMetadata.class);
       bind(new TypeLiteral<Function<HardwareHardware>>() {
       }).to((ClassIdentityFunction.class);
       bind(new TypeLiteral<Function<DriveInfoImage>>() {
       }).to(PreinstalledDiskToImage.class);
       bind(new TypeLiteral<Function<LocationLocation>>() {
       }).to((ClassIdentityFunction.class);
       bind(new TypeLiteral<Function<DeviceVolume>>() {
       }).to(DeviceToVolume.class);
       bind(new TypeLiteral<Function<ServerString>>() {
      }).to(GetImageIdFromServer.class);
      bind(new TypeLiteral<Function<StringImage>>() {
      }).to(FindImageForId.class);
      bind(new TypeLiteral<Supplier<Location>>() {
      }).to(OnlyLocationOrFirstZone.class);
   }
   protected Cache<StringDriveInfocache(GetDrive getDrive) {
      return CacheBuilder.newBuilder().build(getDrive);
   }
   public static class GetDrive extends CacheLoader<StringDriveInfo> {
      private final CloudSigmaClient client;
      @Inject
      public GetDrive(CloudSigmaClient client) {
         this. = client;
      }
      @Override
      public DriveInfo load(String input) {
         return .getDriveInfo(input);
      }
   }
   protected Predicate<DriveInfosupplyDriveUnclaimed(DriveClaimed driveClaimed,
         ComputeServiceConstants.Timeouts timeouts) {
      return new RetryablePredicate<DriveInfo>(Predicates.not(driveClaimed), timeouts.nodeRunning, 1000,
            .);
   }
New to GrepCode? Check out our FAQ X