org.globus.exec.service.multi
Class ManagedMultiJobHome

java.lang.Object
  extended byorg.globus.wsrf.impl.ResourceHomeImpl
      extended byorg.globus.exec.service.multi.ManagedMultiJobHome
All Implemented Interfaces:
Initializable, ManagedJobHome, ResourceHome

public class ManagedMultiJobHome
extends ResourceHomeImpl
implements ManagedJobHome


Nested Class Summary
 
Nested classes inherited from class org.globus.wsrf.impl.ResourceHomeImpl
 
Field Summary
(package private) static org.globus.util.I18n i18n
           
private static org.apache.commons.logging.Log logger
           
private static NotificationConsumerManager NOTIFICATION_CONSUMER_MANAGER
           
private static PerformanceLog performanceLogger
           
private  boolean recovered
           
private static org.apache.axis.components.uuid.UUIDGen uuidGen
           
 
Fields inherited from class org.globus.wsrf.impl.ResourceHomeImpl
keyTypeClass, keyTypeName, lockManager, resourceClass, resources
 
Constructor Summary
ManagedMultiJobHome()
           
 
Method Summary
 ResourceKey create(java.util.Calendar initialTerminationTime, java.util.Calendar currentTime, java.lang.String localResourceManager, JobDescriptionType jobDescription, java.lang.String userSubject, java.lang.String localUserId, java.lang.String jobID, java.lang.String serviceURL)
          The actual key value is computed automatically by this function as a UUID.
private static ManagedMultiJobResourcePropertiesType createResourcePropertiesBean(java.util.Calendar initialTerminationTime, java.util.Calendar currentTime, MultiJobDescriptionType jobDescription, java.lang.String userSubject, java.lang.String localUserId)
           
private static ManagedMultiJobResourceStateType createResourceState(java.util.Calendar initialTerminationTime, java.util.Calendar currentTime, MultiJobDescriptionType jobDescription, java.lang.String userSubject, java.lang.String localUserId, java.lang.String handle)
          Creates entire initial state of the resource, including internal (non-published) data.
static ManagedMultiJobHome getHome()
           
static NotificationConsumerManager getNotificationConsumerManager()
           
 int getResourceCount()
          This function returns the number of resources created by the particular home instance.
 void initialize()
           
 boolean isResourcePersistent()
          This function is useful in order to determine if the resource should be stored.
 void recover()
          This method assures that any jobs which were being processed by the state machine can continue to do so after container recovery.
 void remove(ResourceKey key)
           
 
Methods inherited from class org.globus.wsrf.impl.ResourceHomeImpl
add, createNewInstance, createNewInstanceAndLoad, find, getCacheLocation, getKeyTypeClass, getKeyTypeName, getResourceClass, getSweeperDelay, setCacheLocation, setResourceClass, setResourceKeyName, setResourceKeyType, setSweeperDelay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.globus.wsrf.ResourceHome
find, getKeyTypeClass, getKeyTypeName
 

Field Detail

recovered

private boolean recovered

uuidGen

private static org.apache.axis.components.uuid.UUIDGen uuidGen

NOTIFICATION_CONSUMER_MANAGER

private static NotificationConsumerManager NOTIFICATION_CONSUMER_MANAGER

logger

private static final org.apache.commons.logging.Log logger

i18n

static org.globus.util.I18n i18n

performanceLogger

private static PerformanceLog performanceLogger
Constructor Detail

ManagedMultiJobHome

public ManagedMultiJobHome()
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface Initializable
Throws:
java.lang.Exception

recover

public void recover()
             throws ResourceException
This method assures that any jobs which were being processed by the state machine can continue to do so after container recovery. Subscriptions to the JobStateMonitor are also restored. It is intended to be called by ManagedJobFactoryResource after starting the JobStateMonitor.

Throws:
ResourceException

create

public ResourceKey create(java.util.Calendar initialTerminationTime,
                          java.util.Calendar currentTime,
                          java.lang.String localResourceManager,
                          JobDescriptionType jobDescription,
                          java.lang.String userSubject,
                          java.lang.String localUserId,
                          java.lang.String jobID,
                          java.lang.String serviceURL)
                   throws java.lang.Exception
The actual key value is computed automatically by this function as a UUID.

Specified by:
create in interface ManagedJobHome
Returns:
EndpointReferenceType
Throws:
java.lang.Exception

remove

public void remove(ResourceKey key)
            throws ResourceException
Specified by:
remove in interface ResourceHome
Throws:
ResourceException

createResourceState

private static ManagedMultiJobResourceStateType createResourceState(java.util.Calendar initialTerminationTime,
                                                                    java.util.Calendar currentTime,
                                                                    MultiJobDescriptionType jobDescription,
                                                                    java.lang.String userSubject,
                                                                    java.lang.String localUserId,
                                                                    java.lang.String handle)
Creates entire initial state of the resource, including internal (non-published) data.

Returns:
ManagedMultiJobResourceStateType state object, serializable to XML by Axis

createResourcePropertiesBean

private static ManagedMultiJobResourcePropertiesType createResourcePropertiesBean(java.util.Calendar initialTerminationTime,
                                                                                  java.util.Calendar currentTime,
                                                                                  MultiJobDescriptionType jobDescription,
                                                                                  java.lang.String userSubject,
                                                                                  java.lang.String localUserId)

getHome

public static ManagedMultiJobHome getHome()
                                   throws ResourceException
Throws:
ResourceException

getNotificationConsumerManager

public static NotificationConsumerManager getNotificationConsumerManager()

isResourcePersistent

public boolean isResourcePersistent()
Description copied from interface: ManagedJobHome
This function is useful in order to determine if the resource should be stored.

Specified by:
isResourcePersistent in interface ManagedJobHome
Returns:
boolean

getResourceCount

public int getResourceCount()
Description copied from interface: ManagedJobHome
This function returns the number of resources created by the particular home instance.

Specified by:
getResourceCount in interface ManagedJobHome