|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.Sample
public abstract class Sample
Sample contains all relevant values of the Simon that are obtained by the
Simon.sample() and Simon.sampleAndReset() methods.
Returned object contains consistent set of Simon values as both operations are synchronized.
However Sample is a Java Bean and it can be modified afterwards so no consistency is guaranteed
when the object is used in an inapropriate context. As a Java Bean object can be
used directly as the data transfer object without need to create another DTO with the same data.
Sample generally doesn't have any behavior.
| Field Summary | |
|---|---|
private long |
firstUsage
|
private long |
lastReset
|
private long |
lastUsage
|
private String |
name
|
private String |
note
|
| Constructor Summary | |
|---|---|
Sample()
|
|
| Method Summary | |
|---|---|
(package private) void |
finishWithUsagesAndNote(StringBuilder sb)
|
long |
getFirstUsage()
Timestamp of the first usage from the sampled Simon. |
long |
getLastReset()
Timestamp of the last reset from the sampled Simon. |
long |
getLastUsage()
Timestamp of the last usage from the sampled Simon. |
String |
getName()
Name of the sampled Simon. |
String |
getNote()
Note from the sampled Simon. |
void |
setFirstUsage(long firstUsage)
Sets the timestamp of the first usage from the sampled Simon. |
void |
setLastReset(long lastReset)
Sets the timestamp of the last reset from the sampled Simon. |
void |
setLastUsage(long lastUsage)
Sets the timestamp of the last usage from the sampled Simon. |
void |
setName(String name)
Sets the name of the sampled Simon - mostly not used directly. |
void |
setNote(String note)
Sets the note for the sample, typically note from the sampled Simon. |
String |
simonToString()
Similar to AbstractSimon.toString() except for the state missing in the output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private String name
private String note
private long firstUsage
private long lastUsage
private long lastReset
| Constructor Detail |
|---|
public Sample()
| Method Detail |
|---|
public String getName()
public void setName(String name)
name - Simon's namepublic final String getNote()
public final void setNote(String note)
note - Simon's notepublic long getFirstUsage()
public void setFirstUsage(long firstUsage)
firstUsage - Simon's first usage timestamppublic long getLastUsage()
public void setLastUsage(long lastUsage)
lastUsage - Simon's last usage timestamppublic long getLastReset()
public void setLastReset(long lastReset)
lastReset - Simon's last reset timestampvoid finishWithUsagesAndNote(StringBuilder sb)
public String simonToString()
AbstractSimon.toString() except for the state missing in the output.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||