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

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

public class LocalSandbox
extends java.lang.Object
implements Sandbox

The simplest implementation of the sandbox used to copy or link files in the simplest way possible without complex packing/compression schemes.

Author:
Levente Hajdu

Constructor Summary
LocalSandbox()
          Creates a new instance of LocalSandbox
 
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

LocalSandbox

public LocalSandbox()
Creates a new instance of LocalSandbox

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

PackageExists

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

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

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.