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.tcsimulator;
05:
06: public class QueueEvent {
07: public static final int SERVER_CRASH = 0;
08: public static final int SERVER_RESTART = 1;
09: private final int action;
10:
11: public QueueEvent(int action) {
12: if (action == SERVER_CRASH || action == SERVER_RESTART) {
13: this .action = action;
14: } else {
15: throw new AssertionError(
16: "Cannot create QueueEvent: Unrecognized action type: "
17: + action);
18: }
19: }
20:
21: public int getAction() {
22: return this.action;
23: }
24:
25: }
|