public class RegisterElement extends RecordingStrategiesElement
| Modifier and Type | Field and Description |
|---|---|
private long |
newId
Stores the id of the new thread.
|
private long |
now
The current time in nano seconds.
|
private long |
threadId
Stores the thread identification.
|
private long |
threadTicks
The number of nano seconds in
threadId. |
| Constructor and Description |
|---|
RegisterElement()
Creates a new message without explicit information.
|
RegisterElement(long threadId,
long newId,
long threadTicks,
long now)
Creates a new message.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
If a pool is used this method is for releasing the element from the pool.
|
int |
getIdentification()
Returns the unambiguous identification of the element.
|
void |
process(RecorderStrategy strategy)
Hands the information of the element to the
RecorderStrategy. |
void |
read(java.io.DataInputStream in)
Reads this instance from the given input stream.
|
void |
send(java.io.DataOutputStream out)
Writes this instance to the given output stream.
|
releaseprivate long threadId
private long newId
private long threadTicks
threadId.private long now
public RegisterElement(long threadId,
long newId,
long threadTicks,
long now)
threadId - the identification of the thread to be registerednewId - the new threadthreadTicks - the ticks of threadIdnow - the current time in nano secondspublic RegisterElement()
public void send(java.io.DataOutputStream out)
throws java.io.IOException
send in class RecordingStrategiesElementout - the output streamjava.io.IOException - in case of any I/O error or problempublic void read(java.io.DataInputStream in)
throws java.io.IOException
read in class RecordingStrategiesElementin - the input streamjava.io.IOException - in case of any I/O error or problempublic int getIdentification()
getIdentification in class RecordingStrategiesElementpublic void process(RecorderStrategy strategy)
RecorderStrategy.process in class RecordingStrategiesElementstrategy - the RecorderStrategypublic void clear()
clear in class RecordingStrategiesElement