org.jclouds.ec2.compute.functions
Class RunningInstanceToNodeMetadata

java.lang.Object
  extended by org.jclouds.ec2.compute.functions.RunningInstanceToNodeMetadata
All Implemented Interfaces:
com.google.common.base.Function<RunningInstance,NodeMetadata>
Direct Known Subclasses:
AWSRunningInstanceToNodeMetadata

@Singleton
public class RunningInstanceToNodeMetadata
extends Object
implements com.google.common.base.Function<RunningInstance,NodeMetadata>

Author:
Adrian Cole

Field Summary
protected  Map<String,Credentials> credentialStore
           
protected  com.google.common.base.Supplier<Set<? extends Hardware>> hardware
           
protected  com.google.common.base.Supplier<com.google.common.cache.Cache<RegionAndName,? extends Image>> imageMap
           
protected  Map<InstanceState,NodeState> instanceToNodeState
           
protected  com.google.common.base.Supplier<Set<? extends Location>> locations
           
protected  Logger logger
           
 
Constructor Summary
protected RunningInstanceToNodeMetadata(Map<InstanceState,NodeState> instanceToNodeState, Map<String,Credentials> credentialStore, com.google.common.base.Supplier<com.google.common.cache.Cache<RegionAndName,? extends Image>> imageMap, com.google.common.base.Supplier<Set<? extends Location>> locations, com.google.common.base.Supplier<Set<? extends Hardware>> hardware)
           
 
Method Summary
protected  void addCredentialsForInstance(NodeMetadataBuilder builder, RunningInstance instance)
           
 NodeMetadata apply(RunningInstance instance)
           
protected  NodeMetadataBuilder buildInstance(RunningInstance instance, NodeMetadataBuilder builder)
           
protected  Hardware parseHardware(RunningInstance instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Field Detail

logger

protected Logger logger

locations

protected final com.google.common.base.Supplier<Set<? extends Location>> locations

hardware

protected final com.google.common.base.Supplier<Set<? extends Hardware>> hardware

imageMap

protected final com.google.common.base.Supplier<com.google.common.cache.Cache<RegionAndName,? extends Image>> imageMap

credentialStore

protected final Map<String,Credentials> credentialStore

instanceToNodeState

protected final Map<InstanceState,NodeState> instanceToNodeState
Constructor Detail

RunningInstanceToNodeMetadata

@Inject
protected RunningInstanceToNodeMetadata(Map<InstanceState,NodeState> instanceToNodeState,
                                               Map<String,Credentials> credentialStore,
                                               com.google.common.base.Supplier<com.google.common.cache.Cache<RegionAndName,? extends Image>> imageMap,
                                               com.google.common.base.Supplier<Set<? extends Location>> locations,
                                               com.google.common.base.Supplier<Set<? extends Hardware>> hardware)
Method Detail

apply

public NodeMetadata apply(RunningInstance instance)
Specified by:
apply in interface com.google.common.base.Function<RunningInstance,NodeMetadata>

buildInstance

protected NodeMetadataBuilder buildInstance(RunningInstance instance,
                                            NodeMetadataBuilder builder)

addCredentialsForInstance

protected void addCredentialsForInstance(NodeMetadataBuilder builder,
                                         RunningInstance instance)

parseHardware

protected Hardware parseHardware(RunningInstance instance)


Copyright © 2009-2011 jclouds. All Rights Reserved.