Rio Project 4.2 API Documentation



org.rioproject.cybernode
Class StagedDataManager

java.lang.Object
  extended by org.rioproject.cybernode.StagedDataManager

public class StagedDataManager
extends Object

A utility to assist in downloading and installing data for a service.

Author:
Dennis Reedy

Constructor Summary
StagedDataManager(ComputeResource computeResource)
          Create a StagedDataManager
 
Method Summary
 Map<StagedData,DownloadRecord[]> download()
          Download any artifacts the service requires
 Map<StagedData,DownloadRecord[]> getDownloadedArtifacts()
          Get the map of StagedData keys and DownloadRecord values for each downloaded item.
 DownloadRecord[] getDownloadRecords()
          Get all DownloadRecords
 Collection<PlatformCapability> getInstalledPlatformCapabilities()
          Get any PlatformCapability instances that were installed
 PlatformCapability[] removeInstalledPlatformCapabilities()
          Remove any installed PlatformCapability components
 PlatformCapability[] removeInstalledPlatformCapabilities(boolean force)
          Remove installed PlatformCapability components
 void removeStagedData()
          Remove any installed StagedData
 void setServiceElement(ServiceElement sElem)
           
 Collection<SystemRequirements.SystemComponent> verifyPlatformCapabilities()
          Verify that required platform capabilities are present
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StagedDataManager

public StagedDataManager(ComputeResource computeResource)
Create a StagedDataManager

Parameters:
computeResource - The compute resource
Method Detail

setServiceElement

public void setServiceElement(ServiceElement sElem)
Parameters:
sElem - The service element information

removeInstalledPlatformCapabilities

public PlatformCapability[] removeInstalledPlatformCapabilities()
Remove any installed PlatformCapability components

Returns:
An array of PlatformCapability instances that were removed. If none were removed, return a zero-length array

removeInstalledPlatformCapabilities

public PlatformCapability[] removeInstalledPlatformCapabilities(boolean force)
Remove installed PlatformCapability components

Parameters:
force - Whether to remove the PlatformCapability, regardless of whether the remove on destroy attribute of the StatedData element is true
Returns:
An array of PlatformCapability instances that were removed. If none were removed, return a zero-length array

removeStagedData

public void removeStagedData()
Remove any installed StagedData


getInstalledPlatformCapabilities

public Collection<PlatformCapability> getInstalledPlatformCapabilities()
Get any PlatformCapability instances that were installed

Returns:
A collection of PlatformCapability instances that were installed. If there were none installed, return a zero-length collection

getDownloadRecords

public DownloadRecord[] getDownloadRecords()
Get all DownloadRecords

Returns:
An array of DownloadRecord instances that represent the download of a StagedData instance. If nothing was downloaded return a zero-length array

getDownloadedArtifacts

public Map<StagedData,DownloadRecord[]> getDownloadedArtifacts()
Get the map of StagedData keys and DownloadRecord values for each downloaded item.

Returns:
A map of StagedData keys and DownloadRecord values for each downloaded item. If nothing was downloaded, return an empty map

download

public Map<StagedData,DownloadRecord[]> download()
                                          throws Exception
Download any artifacts the service requires

Returns:
A map of StagedData keys and DownloadRecord values for each downloaded item. If nothing was downloaded, return an empty map
Throws:
Exception - If errors occur downloading or creating PlatformCapability instances

verifyPlatformCapabilities

public Collection<SystemRequirements.SystemComponent> verifyPlatformCapabilities()
Verify that required platform capabilities are present

Returns:
A collection of SystemRequirements.SystemComponent components that are not found. If there are no missing components, return an empty collection

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.