|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclouds.nodepool.internal.JsonNodeMetadataStore
public class JsonNodeMetadataStore
An implementation of NodeMetadataStore that stores all that is needed by building a json
string.
| Constructor Summary | |
|---|---|
JsonNodeMetadataStore(com.google.common.base.Supplier<Map<String,InputStream>> storage,
Json json)
|
|
| Method Summary | |
|---|---|
void |
deleteAllMappings()
Clears all mappings. |
void |
deleteMapping(String backendNodeId)
Removes the mapping from storage. |
NodeMetadata |
load(NodeMetadata backendNodeMetadata)
Loads the previously stored user NodeMetadata corresponding to the provided backend
NodeMetadata. |
Set<NodeMetadata> |
loadAll(Set<NodeMetadata> backendNodes)
Loads frontend NodeMetadata for all provided backend nodes. |
NodeMetadata |
store(NodeMetadata backendNodeMetadata,
TemplateOptions userOptions,
String userGroup)
Associates the provided user options and group with the provided backend NodeMetadata,
then build a frontend version of node metadata that has some fields from the backend node such
as id, name or location, and some fields from the provided userOptions, such as userMetadata
or tags. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject
public JsonNodeMetadataStore(@Named(value="METADATA")
com.google.common.base.Supplier<Map<String,InputStream>> storage,
Json json)
| Method Detail |
|---|
public NodeMetadata store(NodeMetadata backendNodeMetadata,
TemplateOptions userOptions,
String userGroup)
NodeMetadataStoreNodeMetadata,
then build a frontend version of node metadata that has some fields from the backend node such
as id, name or location, and some fields from the provided userOptions, such as userMetadata
or tags.
store in interface NodeMetadataStorebackendNodeMetadata - the backend node's NodeMetadatauserOptions - the user provided optionsuserGroup - the user selected group
public NodeMetadata load(NodeMetadata backendNodeMetadata)
NodeMetadataStoreNodeMetadata corresponding to the provided backend
NodeMetadata.
load in interface NodeMetadataStoreNodeMetadata or null of this backend node has no mappingpublic Set<NodeMetadata> loadAll(Set<NodeMetadata> backendNodes)
NodeMetadataStoreNodeMetadata for all provided backend nodes.
loadAll in interface NodeMetadataStorepublic void deleteAllMappings()
NodeMetadataStore
deleteAllMappings in interface NodeMetadataStorepublic void deleteMapping(String backendNodeId)
NodeMetadataStore
deleteMapping in interface NodeMetadataStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||