org.apache.ode.jacob.vpu
Class ExecutionQueueImpl
java.lang.Object
org.apache.ode.jacob.vpu.ExecutionQueueImpl
- All Implemented Interfaces:
- ExecutionQueue
public class ExecutionQueueImpl
- extends java.lang.Object
- implements ExecutionQueue
A fast, in-memory ExecutionQueue implementation.
|
Field Summary |
static java.util.concurrent.ConcurrentHashMap<java.lang.String,java.io.ObjectStreamClass> |
_classDescriptors
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_classDescriptors
public static java.util.concurrent.ConcurrentHashMap<java.lang.String,java.io.ObjectStreamClass> _classDescriptors
ExecutionQueueImpl
public ExecutionQueueImpl(java.lang.ClassLoader classLoader)
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
- Specified by:
setClassLoader in interface ExecutionQueue
setReplacementMap
public void setReplacementMap(ReplacementMap replacementMap)
- Specified by:
setReplacementMap in interface ExecutionQueue
getIndex
public java.util.Map<java.lang.Object,java.util.LinkedList<IndexedObject>> getIndex()
add
public void add(CommChannel channel)
- Specified by:
add in interface ExecutionQueue
enqueueReaction
public void enqueueReaction(Continuation continuation)
- Description copied from interface:
ExecutionQueue
- Add a continuation to the broth. This operation is sometimes
referred to as an "injection"; it can be used to inject into the
broth the "original" continuation.
- Specified by:
enqueueReaction in interface ExecutionQueue
- Parameters:
continuation - the Continuation to add to the broth
dequeueReaction
public Continuation dequeueReaction()
- Specified by:
dequeueReaction in interface ExecutionQueue
add
public void add(CommGroup group)
- Specified by:
add in interface ExecutionQueue
cycle
public int cycle()
- Specified by:
cycle in interface ExecutionQueue
createExport
public java.lang.String createExport(CommChannel channel)
- Specified by:
createExport in interface ExecutionQueue
consumeExport
public CommChannel consumeExport(java.lang.String exportId)
- Specified by:
consumeExport in interface ExecutionQueue
hasReactions
public boolean hasReactions()
- Description copied from interface:
ExecutionQueue
- Are there any reactions that can be executed in the broth?
- Specified by:
hasReactions in interface ExecutionQueue
- Returns:
true if there are "enabled" reactions
flush
public void flush()
- Specified by:
flush in interface ExecutionQueue
read
public void read(java.io.InputStream iis)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
write
public void write(java.io.OutputStream oos)
throws java.io.IOException
- Throws:
java.io.IOException
isComplete
public boolean isComplete()
- Specified by:
isComplete in interface ExecutionQueue
dumpState
public void dumpState(java.io.PrintStream ps)
- Specified by:
dumpState in interface ExecutionQueue
setGlobalData
public void setGlobalData(java.io.Serializable data)
getGlobalData
public java.io.Serializable getGlobalData()