01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.test.activepassive;
06:
07: public class ActivePassivePersistenceMode {
08: public static final String PERMANENT_STORE = "permanent-store";
09: public static final String TEMPORARY_SWAP_ONLY = "temporary-swap-only";
10:
11: private final String mode;
12:
13: public ActivePassivePersistenceMode(String mode) {
14: if (!mode.equals(PERMANENT_STORE)
15: && !mode.equals(TEMPORARY_SWAP_ONLY)) {
16: throw new AssertionError("Unrecognized persistence mode ["
17: + mode + "]");
18: }
19: this .mode = mode;
20: }
21:
22: public String getMode() {
23: if (mode == null) {
24: throw new AssertionError("Mode was not set");
25: }
26: return mode;
27: }
28: }
|