org.globus.exec.service.multi
Class PersistentManagedMultiJobResource
java.lang.Object
org.globus.wsrf.impl.ReflectionResource
org.globus.rendezvous.service.RendezvousResourceImpl
org.globus.exec.service.job.ManagedJobResourceImpl
org.globus.exec.service.multi.ManagedMultiJobResource
org.globus.exec.service.multi.PersistentManagedMultiJobResource
- All Implemented Interfaces:
- DirtyFlagHolder, ManagedJobResource, NotifyCallback, PersistenceCallback, PersistentManagedJobResource, PersistentResource, RemoveCallback, org.globus.rendezvous.service.RendezvousResource, Resource, ResourceIdentifier, ResourceLifetime, ResourceProperties, Runnable, SecureResource, TopicListAccessor
- public class PersistentManagedMultiJobResource
- extends ManagedMultiJobResource
- implements PersistentManagedJobResource
| Fields inherited from class org.globus.rendezvous.service.RendezvousResourceImpl |
|
|
Method Summary |
protected ResourceProperty |
createNewResourceProperty(QName rpQName,
Object resourceBean)
|
boolean |
getDirty()
|
private PersistenceHelper |
getPersistenceHelper()
|
QName |
getResourcePropertiesQName()
|
Object |
getWholeState()
|
QName |
getWholeStateQName()
|
Class |
getWholeStateType()
|
void |
initializeWholeState(Object wholeResourceState,
QName resourceElementQName,
Object key)
Initialize the whole state of the resource. |
void |
load(ResourceKey key)
If the resource was successfully loaded, its dirty flag is set to false. |
void |
processStateNotification(StateEnumeration state,
boolean holding,
FaultResourcePropertyType fault)
|
void |
remove()
|
void |
run()
|
void |
setDirty(boolean changed)
Sets the dirty flag on this persistent object. |
void |
setFault(FaultType fault)
|
void |
setResourceDatum(String name,
Object value)
|
void |
setResourceDatumWithoutStoring(String name,
Object value)
|
void |
setResourceProperty(QName name,
Object value)
|
void |
setState(StateEnumeration state)
|
void |
store()
If the resource was successfully stored, its dirty flag is set to false. |
| Methods inherited from class org.globus.exec.service.job.ManagedJobResourceImpl |
getFault, getJobCredential, getJobDescription, getResourceData, getResourceDatum, getResourceProperty, getStagingCredential, getState, setJobDescription, setResourceData, setResourceDatum, setResourceDatum, setResourceProperty |
| Methods inherited from class org.globus.rendezvous.service.RendezvousResourceImpl |
createNewResourceProperty, getInternalRendezvousState, getTopicList, isFull, register, setInternalRendezvousState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dirtyCond
private Object dirtyCond
WHOLE_STATE_ELEMENT
private static final QName WHOLE_STATE_ELEMENT
persistenceHelper
private PersistenceHelper persistenceHelper
dirty
private boolean dirty
- The dirty flag is set to true at instanciation time, so that the
initial creator of the resource just needs to call
store
in order to actually persist the new resource for the first time.
logger
private static org.apache.commons.logging.Log logger
i18n
private static org.globus.util.I18n i18n
coreI18n
private static org.globus.util.I18n coreI18n
PersistentManagedMultiJobResource
public PersistentManagedMultiJobResource()
initializeWholeState
public void initializeWholeState(Object wholeResourceState,
QName resourceElementQName,
Object key)
throws ResourceException
- Description copied from interface:
ManagedJobResource
- Initialize the whole state of the resource. Called by the Home or
the persistence layer.
The implementation must call initialize().
- Specified by:
initializeWholeState in interface ManagedJobResource- Overrides:
initializeWholeState in class ManagedMultiJobResource
- Throws:
ResourceException
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class ManagedMultiJobResource
processStateNotification
public void processStateNotification(StateEnumeration state,
boolean holding,
FaultResourcePropertyType fault)
throws Exception
- Overrides:
processStateNotification in class ManagedMultiJobResource
- Throws:
Exception
setFault
public void setFault(FaultType fault)
- Overrides:
setFault in class ManagedJobResourceImpl
setState
public void setState(StateEnumeration state)
throws Exception
- Specified by:
setState in interface ManagedJobResource- Overrides:
setState in class ManagedMultiJobResource
- Throws:
Exception
setResourceProperty
public void setResourceProperty(QName name,
Object value)
- Overrides:
setResourceProperty in class ManagedJobResourceImpl
setResourceDatum
public void setResourceDatum(String name,
Object value)
- Specified by:
setResourceDatum in interface ManagedJobResource- Overrides:
setResourceDatum in class ManagedJobResourceImpl
setResourceDatumWithoutStoring
public void setResourceDatumWithoutStoring(String name,
Object value)
getWholeStateType
public Class getWholeStateType()
- Specified by:
getWholeStateType in interface PersistentManagedJobResource
getWholeStateQName
public QName getWholeStateQName()
- Specified by:
getWholeStateQName in interface PersistentManagedJobResource
getResourcePropertiesQName
public QName getResourcePropertiesQName()
- Specified by:
getResourcePropertiesQName in interface PersistentManagedJobResource
getWholeState
public Object getWholeState()
- Specified by:
getWholeState in interface PersistentManagedJobResource
store
public void store()
throws ResourceException
If the resource was successfully stored, its dirty flag is set to false.
Postcondition getDirty() == false
- Specified by:
store in interface PersistenceCallback
- Throws:
ResourceException - if the resource could not be stored- See Also:
setDirty()
load
public void load(ResourceKey key)
throws ResourceException
If the resource was successfully loaded, its dirty flag is set to false.
Postcondition getDirty() == false
- Specified by:
load in interface PersistenceCallback
- Throws:
ResourceException- See Also:
setDirty()
remove
public void remove()
throws ResourceException
- Specified by:
remove in interface RemoveCallback- Overrides:
remove in class ManagedMultiJobResource
- Throws:
ResourceException
getPersistenceHelper
private PersistenceHelper getPersistenceHelper()
throws ResourceException
- Throws:
ResourceException
createNewResourceProperty
protected ResourceProperty createNewResourceProperty(QName rpQName,
Object resourceBean)
throws Exception
- Throws:
Exception
setDirty
public void setDirty(boolean changed)
- Sets the dirty flag on this persistent object. The resource will not be
persisted unless it the firty flag is true.
- Specified by:
setDirty in interface DirtyFlagHolder
- Parameters:
changed - boolean To flag the resource as changed i.e. "dirty" and
have it persisted by the next invocation of store
getDirty
public boolean getDirty()
- Specified by:
getDirty in interface DirtyFlagHolder