KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > lock > IsolationLevel


1 /**
2  *
3  * @author Bela Ban Nov 25, 2003
4  * @version $Id: IsolationLevel.java,v 1.7 2006/12/08 18:50:49 genman Exp $
5  */

6 package org.jboss.cache.lock;
7
8 /**
9  * Various transaction isolation levels as an enumerated class.
10  */

11 public enum IsolationLevel {
12    
13    NONE {
14       public LockStrategy getLockStrategy()
15       {
16          return new LockStrategyNone();
17       }
18    },
19    SERIALIZABLE {
20       public LockStrategy getLockStrategy()
21       {
22          return new LockStrategySerializable();
23       }
24    },
25    REPEATABLE_READ {
26       public LockStrategy getLockStrategy()
27       {
28          return new LockStrategyRepeatableRead();
29       }
30    },
31    READ_COMMITTED {
32       public LockStrategy getLockStrategy()
33       {
34          return new LockStrategyReadCommitted();
35       }
36    },
37    READ_UNCOMMITTED {
38       public LockStrategy getLockStrategy()
39       {
40          return new LockStrategyReadUncommitted();
41       }
42    };
43
44    public abstract LockStrategy getLockStrategy();
45 }
Popular Tags