org.jclouds.nodepool.internal
Interface NodeMetadataStore

All Known Implementing Classes:
JsonNodeMetadataStore, NodeMetadataStoreCache

public interface NodeMetadataStore

Stores/Loads frontend NodeMetadata mappings.

Author:
David Alves

Method Summary
 void deleteAllMappings()
          Clears all mappings.
 void deleteMapping(String backendNodeId)
          Removes the mapping from storage.
 NodeMetadata load(NodeMetadata backendNode)
          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 backendNode, 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.
 

Method Detail

store

NodeMetadata store(NodeMetadata backendNode,
                   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.

Parameters:
backendNode - the backend node's NodeMetadata
userOptions - the user provided options
userGroup - the user selected group
Returns:
a version of NodeMetadata that includes information from the backend node and form the user provided options and group.

deleteMapping

void deleteMapping(String backendNodeId)
Removes the mapping from storage.

Parameters:
backendNodeId -

deleteAllMappings

void deleteAllMappings()
Clears all mappings.


load

NodeMetadata load(NodeMetadata backendNode)
Loads the previously stored user NodeMetadata corresponding to the provided backend NodeMetadata.

Parameters:
backendNode -
Returns:
the frontend NodeMetadata or null of this backend node has no mapping

loadAll

Set<NodeMetadata> loadAll(Set<NodeMetadata> backendNodes)
Loads frontend NodeMetadata for all provided backend nodes.

Parameters:
backendNodes -
Returns:


Copyright © 2009-2012 jclouds. All Rights Reserved.