1 7 package org.jboss.cache.lock; 8 9 10 15 public class LockStrategyFactory 16 { 17 18 21 private static IsolationLevel lockingLevel_ = IsolationLevel.REPEATABLE_READ; 22 23 26 protected LockStrategyFactory() 27 { 28 } 29 30 public static LockStrategy getLockStrategy() { 31 return getLockStrategy(lockingLevel_); 32 } 33 34 public static LockStrategy getLockStrategy(IsolationLevel lockingLevel) 35 { 36 if (lockingLevel == null) 40 return new LockStrategyNone(); 41 return lockingLevel.getLockStrategy(); 42 } 43 44 public static void setIsolationLevel(IsolationLevel level) 45 { 46 lockingLevel_ = level; 47 } 48 49 } 50 | Popular Tags |