Package com.levigo.jadice.server.misc
Class DummyNode
- java.lang.Object
-
- com.levigo.jadice.server.internal.NodeInternal
-
- com.levigo.jadice.server.Node
-
- com.levigo.jadice.server.misc.DummyNode
-
public class DummyNode extends Node
A node which does nothing, except forwarding all streams and, optionally, taking a configurable nap after each stream. This node is useful for the simulation of some kind of time-consuming work, without actually doing any work.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.levigo.jadice.server.Node
Node.Cardinality
-
-
Constructor Summary
Constructors Constructor Description DummyNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDelayPerStream()
String
getWorkerClassName()
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name.void
setDelayPerStream(long delayPerStream)
Set the delay per stream (in milliseconds).-
Methods inherited from class com.levigo.jadice.server.Node
addTransportReceiver, appendSuccessor, apply, equals, getInputCardinality, getJob, getOutputCardinality, getPredecessors, getSubsidiaryNodes, getSuccessors, getTransportSender, getUUID, hashCode, initialize, prependPredecessor, remove, validateConfiguration
-
-
-
-
Method Detail
-
getWorkerClassName
public String getWorkerClassName()
Description copied from class:Node
Return the node's associatedcom.levigo.jadice.server.core.NodeWorker
full qualified class's name. By default, the worker class name is- The same as the node name with the trailing "Node" replaced by "Worker" if the node name ends in "Node"
- The node class name with an appended "Worker" otherwise.
This behavior can be overridden in concrete subclasses.
- Overrides:
getWorkerClassName
in classNode
- Returns:
- the full qualified class name of the worker of this node.
-
getDelayPerStream
public long getDelayPerStream()
- Returns:
- The delay per stream (in ms)
-
setDelayPerStream
public void setDelayPerStream(long delayPerStream)
Set the delay per stream (in milliseconds). Default: 0- Parameters:
delayPerStream
- the delay in ms.- See Also:
Thread.sleep(long)
-
-