- public synchronized Dictionary get() {
- Dictionary dict = Dictionary.getInstance();
- synchronized (dict) {
- while(dict.getLastLoadTime()==0){
- try {
- TimeUnit.SECONDS.sleep(1);
- } catch (InterruptedException e) {
- log.info(getName() +",InterruptedException" ,e);
- }finally{
- dict = Dictionary.getInstance();
- }
- }
- }
- return dict;
- }
复制代码 |