org.yawlfoundation.yawl.engine.instance
Class InstanceCache

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.concurrent.ConcurrentHashMap<String,CaseInstance>
          extended by org.yawlfoundation.yawl.engine.instance.InstanceCache
All Implemented Interfaces:
Serializable, ConcurrentMap<String,CaseInstance>, Map<String,CaseInstance>

public class InstanceCache
extends ConcurrentHashMap<String,CaseInstance>

Manages a dataset of all 'live' case instances, including their workitems (live and completed) and the data parameters of those workitems. Author: Michael Adams Creation Date: 11/11/2008

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
InstanceCache()
           
 
Method Summary
 void addCase(CaseInstance instance)
           
 void addCase(String caseID, YSpecificationID specID, String caseParams, YLogDataItemList logData, long startTime)
           
 void addParameters(YWorkItem workitem, YTask task, org.jdom.Element data)
           
 void addWorkItem(YWorkItem item)
           
 void closeWorkItem(YWorkItem item, org.jdom.Document data)
           
 CaseInstance getCase(String caseID)
           
 Collection<CaseInstance> getCases()
           
 Collection<ParameterInstance> getParameters(String caseID, String itemID)
           
 WorkItemInstance getWorkItemInstance(String caseID, String itemID)
           
 WorkItemInstance getWorkItemInstance(YWorkItem item)
           
 Collection<WorkItemInstance> getWorkitems(String caseID)
           
 String marshalCases()
           
 String marshalParameters(String caseID, String itemID)
           
 String marshalWorkItems(String caseID)
           
 CaseInstance removeCase(String caseID)
           
 void setTimerExpired(YWorkItem item)
           
 void updateWorkItemData(YWorkItem item, org.jdom.Element data)
           
 
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

InstanceCache

public InstanceCache()
Method Detail

addCase

public void addCase(CaseInstance instance)

addCase

public void addCase(String caseID,
                    YSpecificationID specID,
                    String caseParams,
                    YLogDataItemList logData,
                    long startTime)

getCase

public CaseInstance getCase(String caseID)

getCases

public Collection<CaseInstance> getCases()

removeCase

public CaseInstance removeCase(String caseID)

addWorkItem

public void addWorkItem(YWorkItem item)

closeWorkItem

public void closeWorkItem(YWorkItem item,
                          org.jdom.Document data)

updateWorkItemData

public void updateWorkItemData(YWorkItem item,
                               org.jdom.Element data)

setTimerExpired

public void setTimerExpired(YWorkItem item)

getWorkitems

public Collection<WorkItemInstance> getWorkitems(String caseID)

getWorkItemInstance

public WorkItemInstance getWorkItemInstance(String caseID,
                                            String itemID)

getWorkItemInstance

public WorkItemInstance getWorkItemInstance(YWorkItem item)

addParameters

public void addParameters(YWorkItem workitem,
                          YTask task,
                          org.jdom.Element data)

getParameters

public Collection<ParameterInstance> getParameters(String caseID,
                                                   String itemID)

marshalCases

public String marshalCases()

marshalWorkItems

public String marshalWorkItems(String caseID)

marshalParameters

public String marshalParameters(String caseID,
                                String itemID)


Copyright © 2004-2012 The YAWL Foundation.