org.jclouds.ec2.compute.loaders
Class CreateSecurityGroupIfNeeded

java.lang.Object
  extended by com.google.common.cache.CacheLoader<RegionAndName,String>
      extended by org.jclouds.ec2.compute.loaders.CreateSecurityGroupIfNeeded

@Singleton
public class CreateSecurityGroupIfNeeded
extends com.google.common.cache.CacheLoader<RegionAndName,String>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.common.cache.CacheLoader
com.google.common.cache.CacheLoader.InvalidCacheLoadException
 
Field Summary
protected  org.jclouds.logging.Logger logger
           
protected  SecurityGroupApi securityClient
           
protected  com.google.common.base.Predicate<RegionAndName> securityGroupEventualConsistencyDelay
           
 
Constructor Summary
CreateSecurityGroupIfNeeded(EC2Api ec2Api, com.google.common.base.Predicate<RegionAndName> securityGroupEventualConsistencyDelay)
           
CreateSecurityGroupIfNeeded(SecurityGroupApi securityClient, com.google.common.base.Predicate<RegionAndName> securityGroupEventualConsistencyDelay)
           
 
Method Summary
protected  void authorizeGroupToItself(String region, String name)
           
protected  void createIngressRuleForTCPPort(String region, String name, int port)
           
 String load(RegionAndName from)
           
 
Methods inherited from class com.google.common.cache.CacheLoader
asyncReloading, from, from, loadAll, reload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.compute")
protected org.jclouds.logging.Logger logger

securityClient

protected final SecurityGroupApi securityClient

securityGroupEventualConsistencyDelay

protected final com.google.common.base.Predicate<RegionAndName> securityGroupEventualConsistencyDelay
Constructor Detail

CreateSecurityGroupIfNeeded

@Inject
public CreateSecurityGroupIfNeeded(EC2Api ec2Api,
                                          @Named(value="SECURITY")
                                          com.google.common.base.Predicate<RegionAndName> securityGroupEventualConsistencyDelay)

CreateSecurityGroupIfNeeded

public CreateSecurityGroupIfNeeded(SecurityGroupApi securityClient,
                                   @Named(value="SECURITY")
                                   com.google.common.base.Predicate<RegionAndName> securityGroupEventualConsistencyDelay)
Method Detail

load

public String load(RegionAndName from)
Specified by:
load in class com.google.common.cache.CacheLoader<RegionAndName,String>

createIngressRuleForTCPPort

protected void createIngressRuleForTCPPort(String region,
                                           String name,
                                           int port)

authorizeGroupToItself

protected void authorizeGroupToItself(String region,
                                      String name)


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.