Project

General

Profile

Revision 806f96a2

ID806f96a2029208b9d349673d05e242cc3632365e
Parent 220a3f38
Child 98afb46e

Added by Andreas Müller about 2 months ago

ref #9207 , ref #9204 upgrade taxeditor.cdmlib to ehcache-2.10.6

View differences:

.gitattributes
155 155
eu.etaxonomy.taxeditor.cdmlib/lib/dozer-5.3.0.jar -text
156 156
eu.etaxonomy.taxeditor.cdmlib/lib/easymock-3.1.jar -text
157 157
eu.etaxonomy.taxeditor.cdmlib/lib/easymockclassextension-2.3.jar -text
158
eu.etaxonomy.taxeditor.cdmlib/lib/ehcache-core-2.6.9.jar -text
159 158
eu.etaxonomy.taxeditor.cdmlib/lib/ezmorph-1.0.6.jar -text
160 159
eu.etaxonomy.taxeditor.cdmlib/lib/fop-1.1.jar -text
161 160
eu.etaxonomy.taxeditor.cdmlib/lib/google-api-translate-java-0.92.jar -text
.gitignore
112 112
eu.etaxonomy.taxeditor.cdmlib/lib/apache-log4j-extras-1.2.17.jar
113 113
eu.etaxonomy.taxeditor.cdmlib/lib/antlr-2.*.jar
114 114
eu.etaxonomy.taxeditor.cdmlib/lib/cglib-nodep-3.*.jar
115
eu.etaxonomy.taxeditor.cdmlib/lib/ehcache-2.*.jar
eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
629 629
 lib/commons-pool-1.5.4.jar,
630 630
 lib/dom4j-1.6.1.jar,
631 631
 lib/dtd-parser-1.1.jar,
632
 lib/ehcache-core-2.6.11.jar,
632
 lib/ehcache-2.10.6.jar,
633 633
 lib/ezmorph-1.0.6.jar,
634 634
 lib/google-api-translate-java-0.92.jar,
635 635
 lib/h2-1.4.190.jar,
eu.etaxonomy.taxeditor.cdmlib/build.properties
26 26
               lib/commons-pool-1.5.4.jar,\
27 27
               lib/dom4j-1.6.1.jar,\
28 28
               lib/dtd-parser-1.1.jar,\
29
               lib/ehcache-core-2.6.11.jar,\
29
               lib/ehcache-2.10.6.jar,\
30 30
               lib/ezmorph-1.0.6.jar,\
31 31
               lib/google-api-translate-java-0.92.jar,\
32 32
               lib/h2-1.4.190.jar,\
eu.etaxonomy.taxeditor.cdmlib/pom.xml
62 62
                httpclient,JavaAPIforKml,iiif-apis,commons-beanutils,commons-lang3,commons-lang,commons-codec,
63 63
                commons-imaging,jackson-databind,jackson-annotations,jackson-core,jboss-logging,
64 64
                validation-api,classmate,javax.el-api,slf4j-api,slf4j-log4j12,
65
                ehcache,
65 66
                hibernate-validator,hibernate-validator-cdi,
66 67
                spring-context,spring-context-support,spring-aspects,spring-test,spring-beans,
67 68
                spring-tx,spring-web,spring-core,spring-aop,spring-expression,spring-orm,
......
261 262
      <version>${cdmlib.version}</version>
262 263
    </dependency>
263 264
    
265
    <!-- required -->
266
    <dependency>
267
	    <groupId>net.sf.ehcache</groupId>
268
	    <artifactId>ehcache</artifactId>
269
	    <version>2.10.6</version>
270
	</dependency>
271
    
264 272
    <!-- needed, but should try to remove -->
265 273
    <dependency>
266 274
    	<!-- see #9205 for how to remove -->
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/CdmEntitySession.java
26 26
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
27 27
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
28 28
import eu.etaxonomy.taxeditor.remoting.cache.ConversationalTransientEntityCacher;
29
import net.sf.ehcache.statistics.LiveCacheStatistics;
29
import net.sf.ehcache.statistics.FlatStatistics;
30 30

  
31 31
/**
32 32
 * NOTE : It would be nice to have this class performing merge / delete operations
......
230 230
    }
231 231

  
232 232
    @Override
233
    public LiveCacheStatistics getCacheStatistics() {
233
    public FlatStatistics getCacheStatistics() {
234 234
        return cdmTransientEntityCacher.getCacheStatistics();
235 235
    }
236 236

  
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/ICdmEntitySession.java
9 9
import eu.etaxonomy.cdm.cache.EntityCacherDebugResult;
10 10
import eu.etaxonomy.cdm.model.common.CdmBase;
11 11
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
12
import net.sf.ehcache.statistics.LiveCacheStatistics;
12
import net.sf.ehcache.statistics.FlatStatistics;
13 13

  
14 14
public interface ICdmEntitySession {
15 15

  
16 16
    public ICdmEntitySessionEnabled getOwner();
17 17

  
18
    public LiveCacheStatistics getCacheStatistics();
18
    public FlatStatistics getCacheStatistics();
19 19

  
20 20
	public  <O extends Object> O load(O obj, boolean update);
21 21

  
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java
18 18
import eu.etaxonomy.cdm.cache.EntityCacherDebugResult;
19 19
import eu.etaxonomy.cdm.model.common.CdmBase;
20 20
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
21
import net.sf.ehcache.statistics.LiveCacheStatistics;
21
import net.sf.ehcache.statistics.FlatStatistics;
22 22

  
23 23
/**
24 24
 * @author cmathew
......
44 44
    }
45 45

  
46 46
    @Override
47
    public LiveCacheStatistics getCacheStatistics() {
47
    public FlatStatistics getCacheStatistics() {
48 48
        return null;
49 49
    }
50 50

  
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/mock/MockCdmEntitySession.java
19 19
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
20 20
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
21 21
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
22
import net.sf.ehcache.statistics.LiveCacheStatistics;
22
import net.sf.ehcache.statistics.FlatStatistics;
23 23

  
24 24
/**
25 25
 * @author cmathew
......
86 86
    }
87 87

  
88 88
    @Override
89
    public LiveCacheStatistics getCacheStatistics() {
89
    public FlatStatistics getCacheStatistics() {
90 90
        return null;
91 91
    }
92 92

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/InspectSessionsDialog.java
8 8
 */
9 9
package eu.etaxonomy.taxeditor.view.sessions;
10 10

  
11
import java.awt.Checkbox;
11 12
import java.util.List;
12 13

  
13 14
import org.eclipse.jface.viewers.ILabelProvider;
......
54 55
    protected Shell shlInspectSessions;
55 56
    private Text txtDebugInfo;
56 57
    private Label lblDebugInformation;
58
    private Checkbox chkIncludeIgnored;
57 59

  
58 60
    private final Cache cdmlibModelCache;
59 61

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/sessions/SessionsViewPart.java
41 41
import eu.etaxonomy.taxeditor.store.CdmStore;
42 42
import net.sf.ehcache.Cache;
43 43
import net.sf.ehcache.CacheManager;
44
import net.sf.ehcache.statistics.LiveCacheStatistics;
44
import net.sf.ehcache.statistics.FlatStatistics;
45 45

  
46 46
/**
47 47
 * @author cmathew
......
282 282
        txtDefaultInMemory.setText("");
283 283
        txtDefaultOnDisk.setText("");
284 284
        if(defaultCache != null) {
285
            LiveCacheStatistics liveCacheStatistics = defaultCache.getLiveCacheStatistics();
285
        	FlatStatistics liveCacheStatistics = defaultCache.getStatistics();
286 286
            txtDefaultInMemory.setText(getInMemoryStats(liveCacheStatistics));
287 287
            txtDefaultOnDisk.setText(getOnDiskStats(liveCacheStatistics));
288 288
        }
......
291 291
        txtCdmModelInMemory.setText("");
292 292
        txtCdmModelOnDisk.setText("");
293 293
        if(cdmModelGetMethodsCache != null) {
294
            LiveCacheStatistics liveCacheStatistics = cdmModelGetMethodsCache.getLiveCacheStatistics();
294
        	FlatStatistics liveCacheStatistics = cdmModelGetMethodsCache.getStatistics();
295 295
            txtCdmModelInMemory.setText(getInMemoryStats(liveCacheStatistics));
296 296
            txtCdmModelOnDisk.setText(getOnDiskStats(liveCacheStatistics));
297 297
        }
......
315 315
            }
316 316
        }
317 317
        item.setText(0, activePrefix + sessionOwnerString);
318
        LiveCacheStatistics cacheStatistics = session.getCacheStatistics();
318
        FlatStatistics cacheStatistics = session.getCacheStatistics();
319 319
        item.setText(1, getInMemoryStats(cacheStatistics));
320 320
        item.setText(2, getOnDiskStats(cacheStatistics));
321 321
    }
322 322

  
323
    private String getInMemoryStats(LiveCacheStatistics statistics) {
323
    private String getInMemoryStats(FlatStatistics statistics) {
324 324
        if(statistics != null) {
325 325
            long localHeapSize = statistics.getLocalHeapSize();
326 326

  
......
332 332
        return "";
333 333
    }
334 334

  
335
    private String getOnDiskStats(LiveCacheStatistics statistics) {
335
    private String getOnDiskStats(FlatStatistics statistics) {
336 336
        if(statistics != null) {
337 337
            long localDiskSize = statistics.getLocalDiskSize();
338 338

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)