|
JanosVM v0.6.0 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.utah.janosvm.sys.Exportable | +--edu.utah.janosvm.sys.TeamBackEnd
Kernel class used to represent a team, this is then extended internally with a nativeClass. The class is an Exportable since all instances of TeamBackEnd are allocated in the kernel team. The team they represent has a Team instance associated with the TeamBackEnd.
Team
,
TeamHandle
Field Summary | |
private static int |
_versionMajor
|
private static int |
_versionMinor
|
private static java.lang.String |
_versionName
Version info. |
private boolean |
dying
Indicates whether or not the team is being terminated. |
private static ExportManager |
kernelManager
|
static java.lang.String |
kernelName
|
private static TeamBackEnd |
kernelTeam
Reference to the kernel team. |
private java.lang.String |
name
|
private Team |
peer
The object local to the team's heap that contains per-team state specific to that team. |
(package private) static TeamListBackEnd |
teamList
|
Fields inherited from class edu.utah.janosvm.sys.Exportable |
anonManager,
owner |
Constructor Summary | |
private |
TeamBackEnd()
Constructor used for the kernel team. |
(package private) |
TeamBackEnd(java.lang.String name,
ResourceSpec[] specs,
kaffe.util.Ptr nativeSpecs)
Create a user team with the given name and resources. |
Method Summary | |
boolean |
addDependency(TeamBackEnd dep)
Add a dependency to this team. |
private void |
anchorObject(java.lang.Object obj)
Anchor an object so the collector doesn't free it. |
void |
buriedTeamEvent(int teamId)
Called from native code by reaper after it completes the burial of a team. |
private static void |
doTheReap()
Kernel reaper thread's entry into native code. |
void |
finishTeamEvent(int teamId)
|
private void |
floatObject(java.lang.Object obj)
Float a previously anchored object. |
java.lang.Object |
getClassLocal(java.lang.Class cl)
|
static java.lang.Object |
getCurrentClassLocal(java.lang.Class cl)
|
(package private) static TeamBackEnd |
getCurrentTeam()
Get the TeamBackEnd associated with the current thread. |
(package private) int |
getID()
Get the unique integer identifier for this team. |
(package private) static TeamBackEnd |
getKernelTeam()
|
java.lang.String |
getName()
|
(package private) static TeamBackEnd |
getObjectOwner(java.lang.Object obj)
|
(package private) Team |
getPeer()
Gets the Team peer associated with this TeamBackEnd. |
private int |
nativeConstructor(java.lang.String name,
ResourceSpec[] specs,
kaffe.util.Ptr nativeSpecs)
Constructs the native part of the class. |
private void |
nativeTerminate()
Native level terminate code |
void |
notifyOnFinish()
Set the flag on the team object that indicates that the last non-daemon thread in the team should send out a TeamEvent.FINISHED event. |
(package private) boolean |
owns(java.lang.Object obj)
Tests to see if an object is owned by this team. |
(package private) static void |
popReservation()
Pop the last TeamReservation off the stack. |
(package private) TeamReservation |
pushReservation()
|
(package private) TeamReservation |
pushReservation(int wrapCount)
|
(package private) static void |
returnFrom()
End a visit and return to the previous team. |
void |
setClassLocal(java.lang.Class cl,
java.lang.Object obj)
Store a per-team class local object. |
static void |
setCurrentClassLocal(java.lang.Class cl,
java.lang.Object obj)
|
(package private) void |
setDescription(java.lang.String desc)
|
(package private) boolean |
switchTo()
Basic visit wrapper provided for code that operates directly on TeamBackEnds. |
(package private) boolean |
switchTo(int wrapCount)
Start a visit. |
(package private) void |
terminate()
Terminate this team, revoke all its exports, kill its threads and return its resources to the system. |
java.lang.String |
toString()
|
Methods inherited from class edu.utah.janosvm.sys.Exportable |
getAnonymousManager,
pushOwnerReservation,
returnFromOwner,
setAnonymousManager,
switchToOwner |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait,
wait0 |
Field Detail |
private static final java.lang.String _versionName
private static final int _versionMajor
private static final int _versionMinor
private static TeamBackEnd kernelTeam
private static ExportManager kernelManager
static TeamListBackEnd teamList
public static final java.lang.String kernelName
private boolean dying
private Team peer
private java.lang.String name
Constructor Detail |
private TeamBackEnd()
TeamBackEnd(java.lang.String name, ResourceSpec[] specs, kaffe.util.Ptr nativeSpecs) throws DuplicateResourceSpecException, IndexedResourceSpecException, DeadTeamException
name
- The name of the team.specs
- The specifications required by the team.nativeSpecs
- Native array of resource specifications.Method Detail |
static TeamBackEnd getKernelTeam()
Team getPeer()
public java.lang.String getName()
private int nativeConstructor(java.lang.String name, ResourceSpec[] specs, kaffe.util.Ptr nativeSpecs) throws DuplicateResourceSpecException
name
- The name of this team.specs
- The resources specifications for the team.boolean owns(java.lang.Object obj)
obj
- The object to test for ownership.static TeamBackEnd getObjectOwner(java.lang.Object obj)
boolean switchTo(int wrapCount) throws TeamEjectionException
returnFrom()
.wrapCount
- Indicates the number of wrapper functions around this
one. This is required so that we can record where visit take place and
can properly back out of them if an exception is thrown.returnFrom()
boolean switchTo() throws TeamEjectionException
static void returnFrom()
XXX this shouldn't be static. Just to make the symmetry a bit more apparent, if nothing else. Also would be a bit easier to add sanity checking code with a this pointer.
static TeamBackEnd getCurrentTeam()
int getID()
void setDescription(java.lang.String desc)
desc
- A description of the contents of this team.private void anchorObject(java.lang.Object obj)
floatObject(Object)
private void floatObject(java.lang.Object obj)
anchorObject(Object)
private static void doTheReap()
public void finishTeamEvent(int teamId)
public void buriedTeamEvent(int teamId)
private void nativeTerminate()
void terminate()
If the calling thread is part of the team being terminated then this function will not return.
Note that termination is delayed by any active visits from other teams, so to provide quick termination all visits must be "short".
TeamReservation pushReservation(int wrapCount) throws DeadTeamException
wrapCount
- Indicates the number of wrapper functions around this
one. This is required so that we can record where pushes take place and
can properly back out of them if an exception is thrown.TeamReservation pushReservation() throws DeadTeamException
static void popReservation()
public void setClassLocal(java.lang.Class cl, java.lang.Object obj)
cl
- The class the object should be stored with.obj
- The object to store with the class.public static void setCurrentClassLocal(java.lang.Class cl, java.lang.Object obj)
public java.lang.Object getClassLocal(java.lang.Class cl)
cl
- The class to retrieve the local object for.public static java.lang.Object getCurrentClassLocal(java.lang.Class cl)
public boolean addDependency(TeamBackEnd dep)
th
- The team this one should depend on.public void notifyOnFinish()
public java.lang.String toString()
|
JanosVM v0.6.0 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |