|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectaa.core.CyberOrgManager
| Field Summary | |
private java.util.Hashtable |
m_htActorHost
|
private java.util.Hashtable |
m_htActornameThread
|
private long |
m_lLargestSlice
|
private java.util.LinkedList |
m_llCyberOrgs
|
private long |
m_lScheduleLargest
|
private long |
m_lScheduleSmallest
|
private Platform |
m_pPlatform
|
private SchedulerManager |
m_smSchedulerManager
|
| Constructor Summary | |
CyberOrgManager(long p_lScheduleSmallest,
long p_lScheduleLargest)
Creates a new instance of CyberOrgManager |
|
| Method Summary | |
private long |
accept(long p_lRateAssign)
Called by resAlloc when it is trying to accept small request |
void |
afterMigrateActor(ActorName p_anActor,
java.lang.Thread p_thread)
This method is called in remote CyberOrg Migration, after migrating an actor, we need to insert it to the destination cyberorg, reallocate resource to it through the local scheduler |
private byte[] |
convertAddrIP(java.lang.String p_strAddress)
Concert texture IP address to byte array in order to get the InetAddress |
void |
createActor(ActorName p_anCreator,
ActorName p_anNewActor)
This method is called by the Platform, when an actor is creating another new actor. |
void |
disactiveCyberOrg(CyberOrg p_cybToDisactive)
Disactivate a cyberorg when it runs out of resources |
void |
localMigrate(CyberOrg p_cybToMigrate,
ActorName p_anDestFacilitator,
Contract p_conContract)
Local Migration |
CyberOrg |
lookupDestination()
This method is called by facilitator actors before migration. |
CyberOrg |
lookupHost(java.lang.Object p_objFacilitator)
This method is called after remote migration, in order to set host for the migrated facilitator |
void |
reactiveCyberOrg(CyberOrg p_cybToActive)
These method are called when a cyberorg runs out of resource, and when it gets more resources and can be scheduled again. |
void |
registerActorCyb(java.lang.Object p_anActor,
CyberOrg p_cybHost)
Register actor-host. |
void |
registerCyberOrg(CyberOrg p_coToBeRegistered)
Register a cyberorg to the current platform |
void |
registerThread(ActorName p_anActor,
java.lang.Thread p_thread)
The method is called by Platform in "creatActor". |
void |
remoteMigrate(CyberOrg p_cybToMigrate,
ActorName p_anDestFacilitator,
Contract p_conContract)
Remote Migration |
void |
remoteMigrateChild(ActorName p_anFacilitator)
In remote migration, only after we receive the reply message from the destination, which means the new cyberorg is already created in the destination platform, can we migrate actors and child cyberorgs of the migrating cyberorg |
void |
removeActor(ActorName p_anActor)
Called when an actor is destroyed |
void |
removeCyberOrg(CyberOrg p_coToBeDeleted)
Removes a cyberorg from the current platform |
boolean |
resAlloc(ActorName p_anToAlloc,
long rateAssign)
Reallocate resource for an actor the actor already exists in the scheduler |
long |
returnRes(ActorName p_anActor)
Returns the ticksRate of specific actor called by cyberorg primitives |
private void |
scaleupCyberOrgs(long p_lfactor)
Scale up the granularity control |
long |
updateTotalTicks()
Called by scheduler after every scheduling cycle, for total time control |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private SchedulerManager m_smSchedulerManager
private java.util.Hashtable m_htActornameThread
private java.util.Hashtable m_htActorHost
private java.util.LinkedList m_llCyberOrgs
private long m_lLargestSlice
private long m_lScheduleSmallest
private long m_lScheduleLargest
private Platform m_pPlatform
| Constructor Detail |
public CyberOrgManager(long p_lScheduleSmallest,
long p_lScheduleLargest)
| Method Detail |
public long returnRes(ActorName p_anActor)
p_anActor - The name of the actor which returns resources
public boolean resAlloc(ActorName p_anToAlloc,
long rateAssign)
p_anToAlloc - The actor namerateAssign - The resources being allocated to the given actor
private long accept(long p_lRateAssign)
p_lRateAssign - The small request
public void registerCyberOrg(CyberOrg p_coToBeRegistered)
p_coToBeRegistered - The cyberorg being registeredpublic void removeCyberOrg(CyberOrg p_coToBeDeleted)
p_coToBeDeleted - The cyberorg being removedprivate void scaleupCyberOrgs(long p_lfactor)
p_lfactor - The factor by which the granularity is scaled up
public void createActor(ActorName p_anCreator,
ActorName p_anNewActor)
p_anCreator - The name of the creatorp_anNewActor - The name of the new actor
public void registerThread(ActorName p_anActor,
java.lang.Thread p_thread)
p_anActor - The name of the actor being registeredp_thread - The thread representing the actor
public void localMigrate(CyberOrg p_cybToMigrate,
ActorName p_anDestFacilitator,
Contract p_conContract)
p_cybToMigrate - The cyberorg which is migratingp_anDestFacilitator - The facilitator actor of the destination cyberorgp_conContract - The new contract
public void remoteMigrate(CyberOrg p_cybToMigrate,
ActorName p_anDestFacilitator,
Contract p_conContract)
p_cybToMigrate - The cyberorg which is migratingp_anDestFacilitator - The destination (on another CyberOrgs platform)p_conContract - The new contractpublic void remoteMigrateChild(ActorName p_anFacilitator)
p_anFacilitator - The facilitator of the migrating cyberorgprivate byte[] convertAddrIP(java.lang.String p_strAddress)
p_strAddress - The IP address
public void registerActorCyb(java.lang.Object p_anActor,
CyberOrg p_cybHost)
p_anActor - Actor name or string of actor name being registeredp_cybHost - The host cyberorg
public void afterMigrateActor(ActorName p_anActor,
java.lang.Thread p_thread)
p_anActor - Actor namep_thread - Actor threadpublic CyberOrg lookupHost(java.lang.Object p_objFacilitator)
p_objFacilitator - The facilitator actor
public void removeActor(ActorName p_anActor)
p_anActor - The actor being destroyedpublic long updateTotalTicks()
public void reactiveCyberOrg(CyberOrg p_cybToActive)
p_cybToActive - The cyberorg being reactivatedpublic void disactiveCyberOrg(CyberOrg p_cybToDisactive)
p_cybToDisactive - The cyberorg being disactivatedpublic CyberOrg lookupDestination()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||