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.tc.object.config.schema;
05:
06: import com.tc.util.Assert;
07:
08: /**
09: * Represents the persistence mode of the server.
10: */
11: public class PersistenceMode {
12:
13: private final String mode;
14:
15: private PersistenceMode(String mode) {
16: Assert.assertNotBlank(mode);
17:
18: this .mode = mode;
19: }
20:
21: public static final PersistenceMode TEMPORARY_SWAP_ONLY = new PersistenceMode(
22: "temporary-swap-only");
23: public static final PersistenceMode PERMANENT_STORE = new PersistenceMode(
24: "permanent-store");
25:
26: public boolean equals(Object that) {
27: if (!(that instanceof PersistenceMode))
28: return false;
29: return ((PersistenceMode) that).mode.equals(this .mode);
30: }
31:
32: public String toString() {
33: return this.mode;
34: }
35:
36: }
|