@Inject protected EC2TemplateBuilderImpl(@Memoized Supplier<Set<? extends Location>> locations, @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> sizes, Supplier<Location> defaultLocation, Provider<TemplateOptions> optionsProvider, @Named("DEFAULT") Provider<TemplateBuilder> defaultTemplateProvider, Map<RegionAndName, Image> imageMap) { super(locations, images, sizes, defaultLocation, optionsProvider, defaultTemplateProvider); this.imageMap = imageMap; }
@Provides @Singleton @Memoized public Supplier<User> getCurrentUser(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, final GetCurrentUser getCurrentUser) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, getCurrentUser, seconds, TimeUnit.SECONDS); }
@Provides @Singleton @Memoized public Supplier<Map<String, Network>> listNetworks(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, final NetworksForCurrentUser networksForCurrentUser) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, networksForCurrentUser, seconds, TimeUnit.SECONDS); }
@Inject public TemplateToOperatingSystem(@Memoized Supplier<Map<String, OSType>> osTypes, @Memoized Supplier<Map<String, String>> osCategories, Map<OsFamily, Map<String, String>> osVersionMap) { this.osTypes = checkNotNull(osTypes, "osTypes"); this.osCategories = checkNotNull(osCategories, "osCategories"); this.osVersionMap = checkNotNull(osVersionMap, "osVersionMap"); }
@Inject protected VCloudTemplateBuilderImpl(@Memoized Supplier<Set<? extends Location>> locations, @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> sizes, Supplier<Location> defaultLocation, Provider<TemplateOptions> optionsProvider, @Named("DEFAULT") Provider<TemplateBuilder> defaultTemplateProvider) { super(locations, images, sizes, defaultLocation, optionsProvider, defaultTemplateProvider); }
@Provides @Singleton // TODO: we should eventually get rid of memoized as an annotation, as it is confusing @Memoized protected Supplier<Set<? extends Location>> memoizedLocationsSupplier( AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, LocationsSupplier uncached) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, uncached, seconds, TimeUnit.SECONDS); }
@Inject protected TemplateBuilderImpl(@Memoized Supplier<Set<? extends Location>> locations, @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> hardwares, Supplier<Location> defaultLocation2, @Named("DEFAULT") Provider<TemplateOptions> optionsProvider, @Named("DEFAULT") Provider<TemplateBuilder> defaultTemplateProvider) { this.locations = locations; this.images = images; this.hardwares = hardwares; this.defaultLocation = defaultLocation2; this.optionsProvider = optionsProvider; this.defaultTemplateProvider = defaultTemplateProvider; }
@Provides @Singleton @Memoized protected Supplier<Set<? extends Hardware>> supplySizeCache(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, final Supplier<Set<? extends Hardware>> hardwareSupplier) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, hardwareSupplier, seconds, TimeUnit.SECONDS); }
@Inject public CloudSigmaTemplateBuilderImpl(@Memoized Supplier<Set<? extends Location>> locations, @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> hardwares, Supplier<Location> defaultLocation2, @Named("DEFAULT") Provider<TemplateOptions> optionsProvider, @Named("DEFAULT") Provider<TemplateBuilder> defaultTemplateProvider) { super(locations, images, hardwares, defaultLocation2, optionsProvider, defaultTemplateProvider); } }
@Provides @Singleton @Memoized protected final Supplier<Set<? extends Hardware>> supplySizeCache(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, final Supplier<Set<? extends Hardware>> hardwareSupplier) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, hardwareSupplier, seconds, TimeUnit.SECONDS); }
@Inject public TemplateToImage(@Memoized Supplier<Set<? extends Location>> locations, Function<Template, OperatingSystem> templateToOperatingSystem) { this.locations = checkNotNull(locations, "locations"); this.templateToOperatingSystem = checkNotNull(templateToOperatingSystem, "templateToOperatingSystem"); }
@Inject protected VCloudTemplateBuilderImpl(@Memoized Supplier<Set<? extends Location>> locations, @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> sizes, Supplier<Location> defaultLocation, @Named("DEFAULT") Provider<TemplateOptions> optionsProvider, @Named("DEFAULT") Provider<TemplateBuilder> defaultTemplateProvider) { super(locations, images, sizes, defaultLocation, optionsProvider, defaultTemplateProvider); } }
@Provides @Singleton // TODO: we should eventually get rid of memoized as an annotation, as it is confusing @Memoized protected Supplier<Set<? extends Location>> memoizedLocationsSupplier( AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, LocationsSupplier uncached) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, uncached, seconds, TimeUnit.SECONDS); }
@Inject protected EC2TemplateBuilderImpl(@Memoized Supplier<Set<? extends Location>> locations, @Memoized Supplier<Set<? extends Image>> images, @Memoized Supplier<Set<? extends Hardware>> sizes, Supplier<Location> defaultLocation, @Named("DEFAULT") Provider<TemplateOptions> optionsProvider, @Named("DEFAULT") Provider<TemplateBuilder> defaultTemplateProvider, Supplier<LoadingCache<RegionAndName, ? extends Image>> imageMap) { super(locations, images, sizes, defaultLocation, optionsProvider, defaultTemplateProvider); this.lazyImageCache = imageMap; }
@Provides @Singleton @Memoized protected Supplier<Set<? extends Hardware>> supplySizeCache(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds, final Supplier<Set<? extends Hardware>> hardwareSupplier) { return MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier.create(authException, hardwareSupplier, seconds, TimeUnit.SECONDS); }