|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
aa.core.SchedulerManager
This class is the actor scheduler, and it schedules all actors on this platform
Field Summary | |
private boolean |
m_bGranularity
|
private CyberOrgManager |
m_comCyberOrgManager
|
private java.util.Hashtable |
m_htThreadTimeslice
|
private long |
m_lLargestSlice
|
private java.lang.Long |
m_longBeginSign
|
private long |
m_lSmallestSlice
|
private Queue |
m_queueThreads
|
private java.lang.Thread |
m_threadCurrent
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SchedulerManager(CyberOrgManager p_comCyberOrgManager)
Creates a new instance of SchedulerManager |
|
SchedulerManager(long p_lSmallestSlice,
long p_lLargestSlice)
|
Method Summary | |
long |
getTimeSlice(java.lang.Thread p_thread)
Look up the hashtable to find out the time slice of specific actor |
void |
insert(java.lang.Thread p_thread)
Called by CyberOrgManager when a cyberorg is reactived. |
void |
insert(java.lang.Thread p_thread,
long p_lTimeslice)
This method inserts a thread into the thread queue for thread scheduling. |
private java.lang.Thread |
remove()
Remove a thread from the thread queue for scheduling. |
void |
remove(java.lang.Thread p_thread)
Remove specific thread This method is called when migration happens in order to remove the migrating actors from the local scheduler |
void |
resAlloc(java.lang.Thread p_thread,
long p_lTimeSlice)
Reallocates resource for specific thread |
void |
run()
The main loop |
void |
scaleup(long p_lFactor)
In granularity control, this method is called to enlarge the time slices for each actor using a specific factor |
protected void |
uninit()
Uninitializes this program. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.Hashtable m_htThreadTimeslice
private Queue m_queueThreads
private java.lang.Thread m_threadCurrent
private long m_lSmallestSlice
private long m_lLargestSlice
private boolean m_bGranularity
private CyberOrgManager m_comCyberOrgManager
private java.lang.Long m_longBeginSign
Constructor Detail |
public SchedulerManager(CyberOrgManager p_comCyberOrgManager)
public SchedulerManager(long p_lSmallestSlice, long p_lLargestSlice)
Method Detail |
protected void uninit()
private java.lang.Thread remove()
public void remove(java.lang.Thread p_thread)
p_thread
- The thread being removedpublic void insert(java.lang.Thread p_thread, long p_lTimeslice)
p_thread
- The reference to a thread to be inserted to the thread queuep_lTimeslice
- Timeslice in milliseconds that the corresponding thread
is assigned in one scheduling cyclepublic void insert(java.lang.Thread p_thread)
p_thread
- The thread being insertedpublic long getTimeSlice(java.lang.Thread p_thread)
p_thread
- The reference to a thread
public void resAlloc(java.lang.Thread p_thread, long p_lTimeSlice)
p_thread
- The threadp_lTimeSlice
- The time slice being allocated to the given threadpublic void scaleup(long p_lFactor)
p_lFactor
- The factor used to scale up the granularity controlpublic void run()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |