KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > config > schema > PersistenceMode


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.config.schema;
5
6 import com.tc.util.Assert;
7
8 /**
9  * Represents the persistence mode of the server.
10  */

11 public class PersistenceMode {
12
13   private final String JavaDoc mode;
14
15   private PersistenceMode(String JavaDoc mode) {
16     Assert.assertNotBlank(mode);
17
18     this.mode = mode;
19   }
20
21   public static final PersistenceMode TEMPORARY_SWAP_ONLY = new PersistenceMode("temporary-swap-only");
22   public static final PersistenceMode PERMANENT_STORE = new PersistenceMode("permanent-store");
23
24   public boolean equals(Object JavaDoc that) {
25     if (!(that instanceof PersistenceMode)) return false;
26     return ((PersistenceMode) that).mode.equals(this.mode);
27   }
28
29   public String JavaDoc toString() {
30     return this.mode;
31   }
32
33 }
34
Popular Tags