public class JsonNodeMetadataStore extends Object implements NodeMetadataStore
NodeMetadataStore
that stores all that is needed by building a json
string.Constructor and Description |
---|
JsonNodeMetadataStore(com.google.common.base.Supplier<Map<String,InputStream>> storage,
Json json) |
Modifier and Type | Method and Description |
---|---|
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. |
@Inject public JsonNodeMetadataStore(@Named(value="METADATA") com.google.common.base.Supplier<Map<String,InputStream>> storage, Json json)
public NodeMetadata store(NodeMetadata backendNodeMetadata, TemplateOptions userOptions, String userGroup)
NodeMetadataStore
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.store
in interface NodeMetadataStore
backendNodeMetadata
- the backend node's NodeMetadata
userOptions
- the user provided optionsuserGroup
- the user selected grouppublic NodeMetadata load(NodeMetadata backendNodeMetadata)
NodeMetadataStore
NodeMetadata
corresponding to the provided backend
NodeMetadata
.load
in interface NodeMetadataStore
NodeMetadata
or null of this backend node has no mappingpublic Set<NodeMetadata> loadAll(Set<NodeMetadata> backendNodes)
NodeMetadataStore
NodeMetadata
for all provided backend nodes.loadAll
in interface NodeMetadataStore
public void deleteAllMappings()
NodeMetadataStore
deleteAllMappings
in interface NodeMetadataStore
public void deleteMapping(String backendNodeId)
NodeMetadataStore
deleteMapping
in interface NodeMetadataStore
Copyright © 2009-2013 jclouds. All Rights Reserved.