Class Writer
java.lang.Object
|
+--Process
|
+--SharedDataProcess
|
+--Writer
- All Implemented Interfaces:
- java.lang.Runnable
- public class Writer
- extends SharedDataProcess
A Writer is a shared data process that writes to a shared data object.
A writer writes to its shared data object a fixed number of times,
twiddling between writes. The name, the average twiddle time, the
shared data object, and the number of writes are specified when the
writer is constructed.
Constructor Summary |
Writer(java.lang.String nm,
double t,
SharedData d)
new Writer(nm, t, d) returns a new Writer and starts executing
its run method in a new thread. |
Method Summary |
void |
step()
wr.step() simulates a single write step to a shared data object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Writer
public Writer(java.lang.String nm,
double t,
SharedData d)
- new Writer(nm, t, d) returns a new Writer and starts executing
its run method in a new thread. The name of the new writer is
formed by concatenating its class name with nm. Its average
twiddle time is t. Its shared data object is d.
step
public void step()
- wr.step() simulates a single write step to a shared data object.
- Overrides:
step
in class Process