|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.profile.ProfileReportImpl
class ProfileReportImpl
Package-private implementation of ProfileReport.
| Field Summary | |
|---|---|
(package private) long |
actualStartTime
|
(package private) Identity |
owner
|
(package private) int |
readyCount
|
(package private) long |
runningTime
|
(package private) long |
scheduledStartTime
|
(package private) boolean |
succeeded
|
(package private) KernelRunnable |
task
|
(package private) Throwable |
throwable
|
(package private) byte[] |
transactionId
|
(package private) int |
tryCount
|
| Constructor Summary | |
|---|---|
ProfileReportImpl(KernelRunnable task,
Identity owner,
long scheduledStartTime,
int readyCount)
Creates an instance of ProfileReportImpl with the
actual starting time being set to the current time. |
|
| Method Summary | |
|---|---|
(package private) void |
addListener(TransactionListenerDetail listenerDetail)
|
(package private) void |
addOperation(String operationName)
Package-private method used to add an operation. |
(package private) void |
addParticipant(ProfileParticipantDetail participantDetail)
|
(package private) void |
addTaskSample(String sampleName,
long value)
Package-private method used to add to a task-local sample. |
(package private) void |
finish()
Package-private method to note that a task has finished running. |
AccessedObjectsDetail |
getAccessedObjectsDetail()
Returns detail of the object accesses as reported by the AccessCoordinator or null if no
objects were accessed, no accesses reported, or if this
report is for a non-transactional task. |
long |
getActualStartTime()
Returns the time at which the task actually started running. |
Throwable |
getFailureCause()
Returns any failure that occurred during the execution of this report's task, or null if no failure
occurred. |
Set<TransactionListenerDetail> |
getListenerDetails()
Returns detail about each listener for the transaction, or an empty Set if the task was not transactional or had
no listeners. |
Set<ProfileParticipantDetail> |
getParticipantDetails()
Returns detail about each participant in the transaction, or an empty Set if the task was not transactional. |
int |
getReadyCount()
Returns the number of tasks in the scheduler and ready to run when this report's task was started. |
List<String> |
getReportedOperations()
Returns the operations that were reported as executed during the running of the task. |
int |
getRetryCount()
Returns the number of times this task has been tried. |
long |
getRunningTime()
Returns the length of time spent running the task. |
long |
getScheduledStartTime()
Returns the time at which that task was scheduled to run. |
KernelRunnable |
getTask()
Returns the run task that generated this report. |
Identity |
getTaskOwner()
Returns the owner of the run task. |
byte[] |
getTransactionId()
Returns the identifier for the task's transaction, or null
if the task was not transactional. |
Map<String,Long> |
getUpdatedTaskCounters()
Returns the values of the task-local counters that were updated during the running of the task. |
Map<String,List<Long>> |
getUpdatedTaskSamples()
Returns the list of values for the task-local samples that were updated during the running of the task. |
(package private) void |
incrementTaskCounter(String counter,
long value)
Package-private method used to increment task-local counters that were changed during this task. |
(package private) void |
merge(ProfileReportImpl report)
Package-private method used to merge the state of one report into another. |
(package private) void |
setAccessedObjectsDetail(AccessedObjectsDetail detail)
|
boolean |
wasTaskSuccessful()
Returns whether the task successfully ran to completion. |
boolean |
wasTaskTransactional()
Returns whether any of the task was transactional. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final KernelRunnable task
final Identity owner
final long scheduledStartTime
final int readyCount
final long actualStartTime
byte[] transactionId
boolean succeeded
long runningTime
int tryCount
Throwable throwable
| Constructor Detail |
|---|
ProfileReportImpl(KernelRunnable task,
Identity owner,
long scheduledStartTime,
int readyCount)
ProfileReportImpl with the
actual starting time being set to the current time.
task - the KernelRunnable being reported onowner - the Identity that owns the taskscheduledStartTime - the time the task was scheduled to runreadyCount - the number of tasks in the scheduler, ready to run,
that are associated with the same context as the task| Method Detail |
|---|
void incrementTaskCounter(String counter,
long value)
counter - the name of the countervalue - the amount to increment the counter
void addTaskSample(String sampleName,
long value)
sampleName - the name of the samplevalue - the latest value for the samplevoid addOperation(String operationName)
operationName - name of the operationvoid addParticipant(ProfileParticipantDetail participantDetail)
void addListener(TransactionListenerDetail listenerDetail)
void setAccessedObjectsDetail(AccessedObjectsDetail detail)
public KernelRunnable getTask()
getTask in interface ProfileReportKernelRunnable that was runpublic Identity getTaskOwner()
getTaskOwner in interface ProfileReportIdentity of the task ownerpublic boolean wasTaskTransactional()
wasTaskTransactional in interface ProfileReporttrue if any part of the task ran transactionally,
false otherwisepublic byte[] getTransactionId()
null
if the task was not transactional.
getTransactionId in interface ProfileReportnullpublic Set<ProfileParticipantDetail> getParticipantDetails()
Set if the task was not transactional.
getParticipantDetails in interface ProfileReportSet of ProfileParticipantDetailpublic Set<TransactionListenerDetail> getListenerDetails()
Set if the task was not transactional or had
no listeners.
getListenerDetails in interface ProfileReportSet of TransactionListenerDetailpublic boolean wasTaskSuccessful()
wasTaskSuccessful in interface ProfileReporttrue if this task completed successfully,
false otherwisepublic long getScheduledStartTime()
getScheduledStartTime in interface ProfileReportpublic long getActualStartTime()
getActualStartTime in interface ProfileReportpublic long getRunningTime()
getRunningTime in interface ProfileReportpublic int getRetryCount()
getRetryCount in interface ProfileReportpublic List<String> getReportedOperations()
List is returned.
getReportedOperations in interface ProfileReportList of Strings of the names of the reported
operations, in the order they were reportedpublic Map<String,Long> getUpdatedTaskCounters()
Map is returned. The
Map is a mapping from counter name to counter
value.
getUpdatedTaskCounters in interface ProfileReportMap from counter name to observed valuepublic Map<String,List<Long>> getUpdatedTaskSamples()
Map is
returned. The Map is a mapping from sample name
to an oldest-first list of sample values.
getUpdatedTaskSamples in interface ProfileReportMap from sample name to a list of values
added during the taskpublic AccessedObjectsDetail getAccessedObjectsDetail()
AccessCoordinator or null if no
objects were accessed, no accesses reported, or if this
report is for a non-transactional task.
getAccessedObjectsDetail in interface ProfileReportnullpublic int getReadyCount()
getReadyCount in interface ProfileReportpublic Throwable getFailureCause()
null if no failure
occurred. This Throwable will always be
null if ProfileReport.wasTaskSuccessful() returns
true.
getFailureCause in interface ProfileReportThrowable thrown during task execution
or null if no failure occurredvoid merge(ProfileReportImpl report)
void finish()
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||