2
|
1 package alice.test.dpp.codesegment;
|
1
|
2
|
|
3 import alice.codesegment.CodeSegment;
|
20
|
4 import alice.test.dpp.datasegment.Fork;
|
|
5 import alice.test.dpp.datasegment.Philosophy;
|
1
|
6
|
|
7 public class StartCodeSegment extends CodeSegment {
|
|
8
|
|
9 @Override
|
|
10 public void run() {
|
|
11 System.out.println("run StartCodeSegment");
|
14
|
12
|
|
13 new ScheduleCodeSegment("phil1");
|
|
14 new ScheduleCodeSegment("phil2");
|
|
15 new ScheduleCodeSegment("phil3");
|
|
16
|
|
17 ods.update("local", "phil1", new Philosophy("phil1","fork1","fork2"));
|
|
18 ods.update("local", "phil2", new Philosophy("phil2","fork2","fork3"));
|
|
19 ods.update("local", "phil3", new Philosophy("phil3","fork3","fork1"));
|
4
|
20 ods.update("local", "fork1", new Fork("fork1"));
|
|
21 ods.update("local", "fork2", new Fork("fork2"));
|
12
|
22 ods.update("local", "fork3", new Fork("fork3"));
|
4
|
23
|
1
|
24 }
|
|
25
|
|
26 }
|