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 voiddoSleep(long time) Implement meprotected voidprotected voiddoSleepRandom(long time) intintgetNo()getState()voidnotifyPhilosopher(long time) voidrun()Implement mevoidsetState(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)
-