01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest.restart;
05:
06: import EDU.oswego.cs.dl.util.concurrent.CyclicBarrier;
07: import EDU.oswego.cs.dl.util.concurrent.FutureResult;
08:
09: public interface RestartTestApp {
10:
11: public void setStartBarrier(CyclicBarrier startBarrier);
12:
13: public void setID(int id);
14:
15: public int getID();
16:
17: /**
18: * Initial, unstarted state
19: */
20: public boolean isInit();
21:
22: /**
23: * The app has started
24: */
25: public boolean isStart();
26:
27: /**
28: * The app has acquired the lock
29: */
30: public boolean isHolder();
31:
32: /**
33: * The app is waiting on the lock
34: */
35: public boolean isWaiter();
36:
37: /**
38: * The app is in the end state.
39: */
40: public boolean isEnd();
41:
42: /**
43: * Resets the app to the INIT state.
44: */
45: public void reset();
46:
47: public String getStateName();
48:
49: public void blockShutdown(FutureResult blocker) throws Exception;
50:
51: }
|