Project

General

Profile

« Previous | Next » 

Revision 961d67ac

Added by Cherian Mathew almost 9 years ago

added comment for sync get method call

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmRemoteCacheManager.java
59 59
            cdmlibModelCache = new Cache(modelcc);
60 60

  
61 61
            CacheManager.create().addCache(cdmlibModelCache);
62

  
63
            initCache(cdmlibModelCache);
62
            initCdmModelCache(cdmlibModelCache);
64 63

  
65 64
        } catch (CacheException e) {
66 65
            throw new CdmClientCacheException(e);
......
68 67

  
69 68
    }
70 69

  
71
    private void initCache(final Cache cache) {
70
    private void initCdmModelCache(final Cache cache) {
72 71

  
73 72
        initThread = new Thread() {
74 73
            @Override
......
87 86
    }
88 87

  
89 88
    public Cache getCdmModelGetMethodsCache(){
89
        //Note : Even though we synchronize this method, the cache can be simply
90
        //       retrieved using CacheManager.create().getCache(CDM_MODEL_CACHE_NAME)
91
        //       in which case the cache may not be fully initialised
90 92
        synchronized (cdmlibModelCache) {
91 93
            while(!cacheInitialised) {
92 94
                try {

Also available in: Unified diff