@Beta
public interface GroupNamingConvention
ComputeService#createNodesInGroup
Typically, a security group or network is something shared across all members
of a group, so the name should be concise, yet unique.
# can sometimes break apis.
As such, you may end preferring always using a hyphen.
- followed by the group name. The jclouds prefix
signifies this resource is safe to delete, and the hash clearly delineates
the encoding from what's in the group name.
mycluster, the naming convention for
shared resources would produce jclouds-mycluster
mycluster, the naming convention for
unique resources could produce jclouds-mycluster-f3e the first time,
and jclouds-mycluster-e64 the next.
IllegalStateException is
thrown when attempting to create a named resource which already exists.
However, if you attempt to create a resource with a name generated by
GroupNamingConvention, and receive an IllegalStateException,
it may have been for another reason besides name conflict.| Modifier and Type | Interface and Description |
|---|---|
static interface |
GroupNamingConvention.Factory |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Predicate<String> |
containsAnyGroup()
A predicate that identifies if an input has any group encoded in it.
|
com.google.common.base.Predicate<String> |
containsGroup(String group)
A predicate that identifies if an input has the given group encoded in it.
|
String |
extractGroup(String encoded)
Extracts the group from a shared/unique name.
|
String |
groupInSharedNameOrNull(String encoded)
retrieve the group associated with the encoded name
|
String |
groupInUniqueNameOrNull(String encoded)
retrieve the group associated with the encoded name
|
String |
sharedNameForGroup(String group)
encodes the {code group parameter} into a name that exists only once in
the group.
|
String |
uniqueNameForGroup(String group)
encodes the {code group parameter} into a name that exists more than once
in the group.
|
String sharedNameForGroup(String group)
String uniqueNameForGroup(String group)
@Nullable String groupInUniqueNameOrNull(String encoded)
@Nullable String groupInSharedNameOrNull(String encoded)
com.google.common.base.Predicate<String> containsGroup(String group)
com.google.common.base.Predicate<String> containsAnyGroup()
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.