Brooklyn

brooklyn.location.cloud
[Java] Class CloudMachineNamer

java.lang.Object
  brooklyn.location.cloud.CloudMachineNamer

public class CloudMachineNamer

Field Summary
protected ConfigBag setup

 
Constructor Summary
CloudMachineNamer(ConfigBag setup)

 
Method Summary
java.lang.String generateNewGroupId()

protected java.lang.String generateNewIdReservingLength(int lengthToReserve)

java.lang.String generateNewMachineUniqueName()

java.lang.Integer getCustomMaxNameLength()

int getMaxNameLength()

returns the max length of a VM name for the cloud specified in setup; this value is typically decremented by 9 to make room for jclouds labels; delegates to getCustomMaxNameLength() when CloudLocationConfig#VM_NAME_MAX_LENGTH#VM_NAME_MAX_LENGTH is not set

CloudMachineNamer lengthMaxPermittedForMachineName(int defaultMaxLength)

CloudMachineNamer lengthReservedForNameInGroup(int identifierRequiredLength)

method for overriding to provide custom logic when an explicit config key is not set

static java.lang.String sanitize(java.lang.String s)

protected java.lang.String shortName(java.lang.Object x)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

setup

protected final ConfigBag setup


 
Constructor Detail

CloudMachineNamer

public CloudMachineNamer(ConfigBag setup)


 
Method Detail

generateNewGroupId

public java.lang.String generateNewGroupId()


generateNewIdReservingLength

protected java.lang.String generateNewIdReservingLength(int lengthToReserve)


generateNewMachineUniqueName

public java.lang.String generateNewMachineUniqueName()


getCustomMaxNameLength

public java.lang.Integer getCustomMaxNameLength()


getMaxNameLength

public int getMaxNameLength()
returns the max length of a VM name for the cloud specified in setup; this value is typically decremented by 9 to make room for jclouds labels; delegates to getCustomMaxNameLength() when CloudLocationConfig#VM_NAME_MAX_LENGTH#VM_NAME_MAX_LENGTH is not set


lengthMaxPermittedForMachineName

public CloudMachineNamer lengthMaxPermittedForMachineName(int defaultMaxLength)


lengthReservedForNameInGroup

public CloudMachineNamer lengthReservedForNameInGroup(int identifierRequiredLength)
method for overriding to provide custom logic when an explicit config key is not set


sanitize

public static java.lang.String sanitize(java.lang.String s)


shortName

protected java.lang.String shortName(java.lang.Object x)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.