public class NotifyTimerElement extends RecordingStrategiesElement
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
id
Stores the timer id.
|
private long |
now
Stores the current time in milli seconds.
|
private TimerState |
state
Stores the timer state.
|
private long |
threadId
Stores the thread id, may be negative if irrelevant.
|
| Constructor and Description |
|---|
NotifyTimerElement()
Creates a new empty instance.
|
NotifyTimerElement(java.lang.String id,
TimerState state,
long now,
long threadId)
Creates a new instance with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
If a pool is used this method is for releasing the element from the pool.
|
java.lang.String |
getId()
Getter for the recId.
|
int |
getIdentification()
Returns the unambiguous identification of the element.
|
long |
getNow()
Getter for the now.
|
TimerState |
getState()
Getter for the state.
|
long |
getThreadId()
Getter for the threadId.
|
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 |
release()
Release this element from the pool if this instance is
Poolable. |
void |
send(java.io.DataOutputStream out)
Writes this instance to the given output stream.
|
void |
setId(java.lang.String id)
Setter for the id.
|
void |
setNow(long now)
Setter for the now.
|
void |
setState(TimerState state)
Setter for the state.
|
void |
setThreadId(long threadId)
Setter for the threadId.
|
private java.lang.String id
private TimerState state
private long now
private long threadId
public NotifyTimerElement()
public NotifyTimerElement(java.lang.String id,
TimerState state,
long now,
long threadId)
id - the timer identification (may overlap with recorder ids)state - the new timer statenow - the current system time in millisecondsthreadId - the id of the currently executing thread, may be
negative if it should be ignoredpublic java.lang.String getId()
public void setId(java.lang.String id)
id - the id to setpublic long getNow()
public void setNow(long now)
now - the now to setpublic long getThreadId()
public void setThreadId(long threadId)
threadId - the id to set, may be negative if irrelevantpublic TimerState getState()
public void setState(TimerState state)
state - the new state to setpublic 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 RecordingStrategiesElementpublic void release()
Poolable.release in class RecordingStrategiesElement