|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.mit.ai.psg.traveler.ActivityRecordBase
|
+--edu.mit.ai.psg.traveler.SynchronizationRecordDefault
Default implementation of SynchronizationRecord.
This class can be used directly for synchronized blocks; a derived class
can be used for synchronized methods.
SynchronizationRecordDefault.Entry is default Entry record;
SynchronizationRecordDefault.Exit is default Exit record.
SynchronizationRecord| Inner Class Summary | |
static class |
SynchronizationRecordDefault.Entry
default class for recording entry into synchronization in a biography |
static class |
SynchronizationRecordDefault.Exit
default class for recording exit from synchronization in a biography |
| Inner classes inherited from class edu.mit.ai.psg.traveler.SynchronizationRecord |
SynchronizationRecord.Entry,
SynchronizationRecord.Exit |
| Field Summary | |
protected Member |
myMember
|
protected Object |
myTargetNow
|
protected Object |
myTargetThen
|
| Fields inherited from class edu.mit.ai.psg.traveler.ActivityRecordBase |
parent |
| Constructor Summary | |
SynchronizationRecordDefault(Object target)
|
|
SynchronizationRecordDefault(Object target,
Member inMember)
|
|
| Method Summary | |
void |
addSynchronizationChild(SynchronizationRecord child)
add record of nested/recursive call for synchronization e.g., a nested synchronized block or wait. |
SynchronizationRecord.Entry |
addSynchronizationEntry()
Called by a TraceRecorder when adding entry for this
activity to target's biography. |
SynchronizationRecord.Exit |
addSynchronizationExit()
Called by a TraceRecorder when adding exit for this
activity to target's biography. |
void |
finished()
Trims child list (or sets to null if empty). |
Member |
getMember()
|
List |
getSynchronizationChildren()
synchronization children are SynchronizationRecords for recursive (possibly indirect) synchronizing or waiting |
SynchronizationRecord.Entry |
getSynchronizationEntry()
returns record of entering synchronization for this activity. |
SynchronizationRecord.Exit |
getSynchronizationExit()
returns record of exitting synchronization for this activity. |
SynchronizationRecord |
getSynchronizationParent()
|
Object |
getTargetNow()
return current the target of the sychronization as it is now, or null if call invoked a static method or constructor. |
Object |
getTargetThen()
return a clone of target as it was when record was created, or null if target was not cloned. |
boolean |
isSynchronized()
returns true; |
boolean |
isSynchronizedWait()
returns false |
protected SynchronizationRecord.Entry |
makeSynchronizationEntryRecord()
overridable method; returns new SynchronizationRecordDefault.Entry |
protected SynchronizationRecord.Exit |
makeSynchronizationExitRecord()
overridable method; returns new SynchronizationRecordDefault.Exit |
void |
setSynchronizationParent(SynchronizationRecord syncParent)
called by addSynchronizationChild(edu.mit.ai.psg.traveler.SynchronizationRecord) |
String |
toString()
returns "(synchronized(target) in member)" |
| Methods inherited from class edu.mit.ai.psg.traveler.ActivityRecordBase |
addChild,
addThreadedChild,
cloneObject,
ensureListValue,
getChildren,
getChildrenInThread,
getParent,
getProperty,
getThreadedChildren,
isFinished,
putProperty,
removeProperty,
setParent |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected Object myTargetNow
protected Object myTargetThen
protected Member myMember
| Constructor Detail |
public SynchronizationRecordDefault(Object target,
Member inMember)
target - is the object on which activity is synchronizinginMember - is method or constructor in which synchronization is
occuring, or null if in static initializerpublic SynchronizationRecordDefault(Object target)
| Method Detail |
public boolean isSynchronized()
public boolean isSynchronizedWait()
Object.wait()public Object getTargetNow()
public Object getTargetThen()
public Member getMember()
public SynchronizationRecord.Entry getSynchronizationEntry()
public SynchronizationRecord.Exit getSynchronizationExit()
public SynchronizationRecord.Entry addSynchronizationEntry()
TraceRecorder when adding entry for this
activity to target's biography. Initializes, adds, and returns a
synchronization entry record for target's biography (entry must
be first child of this activity in thread).SynchronizationRecord.isSynchronized() or
SynchronizationRecord.isSynchronizedWait(), or if this already has an entry.SynchronizationRecord.getSynchronizationEntry()public SynchronizationRecord.Exit addSynchronizationExit()
TraceRecorder when adding exit for this
activity to target's biography. Initializes, adds, and returns a
synchronization exit record for target's biography
(exit must be last child in thread).SynchronizationRecord.isSynchronized() or
SynchronizationRecord.isSynchronizedWait(), or if this already has an exit.SynchronizationRecord.getSynchronizationExit()protected SynchronizationRecord.Entry makeSynchronizationEntryRecord()
SynchronizationRecordDefault.Entryprotected SynchronizationRecord.Exit makeSynchronizationExitRecord()
SynchronizationRecordDefault.Exitpublic void finished()
public List getSynchronizationChildren()
public void addSynchronizationChild(SynchronizationRecord child)
SynchronizationRecord.setSynchronizationParent(edu.mit.ai.psg.traveler.SynchronizationRecord)(this)public SynchronizationRecord getSynchronizationParent()
public void setSynchronizationParent(SynchronizationRecord syncParent)
SynchronizationRecord.addSynchronizationChild(edu.mit.ai.psg.traveler.SynchronizationRecord)public String toString()
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-feedback@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||