Package jadex.micro.philosophers.thread
Class Philosopher
java.lang.Object
jadex.micro.philosophers.thread.Philosopher
- All Implemented Interfaces:
Runnable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doSleep
(long time) Implement meprotected void
protected void
doSleepRandom
(long time) int
int
getNo()
getState()
void
notifyPhilosopher
(long time) void
run()
Implement mevoid
setState
(PhilosopherState state)
-
Field Details
-
state
-
r
-
no
protected int no -
t
-
eatcnt
protected int eatcnt -
mythread
-
-
Constructor Details
-
Philosopher
-
-
Method Details
-
run
public void run()Implement me -
getState
-
setState
-
getEatCnt
public int getEatCnt() -
getMyThread
-
getNo
public int getNo() -
doSleepRandom
protected void doSleepRandom() -
doSleepRandom
protected void doSleepRandom(long time) -
doSleep
protected void doSleep(long time) Implement me -
notifyPhilosopher
public void notifyPhilosopher(long time)
-