org.jclouds.joyent.cloudapi.v6_5.compute.functions
Class MachineInDatacenterToNodeMetadata
java.lang.Object
org.jclouds.joyent.cloudapi.v6_5.compute.functions.MachineInDatacenterToNodeMetadata
- All Implemented Interfaces:
- com.google.common.base.Function<MachineInDatacenter,NodeMetadata>
public class MachineInDatacenterToNodeMetadata
- extends Object
- implements com.google.common.base.Function<MachineInDatacenter,NodeMetadata>
A function for transforming a cloudApi-specific Machine into a generic
NodeMetadata object.
- Author:
- Adrian Cole
| 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 |
logger
@Named(value="jclouds.compute")
protected Logger logger
toPortableNodeStatus
protected Map<Machine.State,NodeMetadata.Status> toPortableNodeStatus
locationIndex
protected final com.google.common.base.Supplier<Map<String,Location>> locationIndex
images
protected final com.google.common.base.Supplier<Set<? extends Image>> images
hardwares
protected final com.google.common.base.Supplier<Set<? extends Hardware>> hardwares
nodeNamingConvention
protected final GroupNamingConvention nodeNamingConvention
MachineInDatacenterToNodeMetadata
@Inject
public MachineInDatacenterToNodeMetadata(Map<Machine.State,NodeMetadata.Status> toPortableNodeStatus,
com.google.common.base.Supplier<Map<String,Location>> locationIndex,
com.google.common.base.Supplier<Set<? extends Image>> images,
com.google.common.base.Supplier<Set<? extends Hardware>> hardwares,
GroupNamingConvention.Factory namingConvention)
apply
public NodeMetadata apply(MachineInDatacenter machineInDatacenter)
- Specified by:
apply in interface com.google.common.base.Function<MachineInDatacenter,NodeMetadata>
findHardwareForMachineOrNull
protected Hardware findHardwareForMachineOrNull(MachineInDatacenter machineInDatacenter)
findOperatingSystemForMachineOrNull
protected OperatingSystem findOperatingSystemForMachineOrNull(MachineInDatacenter machineInDatacenter)
findObjectOfTypeForMachineOrNull
public <T extends ComputeMetadata> T findObjectOfTypeForMachineOrNull(Set<? extends T> supply,
String type,
String objectId,
DatacenterAndId machineInDatacenter)
Copyright © 2009-2012 jclouds. All Rights Reserved.