1 5 package com.tc.object.config.schema; 6 7 import com.tc.util.Assert; 8 9 12 public class LockLevel { 13 14 private final String level; 15 16 private LockLevel(String level) { 17 Assert.assertNotBlank(level); 18 19 this.level = level; 20 } 21 22 public static final LockLevel WRITE = new LockLevel("write"); 23 public static final LockLevel READ = new LockLevel("read"); 24 public static final LockLevel CONCURRENT = new LockLevel("concurrent"); 25 public static final LockLevel SYNCHRONOUS_WRITE = new LockLevel("synchronous-write"); 26 27 public boolean equals(Object that) { 28 if (!(that instanceof LockLevel)) return false; 29 return ((LockLevel) that).level.equals(this.level); 30 } 31 32 public int hashCode() { 33 return this.level.hashCode(); 34 } 35 36 public String toString() { 37 return level; 38 } 39 40 } 41 | Popular Tags |