gov.bnl.star.offline.scheduler.util.sandbox
Class PackmanSandbox

java.lang.Object
  extended by gov.bnl.star.offline.scheduler.util.sandbox.PackmanSandbox
All Implemented Interfaces:
Sandbox

public class PackmanSandbox
extends java.lang.Object
implements Sandbox

A variation of the sandbox using prepackage packman packages. It should be noted that this variant of the sandbox does not build packman packages. The benefit of the packman sandbox is that when packman installs a package it can select between multiple OS versions of a package, selecting the correct one for the target host (if available).

Author:
Levente Hajdu

Constructor Summary
PackmanSandbox()
          Creates a new instance of PackmanSandbox
 
Method Summary
 void addPackage(SandboxPackage sandboxPackage)
          Used to add a package to the sand box
 void addSandboxedFiles(java.lang.String file)
           
 java.lang.String CopyCommand(SandboxPackage packageObj)
           
 java.util.List getPackages()
          Returns a List of sandboxPackage object that are part of the sandbox
 java.util.List getSandboxedFiles()
           
 java.lang.String InitializationCommands()
           
 java.lang.String installCommand(SandboxPackage packageObj, Job job)
          Write the command with which to setup the users sandbox.
 boolean MakePackage(SandboxPackage packageObj, Request request)
          Make the package if possible.
 boolean PackageExists(SandboxPackage packageObj)
           
 void Sandbox()
          Creates a new instance of Sandbox
 void setPackages(java.util.List packages)
          Sets the list of packages that make up the sand box, it is best to set one by one using addPackage(SandboxPackage sandboxPackage)
 void setSandboxedFiles(java.util.List SandboxedFiles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackmanSandbox

public PackmanSandbox()
Creates a new instance of PackmanSandbox

Method Detail

CopyCommand

public java.lang.String CopyCommand(SandboxPackage packageObj)
Specified by:
CopyCommand in interface Sandbox
Returns:
the cammand to copy the pakege

MakePackage

public boolean MakePackage(SandboxPackage packageObj,
                           Request request)
Description copied from interface: Sandbox
Make the package if possible.

Specified by:
MakePackage in interface Sandbox
Returns:
true if the package was made

Sandbox

public void Sandbox()
Description copied from interface: Sandbox
Creates a new instance of Sandbox

Specified by:
Sandbox in interface Sandbox

installCommand

public java.lang.String installCommand(SandboxPackage packageObj,
                                       Job job)
Write the command with which to setup the users sandbox.

Specified by:
installCommand in interface Sandbox
Parameters:
packageObj - The sandbox package for which the commmand is needed
job - The job of which the command is being written
Returns:
the sandbox setup command as a string

addPackage

public void addPackage(SandboxPackage sandboxPackage)
Description copied from interface: Sandbox
Used to add a package to the sand box

Specified by:
addPackage in interface Sandbox

getPackages

public java.util.List getPackages()
Description copied from interface: Sandbox
Returns a List of sandboxPackage object that are part of the sandbox

Specified by:
getPackages in interface Sandbox

setPackages

public void setPackages(java.util.List packages)
Description copied from interface: Sandbox
Sets the list of packages that make up the sand box, it is best to set one by one using addPackage(SandboxPackage sandboxPackage)

Specified by:
setPackages in interface Sandbox

PackageExists

public boolean PackageExists(SandboxPackage packageObj)
Specified by:
PackageExists in interface Sandbox
Returns:
true of the package exists

getSandboxedFiles

public java.util.List getSandboxedFiles()
Specified by:
getSandboxedFiles in interface Sandbox

setSandboxedFiles

public void setSandboxedFiles(java.util.List SandboxedFiles)
Specified by:
setSandboxedFiles in interface Sandbox

addSandboxedFiles

public void addSandboxedFiles(java.lang.String file)
Specified by:
addSandboxedFiles in interface Sandbox

InitializationCommands

public java.lang.String InitializationCommands()
Specified by:
InitializationCommands in interface Sandbox


Copyright © 2002-2004 STAR collaboration - Brookhaven National Laboratory. All Rights Reserved.