Mercurial > hg > blitz_condensed
comparison src/org/dancres/blitz/txnlock/TxnLocks.java @ 0:3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 21 Mar 2009 11:00:06 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3dc0c5604566 |
---|---|
1 package org.dancres.blitz.txnlock; | |
2 | |
3 import java.util.HashMap; | |
4 | |
5 /** | |
6 Contains lockmanagers split and indexed by Entry type. | |
7 */ | |
8 public class TxnLocks { | |
9 | |
10 private static HashMap theLockMgrs = new HashMap(); | |
11 | |
12 public static LockMgr getLockMgr(String aType) { | |
13 synchronized(theLockMgrs) { | |
14 LockMgr myMgr = (LockMgr) theLockMgrs.get(aType); | |
15 | |
16 if (myMgr == null) { | |
17 myMgr = new LockMgr(); | |
18 theLockMgrs.put(aType, myMgr); | |
19 } | |
20 | |
21 return myMgr; | |
22 } | |
23 } | |
24 } |