org.yawlfoundation.yawl.resourcing.datastore
Class WorkItemCache

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.concurrent.ConcurrentHashMap<String,WorkItemRecord>
          extended by org.yawlfoundation.yawl.resourcing.datastore.WorkItemCache
All Implemented Interfaces:
Serializable, ConcurrentMap<String,WorkItemRecord>, Map<String,WorkItemRecord>

public class WorkItemCache
extends ConcurrentHashMap<String,WorkItemRecord>

A workitem record hashmap with added persistence.

Author:
Michael Adams v0.1, 15/09/2007
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>
 
Method Summary
 WorkItemRecord add(WorkItemRecord wir)
           
static WorkItemCache getInstance()
           
static WorkItemCache getInstance(boolean persist)
           
 boolean isPersistOn()
           
 WorkItemRecord put(String id, WorkItemRecord wir)
           
 WorkItemRecord remove(String id)
           
 WorkItemRecord remove(WorkItemRecord wir)
           
 void removeCase(String caseID)
           
 WorkItemRecord replace(WorkItemRecord oldWir, WorkItemRecord newWir)
           
 void restore()
           
 void setPersist(boolean persist)
           
 WorkItemRecord update(WorkItemRecord wir)
           
 WorkItemRecord updateResourceStatus(WorkItemRecord wir, String status)
           
 WorkItemRecord updateStatus(WorkItemRecord wir, String status)
           
 
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, 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
 

Method Detail

getInstance

public static WorkItemCache getInstance()

getInstance

public static WorkItemCache getInstance(boolean persist)

setPersist

public void setPersist(boolean persist)

isPersistOn

public boolean isPersistOn()

add

public WorkItemRecord add(WorkItemRecord wir)

remove

public WorkItemRecord remove(WorkItemRecord wir)

replace

public WorkItemRecord replace(WorkItemRecord oldWir,
                              WorkItemRecord newWir)

removeCase

public void removeCase(String caseID)

update

public WorkItemRecord update(WorkItemRecord wir)

updateResourceStatus

public WorkItemRecord updateResourceStatus(WorkItemRecord wir,
                                           String status)

updateStatus

public WorkItemRecord updateStatus(WorkItemRecord wir,
                                   String status)

restore

public void restore()

put

public WorkItemRecord put(String id,
                          WorkItemRecord wir)
Specified by:
put in interface Map<String,WorkItemRecord>
Overrides:
put in class ConcurrentHashMap<String,WorkItemRecord>

remove

public WorkItemRecord remove(String id)


Copyright © 2004-2012 The YAWL Foundation.