Index: rctags/ehcache-2.10.7.0.37/distribution/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/distribution/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/distribution/pom.xml (revision 0) @@ -1,298 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - - - ehcache-kit - pom - ehcache-kit - - project to build distribution kit - - - colorcache - events - - - - ehcache - ${productName}-${project.version} - ${kitFolder}-distribution - ${project.build.directory}/${kitFolder} - ${project.build.directory}/tmp/terracotta - - - - - net.sf.ehcache - ehcache - ${project.version} - provided - - - org.slf4j - slf4j-api - provided - - - org.slf4j - slf4j-jdk14 - provided - - - - - - includeJavadoc - - - !skipJavadoc - - - - - net.sf.ehcache - ehcache - ${project.version} - javadoc - provided - - - - - - - - - com.github.goldin - copy-maven-plugin - 0.2.3.8 - - false - - - - {{ new File( project.build.directory, "${kitFolder}" ).isDirectory() }} - ${root.dir} - - **/** - - true - true - - - - ${root.dir} - ${basedir}/src/main/assembly/root - true - true - - - - ${root.dir} - ${basedir}/../ehcache-core/src/main/config - true - - - - ${root.dir}/src - - - net.sf.ehcache - ehcache - sources - - - true - - - - false - ${root.dir}/javadoc - - - net.sf.ehcache - ehcache - javadoc - - - true - - - - {{ new File(project.properties['terracotta.kit.path']).isDirectory() }} - ${root.dir}/samples - - - net.sf.ehcache.examples - events - ${project.version} - distribution - tar.gz - - - net.sf.ehcache.examples - colorcache - ${project.version} - distribution - tar.gz - - - true - - - - {{ new File(project.properties['terracotta.kit.path']).isDirectory() }} - ${root.dir}/terracotta - ${terracotta.kit.path} - - **/ehcache/** - **/quartz/** - **/sessions/** - - true - - - {{ new File(project.properties['terracotta.kit.path']).isDirectory() }} - ${root.dir}/samples - ${terracotta.kit.path}/ehcache/samples - true - - - {{ new File(project.properties['terracotta.kit.path']).isDirectory() }} - ${root.dir}/samples/colorcache/bin - ${basedir}/src/main/assembly - - relative-paths.* - - - - {{ new File(project.properties['terracotta.kit.path']).isDirectory() }} - ${root.dir}/samples/events/bin - ${basedir}/src/main/assembly - - relative-paths.* - - - - - - - package-with-no-tc - package - - copy - - - - - - - org.terracotta - maven-forge-plugin - - - package-lib - package - - copy-dependencies - - - ${root.dir}/lib - false - - net.sf.ehcache:ehcache:${project.version} - org.slf4j:slf4j-api:${slf4j.version} - org.slf4j:slf4j-jdk14:${slf4j.version} - - - - - - - org.codehaus.gmaven - gmaven-plugin - - - create-tarball - package - - execute - - - - def srcdir = new File(project.basedir, "target/${kitFolder}") - def destFile = new File(project.basedir, "target/${tarballName}.tar.gz") - ant.tar(destfile: "${destFile}", longfile: "gnu", compression: "gzip") { - tarfileset(dir: "${srcdir}", prefix: "${kitFolder}", excludes: "**/bin/**,**/lib/**,**/*.sh,**/*.bat") - tarfileset(dir: "${srcdir}", prefix: "${kitFolder}", includes: "**/bin/**,**/lib/**,**/*.sh,**/*.bat", filemode: "755") - } - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.5 - - - attach-distribution - package - - attach-artifact - - - - - ${project.build.directory}/${tarballName}.tar.gz - tar.gz - distribution - - - - - - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - evgenyg.artifactoryonline.com - http://evgenyg.artifactoryonline.com/evgenyg/repo/ - - true - - - false - - - - - Index: rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-impl-v2/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-impl-v2/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-impl-v2/pom.xml (revision 0) @@ -1,136 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.7.0.37 - .. - - - management-ehcache-impl-v2 - management-ehcache-impl-v2 - A product library integrating with ehcache to construct the relevant management resource entities V1 - - - - net.sf.ehcache - management-ehcache-v2 - ${project.version} - - - net.sf.ehcache - management-ehcache-common - ${project.version} - - - org.terracotta - management-core-resources - ${management-core.version} - test-jar - test - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - provided - - - net.sf.ehcache.internal - ehcache-terracotta-bootstrap - ${project.version} - provided - - - org.terracotta.toolkit - terracotta-toolkit-api - 2.5 - provided - - - org.terracotta.toolkit - terracotta-toolkit-api-internal - provided - - - gf-40 - gf.javax.servlet-api - - - org.easymock - easymock - test - - - org.eclipse.jetty - jetty-servlet - test - - - org.mockito - mockito-core - test - - - org.powermock - powermock-api-easymock - test - - - org.powermock - powermock-module-junit4 - test - - - org.hamcrest - hamcrest-all - 1.3 - test - - - commons-io - commons-io - 2.6 - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/pom.xml (revision 0) @@ -1,509 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-parent - 2.22 - - - - ehcache-root - net.sf.ehcache - ehcache-root - pom - 2.10.7.0.37 - - - scm:svn:https://svn.terracotta.org/repo/ehcache/trunk/ehcache - - - - 1.7.25 - 1.0.1 - 1.4 - 2.15 - 1.17 - 2.1.6 - 0.10.0 - 1.0.2 - 2.2.3 - 9.4.11.v20180605 - 3.5.1-Final - - - - ehcache-core - terracotta - ehcache - management-ehcache-v1 - management-ehcache-v2 - management-ehcache-impl - ehcache-scheduled-refresh - ehcache-search-parser - - - - - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.terracotta.internal - statistics - ${statistics.version} - - - org.terracotta - management-core-resources - ${management-core.version} - - - com.terracotta - clustered-entity-management - ${clustered-entity-management.version} - - - org.eclipse.jetty - jetty-servlet - ${jetty.version} - - - javax.servlet - javax.servlet-api - - - - - - gf-40 - gf.javax.servlet-api - 3.1.0 - - - - - org.terracotta.toolkit - terracotta-toolkit-api-internal - ${terracotta-toolkit-api-internal.version} - provided - - - javax.servlet - javax.servlet-api - 3.1.0 - provided - - - org.hibernate - hibernate-core - ${hibernate-core.version} - provided - - - javax.transaction - jta - 1.1 - provided - - - net.sf.ehcache - sizeof-agent - 1.0.1 - provided - - - - - org.slf4j - slf4j-jdk14 - ${slf4j.version} - test - - - org.codehaus.btm - btm - 2.1.3 - test - - - net.sf.hibernate - hibernate - 2.1.8 - test - - - org.hamcrest - hamcrest-core - 1.3 - test - - - org.hamcrest - hamcrest-library - 1.3 - test - - - junit - junit - 4.11 - test - - - dom4j - dom4j - 1.6.1 - test - - - javassist - javassist - 3.4.GA - test - - - org.hibernate - hibernate-ehcache - 3.3.2.GA - test - - - ehcache - net.sf.ehcache - - - - - commons-logging - commons-logging - 1.1.1 - test - - - org.apache.derby - derby - 10.5.3.0_1 - test - - - org.mockito - mockito-core - 1.9.0 - test - - - com.sun.xsom - xsom - 20100725 - test - - - org.beanshell - bsh - 1.3.0 - test - - - org.quartz-scheduler - quartz - ${quartz.version} - - - org.easymock - easymock - 3.0 - test - - - org.powermock - powermock-api-easymock - 1.4.10 - test - - - org.powermock - powermock-module-junit4 - 1.4.10 - test - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.3.2 - - - - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.version} - - true - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8.1 - - - org.apache.maven.plugins - maven-checkstyle-plugin - 2.9.1 - - - org.apache.maven.plugins - maven-dependency-plugin - 2.8 - - - org.codehaus.mojo - build-helper-maven-plugin - 1.7 - - - org.apache.maven.plugins - maven-antrun-plugin - 1.3 - - - org.terracotta - maven-forge-plugin - ${maven-forge-plugin.version} - - -Djava.net.preferIPv4Stack=true - - - - org.apache.maven.plugins - maven-shade-plugin - 2.3 - - - org.terracotta.maven.plugins - terracotta-shader - 1.2 - - - - - org.codehaus.gmaven - gmaven-plugin - ${gmaven-plugin.version} - - - org.codehaus.mojo - rmic-maven-plugin - 1.1 - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.codehaus.mojo - javacc-maven-plugin - [2.6,) - - javacc - - - - - - - - - - - - - - - org.terracotta - maven-forge-plugin - - - generateBuildInfoFile - generate-resources - - buildinfo - - - true - ${project.build.outputDirectory} - - - - default-test - test - - test - - - - - - - - - - system-tests - - system-tests - - - - dist - - distribution - - - - - - check-short - - true - true - - - - - org.reflections - reflections-maven - 0.9.9-RC1 - - org.reflections.scanners.TypeAnnotationsScanner - ${project.build.directory}/reflections.xml - true - true - - - - - reflections - - process-test-classes - - - - - org.terracotta - maven-forge-plugin - - true - org.terracotta.test.categories.CheckShorts - - - java.awt.headless - true - - - - - - - - - - deploy-terracotta - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.1 - true - - - http://nexus.terracotta.eur.ad.sag - - terracotta-nexus-staging - ${skipDeploy} - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - - - - - - - deploy-sonatype - - - sonatype-nexus-staging - http://oss.sonatype.org/service/local/staging/deploy/maven2 - - - sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - - - - - - - terracotta-nexus-staging - Terracotta Nexus Staging Repository - ${terracotta-nexus-staging-url} - - - terracotta-os-snapshots - false - Terracotta OS Snapshots Repository - ${terracotta-os-snapshots-url} - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/pom.xml (revision 0) @@ -1,82 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache.internal - ehcache-terracotta-root - 2.10.7.0.37 - - - ehcache-terracotta-bootstrap - ehcache-terracotta-bootstrap - jar - - - false - - - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - provided - - - org.terracotta.toolkit - terracotta-toolkit-api-internal - - - com.terracotta - clustered-entity-management - - - org.mockito - mockito-core - test - - - junit - junit - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - - deploy-sonatype - - true - - - - Index: rctags/ehcache-2.10.7.0.37/ehcache-core/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/pom.xml (revision 0) @@ -1,617 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - - - net.sf.ehcache.internal - ehcache-core - jar - - ehcache-core - Internal ehcache-core module. This artifact is not meant to be used directly - - - Ehcache - UTF-8 - UTF-8 - 5 - src/test/java - src/test/resources - ehcache - false - - -Xmx64m - - - - - - org.slf4j - slf4j-api - - - org.terracotta.internal - statistics - - - - - javax.servlet - javax.servlet-api - - - org.hibernate - hibernate-core - - - javax.transaction - jta - - - net.sf.ehcache - sizeof-agent - - - - - org.slf4j - slf4j-jdk14 - - - org.codehaus.btm - btm - - - net.sf.hibernate - hibernate - - - org.hamcrest - hamcrest-core - - - org.hamcrest - hamcrest-library - - - junit - junit - - - dom4j - dom4j - - - javassist - javassist - - - org.hibernate - hibernate-ehcache - - - - commons-logging - commons-logging - - - org.apache.derby - derby - - - org.mockito - mockito-core - - - com.sun.xsom - xsom - - - org.beanshell - bsh - - - - - - - src/main/resources - true - - - ${project.build.directory}/generated-resources - false - - - ${basedir}/${testDir} - - - ${basedir}/src/main/config/jcache - - - ${basedir}/${testResources} - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - org.terracotta - maven-forge-plugin - - - build-info - generate-resources - - buildinfo - - - ${basedir}/.. - - - - - - - - - org.terracotta - maven-forge-plugin - - pertest - ${tests.supplemental.args} ${tests.max.heap.size} - false - false - true - plain - false - - true - ${net.sf.ehcache.speedAdjustmentFactor} - ${project.build.directory} - true - - - net.sf.ehcache:sizeof-agent - - - - - - default-test - - - **/*$* - **/*PerfTest.java - **/*PerfTest*.java - **/Abstract*Test.java - - - - - integration-test-execution - integration-test - - test - - - ${checkshort} - false - - **/*$* - - - **/IT*.java - **/*IT.java - **/*ITCase.java - - ${tests.supplemental.args} -Xms512m -Xmx512m - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - - verify - - checkstyle - - - - - ${basedir}/checkstyle/checkstyle.xml - ${basedir}/checkstyle/suppressions.xml - ${basedir}/checkstyle/ClassHeader.txt - ${skipCheckstyle} - false - false - true - true - true - false - true - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - generate-resources - copy-agent-jar-to-resources - - copy-dependencies - - - * - sizeof-agent - ${project.build.directory}/generated-resources/net/sf/ehcache/pool/sizeof/ - true - true - - - - - - org.codehaus.mojo - rmic-maven-plugin - - - rmi-compilation - compile - - rmic - - - - **/RMICachePeer.class - - ${project.build.outputDirectory} - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.codehaus.mojo - xml-maven-plugin - [1.0,) - - transform - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [1.0,) - - copy-dependencies - - - - - - - - - org.codehaus.gmaven - gmaven-plugin - [1.3,) - - execute - - - - - - - - - org.codehaus.mojo - rmic-maven-plugin - [1.1,) - - rmic - - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - [2.7,) - - checkstyle - - - - - - - - - - - - - - - - - skip-ehcache-core-deploy - - true - - - - staging - - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - deploy - - sign - - - - - - - - - perfTests - - - - org.terracotta - maven-forge-plugin - - - - default-test - - ${tests.supplemental.args} -Xmx512m - - **/*PerfTest.java - **/*PerfTest*.java - - - **/*$* - **/Abstract*Test.java - - - - - - - - - - - buildnumber-git - - - - org.codehaus.mojo - buildnumber-maven-plugin - 1.0-beta-3 - - - generate-resources - - create - - - - - false - false - {0,date,yyyy-MM-dd_HH-mm}_{1} - - timestamp - ${user.name} - - - - - - - - - - no-interruptible-io-solaris - - - java.vendor - Sun Microsystems Inc. - - - - -XX:-UseVMInterruptibleIO - - - - enable-system-gc-jrockit - - - java.vm.name - Oracle JRockit(R) - - - - -XXfullSystemGC -Xverbose:systemgc - - - - ibmj9 - - - java.vm.name - IBM J9 VM - - - - -Xenableexplicitgc - -Xmx256m - - - - - - test-nonstopcache - - - - org.terracotta - maven-forge-plugin - - - **/nonstop/*Test.java - - - **/*$* - - - - java.awt.headless - true - - - - - - - - - - - fast - - true - - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - false - - - true - - - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - true - - - false - - - - - - jboss-releases - http://repository.jboss.org/nexus/content/groups/public-jboss - - true - - - false - - - - - - Java.net Maven 2 - http://download.java.net/maven/2 - - true - - - false - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - false - - - true - - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - true - - - false - - - - - - Index: rctags/ehcache-2.10.7.0.37/distribution/events/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/distribution/events/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/distribution/events/pom.xml (revision 0) @@ -1,299 +0,0 @@ - - 4.0.0 - - org.terracotta.forge - forge-parent - 4.0 - - - net.sf.ehcache.examples - events - 2.10.7.0.37 - events - war - Clustered Ehcache Terracotta as second level cache for Hibernate - - 2.1.0 - 4.3.7.0.35 - 1.1.116 - 9.4.11.v20180605 - 1.1 - true - - - - org.slf4j - slf4j-api - 1.7.25 - - - org.slf4j - slf4j-log4j12 - 1.7.25 - - - javassist - javassist - 3.8.0.GA - - - h2 - ${h2.version} - com.h2database - - - net.sf.ehcache - ehcache - ${project.version} - - - org.terracotta - terracotta-toolkit-runtime - ${terracotta.version} - - - commons-logging - commons-logging - 1.1 - compile - - - log4j - log4j - - - logkit - logkit - - - avalon-framework - avalon-framework - - - javax.servlet - servlet-api - - - - - gf-40 - gf.javax.servlet-api - 3.1.0 - - - org.hibernate - hibernate-core - 3.3.1.GA - - - org.slf4j - slf4j-api - - - javax.transaction - jta - - - - - gf-3122 - gf.javax.transaction - 1.1 - - - - ${project.name} - - - maven-assembly-plugin - 2.3 - - ${project.name} - - src/assemble/distribution.xml - - gnu - - - - package - - single - - - - - - maven-jetty-plugin - ${jetty.version} - org.mortbay.jetty - - ${name} - STOP - - - - hibernate3-maven-plugin - 2.1 - org.codehaus.mojo - - - target/classes/hibernate3hbm2ddl.properties - target/classes/hibernate.cfg.xml - true - true - schema.sql - - - - - com.h2database - h2 - ${h2.version} - - - - - org.terracotta.maven.plugins - tc-maven-plugin - ${tc-maven-plugin.version} - - - org.terracotta - terracotta - ${terracotta.version} - - - - - - - - start-h2 - - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - org.h2.tools.Server - - -tcp - -tcpAllowOthers - - - - - - - - stop-h2 - - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - - org.h2.tools.Server - - -tcpShutdown - tcp://localhost:9092 - - - - - - - - 9081 - - - - maven-jetty-plugin - ${jetty.version} - org.mortbay.jetty - - - - jetty.port - 9081 - - - 9981 - - - - - - - 9082 - - - - maven-jetty-plugin - ${jetty.version} - org.mortbay.jetty - - - - jetty.port - 9082 - - - 9982 - - - - - - - sag-deps - - - sag-deps - true - - - - - - - org.terracotta - maven-forge-plugin - - - com.softwareag.ibit.tools.util - finder - 3.0 - compile - - - - - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/TestCategories.properties =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/TestCategories.properties (revision 10990) +++ rctags/ehcache-2.10.7.0.37/TestCategories.properties (revision 0) @@ -1,328 +0,0 @@ -net.sf.ehcache.AutoVersioningElementTest=production -net.sf.ehcache.CacheClassicLruMemoryStoreTest=production -net.sf.ehcache.CacheCopyOnRwPoolTest=production -net.sf.ehcache.CacheCopyOnRwReplaceRemoveTest=production -net.sf.ehcache.CacheExceptionTest=production -net.sf.ehcache.CacheManagerTest=production -net.sf.ehcache.CachePinningTest=production -net.sf.ehcache.CachePoolPinningTest=production -net.sf.ehcache.CacheTest=production -net.sf.ehcache.ChrisCachePerformanceTest=production -net.sf.ehcache.ClockMemoryStoreTest=production -net.sf.ehcache.DiskStoreTest=production -net.sf.ehcache.DynamicCacheConfigurationTest=production -net.sf.ehcache.ElementTest=production -net.sf.ehcache.ExplicitMaxInMemoryTest=production -net.sf.ehcache.InfiniteCapacityCacheTest=production -net.sf.ehcache.MemoryStoreTester=production -net.sf.ehcache.OverflowCacheTest=production -net.sf.ehcache.PoolCacheManagerTest=production -net.sf.ehcache.RecalculateSizeTest=production -net.sf.ehcache.SameCacheManagerNameTest=production -net.sf.ehcache.StatisticsTest=production -net.sf.ehcache.TerracottaIntegrationTest=production -net.sf.ehcache.XACacheTest=production -net.sf.ehcache.concurrent.ConcurrencyUtilTest=production -net.sf.ehcache.concurrent.ConcurrentCacheMethodsTest=production -net.sf.ehcache.config.CacheConfigConflictTest=production -net.sf.ehcache.config.CacheConfigurationListenerTest=production -net.sf.ehcache.config.CacheConfigurationTest=production -net.sf.ehcache.config.CacheWriterConfigurationTest=production -net.sf.ehcache.config.CoherenceModeConfigTest=production -net.sf.ehcache.config.ConfigurationFactoryTest=production -net.sf.ehcache.config.ConfigurationHelperTest=production -net.sf.ehcache.config.DefaultCacheOptionalTest=production -net.sf.ehcache.config.DynamicCacheConfigurationValidityTest=production -net.sf.ehcache.config.InvalidConfigTest=production -net.sf.ehcache.config.MemoryUnitTest=production -net.sf.ehcache.config.SchemaValidationTest=production -net.sf.ehcache.config.StorageStrategyConfigTest=production -net.sf.ehcache.config.generator.AllConfigurationGeneratedTest=production -net.sf.ehcache.config.generator.ConfigurationGeneratedParsesTest=production -net.sf.ehcache.config.generator.DecoratedCacheConfigTest=production -net.sf.ehcache.config.nonstop.NonStopConfigTest=production -net.sf.ehcache.config.nonstop.NonstopInheritsDefaultConfigTest=production -net.sf.ehcache.constructs.CacheDecoratorFactoryTest=production -net.sf.ehcache.constructs.DecoratorNoNameTest=production -net.sf.ehcache.constructs.DefaultCacheDecoratorFactoryTest=production -net.sf.ehcache.constructs.blocking.BlockingCacheTest=production -net.sf.ehcache.constructs.blocking.SelfPopulatingCacheTest=production -net.sf.ehcache.constructs.blocking.UpdatingSelfPopulatingCacheTest=production -net.sf.ehcache.constructs.locking.ExplicitLockApiTest=production -net.sf.ehcache.constructs.nonstop.BasicNonstopTest=production -net.sf.ehcache.constructs.nonstop.ExecutorServiceTest=production -net.sf.ehcache.constructs.nonstop.NonStopThreadDestroyedTest=production -net.sf.ehcache.constructs.nonstop.NonstopTestUtil=production -net.sf.ehcache.constructs.nonstop.TimeoutOnRejoinTest=production -net.sf.ehcache.distribution.EventMessageTest=production -net.sf.ehcache.distribution.ManualRMIPeerProviderTest=production -net.sf.ehcache.distribution.MulticastRMIPeerProviderTest=production -net.sf.ehcache.distribution.PayloadUtilTest=production -net.sf.ehcache.distribution.RMIBootstrapCacheLoaderTest=production -net.sf.ehcache.distribution.RMICacheManagerPeerListenerTest=production -net.sf.ehcache.distribution.RMICacheManagerPeerTest=production -net.sf.ehcache.distribution.RMICacheReplicatorTest=production -net.sf.ehcache.distribution.RMICacheReplicatorWithLargePayloadTest=production -net.sf.ehcache.distribution.RMIDistributedCacheTest=production -net.sf.ehcache.distribution.ShutdownRMICacheManagerPeerListenerTestImpl=production -net.sf.ehcache.event.BulkOpsEventListenerTest=production -net.sf.ehcache.event.CacheEventListenerTest=production -net.sf.ehcache.event.CacheManagerEventListenerTest=production -net.sf.ehcache.event.EvictionListenerTest=production -net.sf.ehcache.event.ProgrammaticallyCreatedCacheEventListenerTest=production -net.sf.ehcache.event.TestCacheManagerEventListenerFactory=production -net.sf.ehcache.exceptionhandler.CacheExceptionHandlerTest=production -net.sf.ehcache.extension.CacheExtensionTest=production -net.sf.ehcache.extension.TestCacheExtension=production -net.sf.ehcache.extension.TestCacheExtensionFactory=production -net.sf.ehcache.hibernate.EhCacheRegionFactoryTest=production -net.sf.ehcache.hibernate.HibernateAPIUsageTest=production -net.sf.ehcache.hibernate.HibernateCacheTest=production -net.sf.ehcache.hibernate.management.impl.EhcacheStatsImplTest=production -net.sf.ehcache.loader.CacheLoaderTest=production -net.sf.ehcache.loader.CompositeLoaderTest=production -net.sf.ehcache.management.ManagementServiceTest=production -net.sf.ehcache.management.ResourceClassLoaderTest=production -net.sf.ehcache.management.sampled.MBeanRegistrationProviderTest=production -net.sf.ehcache.pool.PoolableStoresTest=production -net.sf.ehcache.pool.TwinCachesTest=production -net.sf.ehcache.pool.sizeof.AgentLoaderRaceTest=production -net.sf.ehcache.pool.sizeof.AgentLoaderSystemPropTest=production -net.sf.ehcache.pool.sizeof.AgentLoaderTest=production -net.sf.ehcache.pool.sizeof.FilteredSizeOfTest=production -net.sf.ehcache.pool.sizeof.ObjectGraphWalkerTest=production -net.sf.ehcache.pool.sizeof.SizeOfTest=production -net.sf.ehcache.pool.sizeof.filter.AnnotationProxyFactoryTest=production -net.sf.ehcache.search.BasicSearchTest=production -net.sf.ehcache.search.QueryExamplesTest=production -net.sf.ehcache.search.SearchTestUtil=production -net.sf.ehcache.search.TestAttributeExtractor=production -net.sf.ehcache.search.TransactionalSearchTest=production -net.sf.ehcache.search.attribute.JavaBeanAttributeExtractorTest=production -net.sf.ehcache.search.attribute.ReflectionAttributeExtractorTest=production -net.sf.ehcache.servermaplocalcache.ServerMapLocalCacheTest=production -net.sf.ehcache.statistics.CacheUsageListenerTest=production -net.sf.ehcache.statistics.DisabledCacheStatisticsTest=production -net.sf.ehcache.statistics.LiveCacheStatisticsTest=production -net.sf.ehcache.store.CacheKeySetTest=production -net.sf.ehcache.store.DiskBackedMemoryStoreTest=production -net.sf.ehcache.store.DiskStoreBootstrapCacheLoaderFactoryTest=production -net.sf.ehcache.store.ElementIdAssigningStoreTest=production -net.sf.ehcache.store.FifoMemoryStoreTest=production -net.sf.ehcache.store.InitialCapacityTest=production -net.sf.ehcache.store.LruClassicMemoryStoreTest=production -net.sf.ehcache.store.LruMemoryStoreTest=production -net.sf.ehcache.store.MemoryOnlyStoreTest=production -net.sf.ehcache.store.MemoryStorePinningTest=production -net.sf.ehcache.store.MemoryStorePoolingTest=production -net.sf.ehcache.store.OffheapStoreInOssTest=production -net.sf.ehcache.store.PoolableMemoryStoreTest=production -net.sf.ehcache.store.XATransactionalStoreTest=production -net.sf.ehcache.store.chm.SelectableConcurrentHashMapTest=production -net.sf.ehcache.store.compound.PartialSerializationCopyStrategyTest=production -net.sf.ehcache.store.compound.TCCLReadWriteSerializationCopyStrategyTest=production -net.sf.ehcache.store.disk.DiskBackMemoryStoreTest=production -net.sf.ehcache.store.disk.DiskStorePoolingTest=production -net.sf.ehcache.store.disk.DiskStoreTest=production -net.sf.ehcache.store.disk.ods.FileAllocationTreeTest=production -net.sf.ehcache.terracotta.BasicRejoinTest=production -net.sf.ehcache.terracotta.BootstrapCacheTest=quarantined -net.sf.ehcache.terracotta.EventReplicationTest=production -net.sf.ehcache.terracotta.KeySnapshotterTest=production -net.sf.ehcache.terracotta.RejoinEventSequenceTest=production -net.sf.ehcache.terracotta.RotatingSnapshotFileTest=production -net.sf.ehcache.terracotta.StorageStrategyInvalidConfigurationTest=production -net.sf.ehcache.terracotta.TerracottaBootstrapCacheLoaderTest=production -net.sf.ehcache.terracotta.TerracottaUnitTesting=production -net.sf.ehcache.terracotta.TerracottaWithLocalOffHeapTest=production -net.sf.ehcache.terracotta.TestRejoinStore=production -net.sf.ehcache.transaction.SoftLockPinningTest=production -net.sf.ehcache.transaction.local.LocalTransactionSizeOfTest=production -net.sf.ehcache.transaction.local.LocalTransactionTest=production -net.sf.ehcache.transaction.xa.TwoPCTest=production -net.sf.ehcache.transaction.xa.XAThreadPoolTest=production -net.sf.ehcache.transaction.xa.XATransactionSizeOfTest=production -net.sf.ehcache.transaction.xa.XATransactionTest=production -net.sf.ehcache.util.LargeCollectionTest=production -net.sf.ehcache.util.MemoryEfficientByteArrayOutputStreamTest=production -net.sf.ehcache.util.MemorySizeParserTest=production -net.sf.ehcache.util.ProductInfoTest=production -net.sf.ehcache.util.SlewClockTest=production -net.sf.ehcache.util.SmokeTests=production -net.sf.ehcache.util.TimestamperTest=production -net.sf.ehcache.util.UpdateCheckerTest=production -net.sf.ehcache.util.WeakIdentityConcurrentMapTest=production -net.sf.ehcache.writer.CacheWriterTest=production -net.sf.ehcache.writer.CoalesceKeysFilterTest=production -net.sf.ehcache.writer.TestCacheWriter=production -net.sf.ehcache.writer.TestCacheWriterException=production -net.sf.ehcache.writer.TestCacheWriterFactory=production -net.sf.ehcache.writer.TestCacheWriterRetries=production -net.sf.ehcache.writer.TestCacheWriterSlow=production -org.terracotta.ehcache.tests.BasicAtomikosXATest=quarantined -org.terracotta.ehcache.tests.BasicBTMXATest=quarantined -org.terracotta.ehcache.tests.BasicStandaloneCacheAndServerTopologyTest=production -org.terracotta.ehcache.tests.BasicStandaloneCacheTest=production -org.terracotta.ehcache.tests.BasicWriteBehindTest=quarantined -org.terracotta.ehcache.tests.CacheBlockingQueueTest=quarantined -org.terracotta.ehcache.tests.CacheConsistencyTest=production -org.terracotta.ehcache.tests.CacheLocksTest=quarantined -org.terracotta.ehcache.tests.CacheWriterBTMXATest=quarantined -org.terracotta.ehcache.tests.ClusterCacheEventsRejoinEnabledTest=quarantined -org.terracotta.ehcache.tests.ClusterEventsRejoinEnabledTest=quarantined -org.terracotta.ehcache.tests.ClusterEventsTest=production -org.terracotta.ehcache.tests.ClusteredCacheRemovalTest=quarantined -org.terracotta.ehcache.tests.CoalescingWriteBehindTest=quarantined -org.terracotta.ehcache.tests.CompressedCacheTest=production -org.terracotta.ehcache.tests.ConcurrencyValueTest=quarantined -org.terracotta.ehcache.tests.CopyOnWriteTest=production -org.terracotta.ehcache.tests.DoubleConfigStandaloneCacheTest=production -org.terracotta.ehcache.tests.EmbeddedConfigNamespaceStandaloneCacheTest=production -org.terracotta.ehcache.tests.EmbeddedConfigStandaloneCacheTest=production -org.terracotta.ehcache.tests.EmbeddedEhcacheJarTest=production -org.terracotta.ehcache.tests.EmbeddedEhcacheJarTestClient=production -org.terracotta.ehcache.tests.ExpiryListenerTest=production -org.terracotta.ehcache.tests.ExplicitlyUnclusteredStandaloneCacheTest=production -org.terracotta.ehcache.tests.ExpressShutdownTest=production -org.terracotta.ehcache.tests.GetKeysSerializedCacheTest=production -org.terracotta.ehcache.tests.HibernateExpressShutdownTest=production -org.terracotta.ehcache.tests.LocalTxTest=production -org.terracotta.ehcache.tests.MemoryStoreEvictionPolicyTest=production -org.terracotta.ehcache.tests.MixedCacheTest=production -org.terracotta.ehcache.tests.NamelessCacheManagerStandaloneCacheTest=production -org.terracotta.ehcache.tests.NoTcConfigStandaloneCacheTest=production -org.terracotta.ehcache.tests.OtherClassLoaderEventTest=production -org.terracotta.ehcache.tests.OtherClassloaderCacheTest=production -org.terracotta.ehcache.tests.OverflowToDiskStandaloneCacheTest=production -org.terracotta.ehcache.tests.SerializationWriteBehindTest=production -org.terracotta.ehcache.tests.SerializedArrayCacheTest=production -org.terracotta.ehcache.tests.SuspendResumeAtomikosXATest=production -org.terracotta.ehcache.tests.SuspendResumeBTMXATest=production -org.terracotta.ehcache.tests.SynchronousWriteBehindTest=production -org.terracotta.ehcache.tests.SystemPropTcConfigTest=production -org.terracotta.ehcache.tests.ThreadLocalTest=production -org.terracotta.ehcache.tests.TwoResourceAtomikosXATest=production -org.terracotta.ehcache.tests.TwoResourceBTMXATest=production -org.terracotta.ehcache.tests.TwoResourceSuspendResumeAtomikosXATest=production -org.terracotta.ehcache.tests.TwoResourceSuspendResumeBTMXATest=production -org.terracotta.ehcache.tests.UrlConfigStandaloneCacheTest=production -org.terracotta.ehcache.tests.XAResourceTest=production -org.terracotta.ehcache.tests.coherence.CacheCoherenceExpressTest=quarantined -org.terracotta.ehcache.tests.coherence.IncoherentNodesTest=quarantined -org.terracotta.ehcache.tests.coherence.RestartingL1ExpressTest=quarantined -org.terracotta.ehcache.tests.container.BasicContainerJTATest=production -org.terracotta.ehcache.tests.container.BasicContainerTest=production -org.terracotta.ehcache.tests.container.BasicJTATestServlet=production -org.terracotta.ehcache.tests.container.BasicTestServlet=production -org.terracotta.ehcache.tests.container.EARContainerTest=production -org.terracotta.ehcache.tests.container.TwoResourceContainerJTATest=production -org.terracotta.ehcache.tests.container.TwoResourceJTATestServlet=production -org.terracotta.ehcache.tests.container.hibernate.BaseClusteredRegionFactoryTest=production -org.terracotta.ehcache.tests.container.hibernate.BaseClusteredRegionFactoryTestServlet=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.EhCacheClusteredHibernateCacheTest=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.EmptySecondLevelCacheEntryTest=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.KeyDeserializationSecondLevelCacheEntryTest=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.KeyDeserializationSecondLevelCacheEntryTestServlet=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.NonEternalSecondLevelCacheTest=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.NonEternalSecondLevelCacheTestServlet=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.NonTransactionalCacheTest=production -org.terracotta.ehcache.tests.container.hibernate.nontransactional.QueryCacheInvalidationTest=production -org.terracotta.ehcache.tests.loader.LoaderTest=production -org.terracotta.ehcache.tests.servermap.BasicServerMapExpressCacheTest=production -org.terracotta.ehcache.tests.servermap.BasicServerMapExpressTestHelper=production -org.terracotta.ehcache.tests.servermap.CacheSizeTest=production -org.terracotta.ehcache.tests.servermap.LockGCNotFlushingEntriesTest=production -org.terracotta.ehcache.tests.servermap.LockGCNotFlushingEntriesTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapCapacityEvictionExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapCapacityEvictionExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapClearExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapClearExpressTestClient1=production -org.terracotta.ehcache.tests.servermap.ServerMapClearExpressTestClient2=production -org.terracotta.ehcache.tests.servermap.ServerMapClearTestHelper=production -org.terracotta.ehcache.tests.servermap.ServerMapElementTTIExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapElementTTIExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapElementTTLExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapElementTTLExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapL1CapacityEvictionExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapL1CapacityEvictionExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapL1CapacityExpirationExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapL1CapacityExpirationExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapL1EvictionOffHeapDestroyExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapL1EvictionOffHeapDestroyExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapL2EvictionReachesL1Test=production -org.terracotta.ehcache.tests.servermap.ServerMapL2EvictionReachesL1TestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapL2EvictionReachesOneL1Test=production -org.terracotta.ehcache.tests.servermap.ServerMapL2EvictionReachesOneL1TestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapLocalSizeTest=production -org.terracotta.ehcache.tests.servermap.ServerMapTTIExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapTTIExpressTestClient=production -org.terracotta.ehcache.tests.servermap.ServerMapTTLExpressTest=production -org.terracotta.ehcache.tests.servermap.ServerMapTTLExpressTestClient=production -org.terracotta.modules.ehcache.LocalVMResourcesTestUtil=production -org.terracotta.modules.ehcache.bulkops.BulkOpsBasicSerializationSanityTest=production -org.terracotta.modules.ehcache.bulkops.BulkOpsExplictLockingTest=production -org.terracotta.modules.ehcache.bulkops.BulkOpsGenericSanityTest=production -org.terracotta.modules.ehcache.bulkops.GetAllCustomMapTest=production -org.terracotta.modules.ehcache.bulkops.GetAllNonLiteralTest=production -org.terracotta.modules.ehcache.bulkops.GetAllTest=production -org.terracotta.modules.ehcache.cluster.CacheClusterTest=production -org.terracotta.modules.ehcache.cluster.ClusterTopologyListenerTest=production -org.terracotta.modules.ehcache.cluster.FailoverDuringPassiveSyncTest=production -org.terracotta.modules.ehcache.cluster.FailoverToOutOfSyncPassivesTest=production -org.terracotta.modules.ehcache.coherence.CacheCoherenceTest=production -org.terracotta.modules.ehcache.coherence.CacheCoherenceTestL1Client=production -org.terracotta.modules.ehcache.coherence.GetSizeTest=production -org.terracotta.modules.ehcache.coherence.NoLocksCreatedEventualTest=production -org.terracotta.modules.ehcache.coherence.NoLocksCreatedTest=production -org.terracotta.modules.ehcache.event.ClusterTopologyTest=production -org.terracotta.modules.ehcache.event.ClusteredEventsAllTest=production -org.terracotta.modules.ehcache.event.ClusteredEventsEvictionExpiryTest=production -org.terracotta.modules.ehcache.event.ClusteredEventsLocalTest=production -org.terracotta.modules.ehcache.event.ClusteredEventsRemoteTest=production -org.terracotta.modules.ehcache.event.ClusteredEventsSerializationTest=production -org.terracotta.modules.ehcache.l1bm.L1BMCacheManagerRecreateTest=production -org.terracotta.modules.ehcache.l1bm.L1BMCacheStatisticsTest=production -org.terracotta.modules.ehcache.l1bm.L1BMDynamicConfigurationTest=production -org.terracotta.modules.ehcache.l1bm.L1BMOnHeapActivePassiveSanityTest=production -org.terracotta.modules.ehcache.l1bm.L1BMOnHeapBasicSanityTestApp=production -org.terracotta.modules.ehcache.l1bm.L1BMOnHeapReadWriteTest=production -org.terracotta.modules.ehcache.l1bm.L1BMOnHeapSanityTest=production -org.terracotta.modules.ehcache.l1bm.L1BMOnHeapWithTTISanityTest=production -org.terracotta.modules.ehcache.l1bm.L1BMOnHeapWithTTLSanityTest=production -org.terracotta.modules.ehcache.l1bm.L1BMUpdateInvalidatedEntryTest=production -org.terracotta.modules.ehcache.store.BasicCacheSyncWriteTest=production -org.terracotta.modules.ehcache.store.BasicCacheTest=production -org.terracotta.modules.ehcache.store.BlockingCacheTest=production -org.terracotta.modules.ehcache.store.CachePinningTest=production -org.terracotta.modules.ehcache.store.ClassicIsInvalidTest=production -org.terracotta.modules.ehcache.store.ConcurrentCacheMethodsTest=production -org.terracotta.modules.ehcache.store.CopyOnReadTest=production -org.terracotta.modules.ehcache.store.DCV2ConfigurationChangePropagationTest=production -org.terracotta.modules.ehcache.store.DynamicCacheConfigurationTest=production -org.terracotta.modules.ehcache.store.EvictionListenerTest=production -org.terracotta.modules.ehcache.store.ExpirationListenerTest=production -org.terracotta.modules.ehcache.store.GetKeysSerializedCacheTest=production -org.terracotta.modules.ehcache.store.InlineExpirationTest=production -org.terracotta.modules.ehcache.store.LocalBufferedMapTest=production -org.terracotta.modules.ehcache.store.LocalReadsGetKeysTest=production -org.terracotta.modules.ehcache.store.NoCacheWithMaxBytesLocalDiskTest=production -org.terracotta.modules.ehcache.store.PinnedCacheTest=production -org.terracotta.modules.ehcache.store.PrimitiveClassTest=production -org.terracotta.modules.ehcache.store.ProgrammaticCacheTest=production -org.terracotta.modules.ehcache.store.ProgrammaticConfigTest=production -org.terracotta.modules.ehcache.store.SampledStatisticTimerTest=production -org.terracotta.modules.ehcache.store.SerializedCacheCopyOnReadTest=production -org.terracotta.modules.ehcache.store.SerializedCacheTest=production -org.terracotta.modules.ehcache.store.ServerMapBasicCacheTest=production -org.terracotta.modules.ehcache.store.SimpleVersionTest=production -org.terracotta.modules.ehcache.store.StorageStrategyNotSupportedTest=production -org.terracotta.modules.ehcache.store.TTICacheTest=production -org.terracotta.modules.ehcache.store.TTLCacheTest=production -org.terracotta.modules.ehcache.store.TotalCapacityTest=production -org.terracotta.modules.ehcache.store.backend.BulkLoadInternalKeyRepresentationExposedTest=production -org.terracotta.modules.ehcache.writebehind.AsyncWriteBehindTest=production -org.terracotta.modules.ehcache.writebehind.BasicWriteBehindTest=production -org.terracotta.modules.ehcache.writebehind.CacheSeparationWriteBehindTest=production -org.terracotta.modules.ehcache.writebehind.CoalescingWriteBehindTest=production -org.terracotta.modules.ehcache.writebehind.RemovingCacheWriteBehindTest=production -org.terracotta.modules.ehcache.writebehind.SerializationWriteBehindTest=production Index: rctags/ehcache-2.10.7.0.37/third-party.txt =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/third-party.txt (revision 10990) +++ rctags/ehcache-2.10.7.0.37/third-party.txt (revision 0) @@ -1,5 +0,0 @@ -This project depends on repackaged GlassFish libraries. -They can be identified by their groupId starting with gf-*. - -The source code for these libraries can be found at https://svn.java.net/svn/glassfish~svn/. -Otherwise contact to get the source code for these libraries. \ No newline at end of file Index: rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-impl-v1/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-impl-v1/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-impl-v1/pom.xml (revision 0) @@ -1,113 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.7.0.37 - .. - - - management-ehcache-impl-v1 - management-ehcache-impl-v1 - A product library integrating with ehcache to construct the relevant management resource entities V1 - - - - net.sf.ehcache - management-ehcache-v1 - ${project.version} - - - net.sf.ehcache - management-ehcache-common - ${project.version} - - - org.terracotta - management-core-resources - ${management-core.version} - test-jar - test - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - provided - - - gf-40 - gf.javax.servlet-api - - - org.easymock - easymock - test - - - org.eclipse.jetty - jetty-servlet - test - - - org.mockito - mockito-core - test - - - org.powermock - powermock-api-easymock - test - - - org.powermock - powermock-module-junit4 - test - - - org.hamcrest - hamcrest-all - 1.3 - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/README.txt =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/README.txt (revision 10990) +++ rctags/ehcache-2.10.7.0.37/README.txt (revision 0) @@ -1,18 +0,0 @@ -1. To compile: - %> mvn install -DskipTests - -Note: the final Ehcache jar is found under ehcache/target - - -2. To build Ehcache distribution kit: - - %> cd distribution - - %> mvn package (build without an embedded Terracotta kit, lean and mean Ehcache kit) - - %> mvn package -Dtc-kit-url=http://url/to/teracotta.tar.gz (built with Terracotta kit, offical distribution kit) - -3. To deploy Maven central repo (via Sonatype) - - %> mvn clean deploy -P sign-artifacts,deploy-sonatype -DskipTests - \ No newline at end of file Index: rctags/ehcache-2.10.7.0.37/management-ehcache-impl/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-impl/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-impl/pom.xml (revision 0) @@ -1,43 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - .. - - - management-ehcache-impl-parent - management-ehcache-impl-parent - pom - - - management-ehcache-impl-v1 - management-ehcache-impl-v2 - management-ehcache-common - ehcache-rest-agent - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/management-ehcache-impl/ehcache-rest-agent/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-impl/ehcache-rest-agent/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-impl/ehcache-rest-agent/pom.xml (revision 0) @@ -1,249 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.7.0.37 - .. - - - net.sf.ehcache.internal - ehcache-rest-agent - ehcache-rest-agent - - Ehcache REST implementation - - - rest-management-private-classpath - .class_terracotta - true - false - - - - - net.sf.ehcache - management-ehcache-impl-v1 - ${project.version} - - - net.sf.ehcache - management-ehcache-impl-v2 - ${project.version} - - - gf-40 - gf.javax.servlet-api - 3.1.0 - - - org.eclipse.jetty - jetty-servlet - - - javax.xml.bind - jaxb-api - 2.3.0 - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.6,) - - list - - - - - - - - - - - - - - - - - devmode - - - devmode - true - - true - - - - .class - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - list-dependencies - - ${project.build.outputDirectory}/META-INF/devmode/${project.groupId}/${project.artifactId}/dependencies.txt - - - list - - compile - - - - - - org.apache.maven.plugins - maven-shade-plugin - - reduced-pom-only-shader - ${project.build.directory}/dependency-reduced-pom.xml - true - true - false - false - - - - org.slf4j:* - - - - - - package - - shade - - - - - - - - - - fullmode - - - devmode - false - - - - - - org.apache.maven.plugins - maven-shade-plugin - - record-shader - ${project.build.directory}/dependency-reduced-pom.xml - true - true - false - true - - - - org.slf4j:* - - - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - - - - package - - shade - - - - - - org.codehaus.gmaven - gmaven-plugin - - - fix-content - package - - execute - - - - ${basedir}/src/scripts - - - import Util - Util.packageAgentJar(project) - - - - - - - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/management-ehcache-v1/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-v1/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-v1/pom.xml (revision 0) @@ -1,72 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - .. - - - management-ehcache-v1 - management-ehcache-v1 - A library defining the ehcache management resource services and resource entities, version 1 - - - - org.terracotta - management-common-resources-v1 - ${management-core.version} - - - - - junit - junit - test - - - org.easymock - easymock - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/ehcache-search-parser/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-search-parser/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-search-parser/pom.xml (revision 0) @@ -1,53 +0,0 @@ - - - 4.0.0 - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - .. - - - net.sf.ehcache.internal - ehcache-search-parser - ehcache-search-parser - A parser for Big Memory Structured Query Language. - - - - - org.codehaus.mojo - javacc-maven-plugin - 2.6 - - - javacc - - javacc - - - - - - - - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - - - junit - junit - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - Index: rctags/ehcache-2.10.7.0.37/ehcache/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache/pom.xml (revision 0) @@ -1,443 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - .. - - - ehcache - jar - ehcache - Ehcache is an open source, standards-based cache used to boost performance, - offload the database and simplify scalability. Ehcache is robust, proven and full-featured and - this has made it the most widely-used Java-based cache. - - - - The Apache Software License, Version 2.0 - src/assemble/EHCACHE-CORE-LICENSE.txt - - - http://ehcache.org - - - - ${project.artifactId}-${project.version}-distribution - ${project.build.directory}/${kit.name} - ${project.build.directory}/tmp/terracotta - 1.4 - false - true - - - - - - net.sf.ehcache.internal - ehcache-terracotta-bootstrap - ${project.version} - - - net.sf.ehcache.internal - ehcache-rest-agent - ${project.version} - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - - - net.sf.ehcache.internal - ehcache-scheduled-refresh - ${project.version} - - - net.sf.ehcache.internal - ehcache-search-parser - ${project.version} - - - junit - junit - test - - - org.terracotta - product-upgradability-testing-utils - 0.9.2 - test - - - org.codehaus.btm - btm - 2.1.3 - test - - - org.quartz-scheduler - quartz - 2.2.1 - test - - - org.slf4j - slf4j-jdk14 - ${slf4j.version} - test - - - - - - - ${basedir}/src/main/resources - true - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-TIMs - - org.terracotta.modules - ${project.build.outputDirectory}/META-INF/terracotta/TIMs - **/META-INF/maven/**,**/license.txt,**/thirdpartylicenses.txt - - process-resources - - copy-dependencies - - - - - - org.terracotta - maven-forge-plugin - - - create-manifest - package - - manifest - - - ${basedir}/.. - ${project.build.directory}/MANIFEST.MF - - Apache Software License, Version 2.0 - Supported - ${project.artifactId} - ${project.description} - - - - - enforce-dependencies - - enforceDependencies - - verify - - net.sf.ehcache.internal - ehcache-core - ${project.version} - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.6,) - - list - - - - - - - - - - - - - - - - - devmode - - - devmode - true - - true - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - list-dependencies - - ${project.build.outputDirectory}/META-INF/devmode/${project.groupId}/${project.artifactId}/dependencies.txt - - - list - - compile - - - - - - - - - fullmode - - - devmode - false - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9 - - - create-javadoc - prepare-package - - jar - - - - - org.hibernate - hibernate-core - ${hibernate-core.version} - - - ${skipJavadoc} - true - 128m - 512 - true -
ehcache]]>
- ${project.name} ${project.version} API - ${project.name} ${project.version} API - Copyright 2001-{currentYear}, Terracotta, Inc. - ${basedir}/src/main/java/net/sf/ehcache/overview.html - true - - net.sf.ehcache.internal:ehcache-core - -
-
-
-
- - - org.apache.maven.plugins - maven-shade-plugin - - record-shader - true - true - - - net.sf.ehcache.internal:* - org.terracotta.internal:statistics - com.terracotta:clustered-entity-management - - - - - *:* - - META-INF/maven/com.terracotta/** - META-INF/maven/net.sf.ehcache.internal/** - META-INF/maven/org.terracotta.internal/** - **/license.txt - **/thirdpartylicenses.txt - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - **/LICENSE - **/LICENSE.txt - **/NOTICE - **/NOTICE.txt - **/ASL2.0 - **/DEPENDENCIES - - - - true - ${project.build.directory}/dependency-reduced-pom.xml - - - MANIFEST.MF - - - META-INF/MANIFEST.MF - ${project.build.directory}/MANIFEST.MF - - - - - - shade-jar - package - - shade - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.7 - - - unpack-jar-for-bundling - package - - run - - - - - - - - - - - org.apache.felix - maven-bundle-plugin - 2.3.7 - - ${project.build.directory} - - bitronix.tm;resolution:=optional, - bitronix.tm.resource.ehcache;resolution:=optional, - com.atomikos.*;resolution:=optional, - com.atomikos.icatch.jta;resolution:=optional, - weblogic.transaction;resolution:=optional, - javax.transaction;resolution:=optional, - javax.servlet;resolution:=optional, - javax.net.ssl;resolution:=optional, - javax.activation;resolution:=optional, - javax.xml.stream;resolution:=optional, - javax.xml.transform.sax;resolution:=optional, - javax.xml.transform.dom;resolution:=optional, - javax.xml.transform.stream;resolution:=optional, - org.hibernate.*;resolution:=optional, - org.terracotta.toolkit.*;resolution:=optional, - org.quartz.*;resolution:=optional, - org.terracotta.quartz.*;resolution:=optional, - !sun.misc,* - - net.sf.ehcache.* - org.terracotta.* - JavaSE-1.6 - - *;scope=provided|runtime - - - - generate-osgi-headers - package - - manifest - - - - - - org.codehaus.gmaven - gmaven-plugin - ${gmaven-plugin.version} - - - repackage-jar - package - - execute - - - - def jarFile = new File(project.build.directory, "${project.artifactId}-${project.version}.jar") - ant.copy(file: new File(project.build.directory, "dependency-reduced-pom.xml"), - tofile: new File(project.build.outputDirectory, "META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml")) - ant.jar(destfile: jarFile, basedir: new File(project.build.outputDirectory).getAbsolutePath(), manifest: new File(project.build.directory, "MANIFEST.MF")) - - - - - -
-
-
-
- - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - JIRA - https://jira.terracotta.org/jira/browse/EHC - - -
Index: rctags/ehcache-2.10.7.0.37/distribution/colorcache/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/distribution/colorcache/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/distribution/colorcache/pom.xml (revision 0) @@ -1,178 +0,0 @@ - - 4.0.0 - - org.terracotta.forge - forge-parent - 4.0 - - - net.sf.ehcache.examples - colorcache - 2.10.7.0.37 - colorcache - war - Clustered Ehcache sample with Terracotta - - 2.1.0 - 4.3.7.0.35 - true - - - ${project.name} - - - maven-assembly-plugin - 2.3 - - ${project.name} - - src/assemble/distribution.xml - - gnu - - - - package - - single - - - - - - maven-jetty-plugin - 9.4.11.v20180605 - org.eclipse.jetty - - ${project.name} - STOP - - - - org.terracotta.maven.plugins - tc-maven-plugin - ${tc-maven-plugin.version} - - - org.terracotta - terracotta - ${terracotta.version} - - - - - - - - net.sf.ehcache - ehcache - ${project.version} - - - org.terracotta - terracotta-toolkit-runtime - ${terracotta.version} - - - gf-40 - gf.javax.servlet-api - 3.1.0 - - - org.slf4j - slf4j-jdk14 - 1.7.25 - - - - - 9081 - - - - maven-jetty-plugin - 6.1.15 - org.mortbay.jetty - - - - jetty.port - 9081 - - - 9981 - - - - - - - 9082 - - - - maven-jetty-plugin - 6.1.15 - org.mortbay.jetty - - - - jetty.port - 9082 - - - 9982 - - - - - - - sag-deps - - - sag-deps - true - - - - - - - org.terracotta - maven-forge-plugin - - - com.softwareag.ibit.tools.util - finder - 3.0 - compile - - - - - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/management-ehcache-v2/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-v2/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-v2/pom.xml (revision 0) @@ -1,72 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - .. - - - management-ehcache-v2 - management-ehcache-v2 - A library defining the ehcache management resource services and resource entities, version 2 - - - - org.terracotta - management-common-resources-v2 - ${management-core.version} - - - - - junit - junit - test - - - org.easymock - easymock - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/terracotta/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/terracotta/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/terracotta/pom.xml (revision 0) @@ -1,74 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - - - net.sf.ehcache.internal - ehcache-terracotta-root - ehcache-terracotta-root - pom - - - bootstrap - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - false - - - true - - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - true - - - false - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - false - - - true - - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - true - - - false - - - - - - - deploy-sonatype - - true - - - - Index: rctags/ehcache-2.10.7.0.37/ehcache-scheduled-refresh/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-scheduled-refresh/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-scheduled-refresh/pom.xml (revision 0) @@ -1,46 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.7.0.37 - .. - - - ehcache-scheduled-refresh - net.sf.ehcache.internal - ehcache-scheduled-refresh - Ehcache functionality for Scheduled Refresh; uses the Quartz Job Scheduler - - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - - - org.quartz-scheduler - quartz - provided - - - org.slf4j - slf4j-jdk14 - provided - - - junit - junit - test - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - Index: rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-common/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-common/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/management-ehcache-impl/management-ehcache-common/pom.xml (revision 0) @@ -1,101 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.7.0.37 - .. - - - management-ehcache-common - management-ehcache-common - A common library shared between different management-ehcache implementation versions - - - false - - - - - org.terracotta - management-core-resources - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - provided - - - gf-40 - gf.javax.servlet-api - - - org.eclipse.jetty - jetty-servlet - - - junit - junit - test - - - commons-io - commons-io - 2.6 - test - - - org.easymock - easymock - test - - - org.mockito - mockito-core - test - - - org.powermock - powermock-api-easymock - test - - - org.powermock - powermock-module-junit4 - test - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/system-tests/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/system-tests/pom.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/system-tests/pom.xml (revision 0) @@ -1,325 +0,0 @@ - - 4.0.0 - - org.terracotta - system-tests-parent - 4.3.7.0.35 - - - net.sf.ehcache.internal - ehcache-terracotta-system-tests - 2.10.7.0.37 - ehcache-terracotta-system-tests - System tests for ehcache-terracotta - - 512m - 1024m - -XX:MaxPermSize=512m - true - true - 10.10.1.1 - 2.2.3 - 1.7.7 - 1.5 - - - - org.terracotta - terracotta - ${terracotta.core.version} - - - gf-40 - gf.javax.servlet-api - - - - - net.sf.ehcache - ehcache - ${project.version} - test - - - net.sf.ehcache - management-ehcache-v1 - ${project.version} - test - - - net.sf.ehcache - management-ehcache-v2 - ${project.version} - test - - - org.slf4j - slf4j-simple - ${slf4j.version} - - - org.terracotta - terracotta-toolkit-runtime - ${terracotta.core.version} - test - - - asm - asm - 3.2 - test - - - org.hibernate - hibernate-core - 3.3.2.GA - test - - - javassist - javassist - 3.8.0.GA - test - - - org.apache.derby - derby - ${derby.version} - test - - - org.apache.derby - derbynet - ${derby.version} - test - - - org.apache.derby - derbyclient - ${derby.version} - test - - - javax.transaction - jta - 1.1 - test - - - org.codehaus.btm - btm - 2.1.3 - test - - - org.apache.geronimo.specs - geronimo-jta_1.0.1B_spec - 1.0.1 - test - - - com.atomikos - transactions-jta - 3.8.0 - test - - - org.mockito - mockito-all - - - - - org.ow2.jotm - jotm-core - 2.1.9 - test - - - org.terracotta.test - container-test-framework - - - org.quartz-scheduler - quartz - ${quartz.version} - - - com.jayway.restassured - rest-assured - 1.8.1 - - - org.codehaus.groovy - groovy - - - org.hamcrest - * - - - com.fasterxml.jackson.core - jackson-databind - - - test - - - org.codehaus.groovy - groovy-all - 2.1.2 - test - - - net.sf.ehcache.test - hibernate-ehcache-bundle - ${osgi-test-tool.version} - - - org.terracotta.test - osgi-test-utils - ${osgi-test-tool.version} - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - test-jar - - test-jar - - - - - - org.apache.servicemix.tooling - depends-maven-plugin - 1.2 - - - generate-depends-file - - generate-depends-file - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - [2.8,) - - checkstyle - - - - - - - - - - - - - - - - include-container-tests - - - appserver - - - - - - org.terracotta - maven-forge-plugin - - - **/container/**/*Test.java - - - - - - - - no-appserver-tests - - - appserver - no-appserver - - - - - - org.terracotta - maven-forge-plugin - - -Xmx768m - -XX:MaxPermSize=128m - - **/*Test.java - - - - - - - - deploy-sonatype - - true - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - jboss - JBoss Repository - https://repository.jboss.org/nexus/content/repositories/public/ - - true - - - false - - - - - - terracotta-snapshots - http://www.terracotta.org/download/reflector/snapshots - - - terracotta-releases - http://www.terracotta.org/download/reflector/releases - - - Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/search/DynamicAttributeExtractorTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/search/DynamicAttributeExtractorTest.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/search/DynamicAttributeExtractorTest.java (revision 0) @@ -1,180 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.search; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import static junit.framework.Assert.*; - -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.config.CacheConfiguration; -import net.sf.ehcache.config.Configuration; -import net.sf.ehcache.config.SearchAttribute; -import net.sf.ehcache.config.Searchable; -import net.sf.ehcache.search.Person.Gender; -import net.sf.ehcache.search.aggregator.Aggregators; -import net.sf.ehcache.search.attribute.DynamicAttributesExtractor; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class DynamicAttributeExtractorTest { - - private CacheManager cm; - private Ehcache cache; - - private Attribute age; - private Attribute name; - private Attribute dept; - - private final Attribute gender = new Attribute("gender"); // dynamically extracted - - private final DynamicAttributesExtractor indexer = new DynamicAttributesExtractor() { - - @Override - public Map attributesFor(Element element) { - Person p = (Person) element.getObjectValue(); - return Collections.singletonMap("gender", p.getGender()); - } - }; - - @Before - public void setUp() throws Exception { - Configuration cfg = new Configuration(); - CacheConfiguration cacheCfg = new CacheConfiguration("searchCache", 1000); - Searchable s = new Searchable(); - s.keys(true); - s.allowDynamicIndexing(true); - s.addSearchAttribute(new SearchAttribute().name("age")); - s.addSearchAttribute(new SearchAttribute().name("name")); - s.addSearchAttribute(new SearchAttribute().name("department")); - cacheCfg.searchable(s); - cfg.addCache(cacheCfg); - - cm = new CacheManager(cfg); - cache = cm.getCache("searchCache"); - cache.registerDynamicAttributesExtractor(indexer); - SearchTestUtil.populateData(cache); - - age = cache.getSearchAttribute("age"); - dept = cache.getSearchAttribute("department"); - name = cache.getSearchAttribute("name"); - } - - @After - public void tearDown() throws Exception { - cm.shutdown(); - } - - private void verifyOrdered(Query q, int... expectedKeys) { - Results results = q.execute(); - assertEquals(expectedKeys.length, results.size()); - if (expectedKeys.length == 0) { - assertFalse(results.hasKeys()); - } else { - assertTrue(results.hasKeys()); - } - assertFalse(results.hasAttributes()); - - int i = 0; - for (Result result : results.all()) { - - int key = (Integer) result.getKey(); - assertEquals(expectedKeys[i++], key); - } - } - - private void verify(Query q, Integer... expectedKeys) { - Results results = q.execute(); - assertEquals(expectedKeys.length, results.size()); - if (expectedKeys.length == 0) { - assertFalse(results.hasKeys()); - } else { - assertTrue(results.hasKeys()); - } - assertFalse(results.hasAttributes()); - - Set keys = new HashSet(Arrays.asList(expectedKeys)); - for (Result result : results.all()) { - - int key = (Integer) result.getKey(); - if (!keys.remove(key)) { - throw new AssertionError("unexpected key: " + key); - } - } - } - - @Test - public void testBasicCriteria() { - Query q = cache.createQuery(); - q.addCriteria(gender.eq(Gender.MALE)); - q.includeKeys(); - verify(q, 1, 3, 4); - - q.addCriteria(age.lt(31)); - verify(q, 4); - - q = cache.createQuery(); - q.includeKeys(); - q.addCriteria(gender.ne(Gender.MALE).and(dept.ilike("eng?"))); - verify(q, 2); - - } - - @Test - public void testSorting() { - Query q = cache.createQuery().includeKeys(); - q.addOrderBy(gender, Direction.DESCENDING); - q.addOrderBy(name, Direction.ASCENDING); - verifyOrdered(q, 2, 3, 4, 1); - } - - @Test - public void testGroupBy() { - Query q = cache.createQuery().addGroupBy(gender); - q.includeAggregator(age.max()); - Results res = q.execute(); - assertEquals(2, res.size()); - } - - @Test - public void testAggregators() { - Query q = cache.createQuery().addCriteria(gender.eq(Gender.MALE)); - q.includeAggregator(Aggregators.count()); - q.addCriteria(dept.ilike("sales*").not()); - Results res = q.execute(); - assertEquals(1, res.size()); - assertEquals(3, res.all().get(0).getAggregatorResults().get(0)); - } - - @Test - public void testAttributeSelect() { - Query q = cache.createQuery().includeAttribute(gender, age).addCriteria(gender.ne(Gender.MALE)); - Results res = q.execute(); - assertEquals(1, res.size()); - Result r = res.all().get(0); - assertEquals(Gender.FEMALE, r.getAttribute(gender)); - assertEquals(23, r.getAttribute(age).intValue()); - } -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/constructs/blocking/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/constructs/blocking/package.html (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/constructs/blocking/package.html (revision 0) @@ -1,11 +0,0 @@ - - - - - Doug Lea in his book Concurrent Programming in Java talks about concurrency support constructs. - One meaning of a construct is "an abstract or general idea inferred or derived from specific instances". - Just like patterns emerge from noting the similarities of problems and gradually finding a solution to - classes of them, so to constructs are general solutions to commond problems. With the constructs package, - concrete, extensible implementations are offered to solve these common problems. - - Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/TerracottaConfigConfigurationElement.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/TerracottaConfigConfigurationElement.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/TerracottaConfigConfigurationElement.java (revision 0) @@ -1,84 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.config.generator.model.elements; - -import net.sf.ehcache.config.TerracottaClientConfiguration; -import net.sf.ehcache.config.generator.model.NodeElement; -import net.sf.ehcache.config.generator.model.SimpleNodeAttribute; -import net.sf.ehcache.config.generator.model.SimpleNodeElement; - -/** - * {@link NodeElement} representing the {@link TerracottaClientConfiguration} - * - * @author Abhishek Sanoujam - * - */ -public class TerracottaConfigConfigurationElement extends SimpleNodeElement { - - private final TerracottaClientConfiguration tcConfigConfiguration; - - /** - * Constructor accepting the parent and the {@link TerracottaClientConfiguration} - * - * @param parent - * @param tcConfigConfiguration - */ - public TerracottaConfigConfigurationElement(NodeElement parent, TerracottaClientConfiguration tcConfigConfiguration) { - super(parent, "terracottaConfig"); - this.tcConfigConfiguration = tcConfigConfiguration; - init(); - } - - private void init() { - if (tcConfigConfiguration == null) { - return; - } - if (tcConfigConfiguration.getUrl() != null) { - addAttribute(new SimpleNodeAttribute("url", tcConfigConfiguration.getUrl()).optional(true)); - } - addAttribute(new SimpleNodeAttribute("rejoin", tcConfigConfiguration.isRejoin()).optional(true).defaultValue( - TerracottaClientConfiguration.DEFAULT_REJOIN_VALUE)); - - addAttribute(new SimpleNodeAttribute("wanEnabledTSA", tcConfigConfiguration.isWanEnabledTSA()).optional(true).defaultValue( - TerracottaClientConfiguration.DEFAULT_WAN_ENABLED_TSA_VALUE)); - - if (tcConfigConfiguration.getOriginalEmbeddedConfig() != null) { - addChildElement(new TCConfigElement(this, tcConfigConfiguration.getOriginalEmbeddedConfig())); - } - } - - /** - * Element representing the "tc-config" element inside "terracottaConfig" - * - * @author Abhishek Sanoujam - * - */ - private static class TCConfigElement extends SimpleNodeElement { - - /** - * Constructor accepting the {@link TerracottaConfigConfigurationElement} parent and the inner string content - * - * @param parent - * @param content - */ - public TCConfigElement(TerracottaConfigConfigurationElement parent, String content) { - super(parent, "tc-config"); - this.setInnerContent(content); - } - - } -} Index: rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/src/test/java/org/terracotta/modules/ehcache/ToolkitInstanceFactoryImplTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/src/test/java/org/terracotta/modules/ehcache/ToolkitInstanceFactoryImplTest.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/src/test/java/org/terracotta/modules/ehcache/ToolkitInstanceFactoryImplTest.java (revision 0) @@ -1,433 +0,0 @@ -/** - * Copyright Terracotta, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language governing permissions and limitations under the - * License. - */ - -package org.terracotta.modules.ehcache; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.inOrder; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.when; -import net.sf.ehcache.CacheException; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.config.CacheConfiguration; -import net.sf.ehcache.config.TerracottaConfiguration; - -import org.junit.Before; -import org.junit.Test; -import org.junit.experimental.categories.Category; -import org.mockito.ArgumentCaptor; -import org.mockito.InOrder; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; -import org.terracotta.modules.ehcache.wan.WANUtil; -import org.terracotta.modules.ehcache.wan.Watchdog; -import org.terracotta.test.categories.CheckShorts; -import org.terracotta.toolkit.Toolkit; -import org.terracotta.toolkit.ToolkitFeatureType; -import org.terracotta.toolkit.collections.ToolkitMap; -import org.terracotta.toolkit.concurrent.locks.ToolkitLock; -import org.terracotta.toolkit.concurrent.locks.ToolkitReadWriteLock; -import org.terracotta.toolkit.config.Configuration; -import org.terracotta.toolkit.feature.NonStopFeature; -import org.terracotta.toolkit.internal.ToolkitInternal; -import org.terracotta.toolkit.internal.ToolkitLogger; -import org.terracotta.toolkit.internal.cache.BufferingToolkitCache; -import org.terracotta.toolkit.internal.cache.ToolkitCacheInternal; -import org.terracotta.toolkit.nonstop.NonStopConfigurationRegistry; -import org.terracotta.toolkit.store.ToolkitConfigFields; - -import com.terracotta.entity.ClusteredEntityManager; -import com.terracotta.entity.EntityLockHandler; -import com.terracotta.entity.ehcache.ClusteredCache; -import com.terracotta.entity.ehcache.ClusteredCacheManager; -import com.terracotta.entity.ehcache.ClusteredCacheManagerConfiguration; -import com.terracotta.entity.ehcache.EhcacheEntitiesNaming; -import com.terracotta.entity.ehcache.ToolkitBackedClusteredCacheManager; - -import java.io.Serializable; - -import junit.framework.Assert; - -/** - * ToolkitInstanceFactoryImplTest - */ -@Category(CheckShorts.class) -public class ToolkitInstanceFactoryImplTest { - - private static final String CACHE_MANAGER_NAME = "CACHE_MANAGER_NAME"; - private static final String CACHE_NAME = "CACHE_NAME"; - - @Mock private Toolkit toolkit; - @Mock private WANUtil wanUtil; - @Mock private Ehcache ehcache; - @Mock private CacheManager cacheManager; - - private ToolkitInstanceFactoryImpl factory; - private ToolkitCacheInternal resultantCache; - - @Before - public void setUp() { - MockitoAnnotations.initMocks(this); - toolkit = getMockToolkit(); - final ToolkitMap toolkitMap = mockMap(); - when(toolkit.getMap(anyString(), any(Class.class), any(Class.class))).thenReturn(toolkitMap); - when(toolkit.getCache(anyString(), any(Configuration.class), any(Class.class))) - .thenReturn(mock(BufferingToolkitCache.class)); - ToolkitReadWriteLock rwLock = mockReadWriteLock(); - when(toolkit.getReadWriteLock(any(String.class))).thenReturn(rwLock); - makeToolkitReturnNonStopConfigurationRegistry(); - - wanUtil = mock(WANUtil.class); - final Watchdog wanWatchdog = mock(Watchdog.class); - ehcache = mock(Ehcache.class); - when(cacheManager.isNamed()).thenReturn(true); - when(cacheManager.getName()).thenReturn(CACHE_MANAGER_NAME); - when(ehcache.getCacheManager()).thenReturn(cacheManager); - when(ehcache.getName()).thenReturn(CACHE_NAME); - CacheConfiguration configuration = new CacheConfiguration().terracotta(new TerracottaConfiguration()); - when(ehcache.getCacheConfiguration()).thenReturn(configuration); - - ClusteredEntityManager clusteredEntityManager = mock(ClusteredEntityManager.class); - ToolkitBackedClusteredCacheManager clusteredCacheManager = new ToolkitBackedClusteredCacheManager("aName", new ClusteredCacheManagerConfiguration(defaultCMConfig)); - clusteredCacheManager.setToolkit(toolkit); - clusteredCacheManager.setEntityLockHandler(mock(EntityLockHandler.class)); - when(clusteredEntityManager.getRootEntity(any(String.class), any(Class.class))).thenReturn(clusteredCacheManager); - when(clusteredEntityManager.getEntityLock(anyString())).thenReturn(mock(ToolkitReadWriteLock.class)); - factory = new ToolkitInstanceFactoryImpl(toolkit, clusteredEntityManager, wanUtil, wanWatchdog); - factory.linkClusteredCacheManager(CACHE_MANAGER_NAME, null); - } - - private ToolkitMap mockMap() { - ToolkitMap map = mock(ToolkitMap.class); - ToolkitReadWriteLock readWriteLock = mockReadWriteLock(); - when(map.getReadWriteLock()).thenReturn(readWriteLock); - return map; - } - - private ToolkitReadWriteLock mockReadWriteLock() { - ToolkitReadWriteLock readWriteLock = mock(ToolkitReadWriteLock.class); - ToolkitLock lock = mockLock(); - when(readWriteLock.readLock()).thenReturn(lock); - when(readWriteLock.writeLock()).thenReturn(lock); - return readWriteLock; - } - - private ToolkitLock mockLock() { - return when(mock(ToolkitLock.class).tryLock()).thenReturn(true).getMock(); - } - - @Test - public void testGetOrCreateToolkitCacheForWanEnabled() throws Exception { - whenCacheIsWanEnabled().callGetOrCreateToolkitCache().assertInstanceOfWanAwareToolkitCache(true); - } - - @Test - public void testGetOrCreateToolkitCacheForWanDisabled() throws Exception { - whenCacheIsWanDisabled().callGetOrCreateToolkitCache().assertInstanceOfWanAwareToolkitCache(false); - } - - @Test(expected = CacheException.class) - public void testWanAwareToolkitCacheDoesNotSupportDynamicConfigChange() throws Exception { - whenCacheIsWanEnabled().callGetOrCreateToolkitCache().assertInstanceOfWanAwareToolkitCache(true).updateTimeToLive(); - } - - @Test - public void testMaxEntriesInCacheToMaxTotalCountTransformation() { - CacheConfiguration configuration = new CacheConfiguration().terracotta(new TerracottaConfiguration()).maxEntriesInCache(10); - forEhcacheConfig(configuration).callGetOrCreateToolkitCache().validateMaxTotalCountForToolkitCacheIs(10); - } - - private void updateTimeToLive() { - ehcache.getCacheConfiguration().setTimeToLiveSeconds(10); - } - - private void validateMaxTotalCountForToolkitCacheIs(int maxTotalCount) { - ArgumentCaptor captor = ArgumentCaptor.forClass(Configuration.class); - verify(toolkit).getCache(anyString(), captor.capture(), eq(Serializable.class)); - assertThat(captor.getValue().getInt(ToolkitConfigFields.MAX_TOTAL_COUNT_FIELD_NAME), is(10)); - } - - private ToolkitInstanceFactoryImplTest forEhcacheConfig(CacheConfiguration configuration) { - when(ehcache.getCacheConfiguration()).thenReturn(configuration); - return this; - } - - - private void makeToolkitReturnNonStopConfigurationRegistry() { - NonStopFeature feature = mock(NonStopFeature.class); - when(toolkit.getFeature(any(ToolkitFeatureType.class))).thenReturn(feature); - when(feature.getNonStopConfigurationRegistry()).thenReturn(mock(NonStopConfigurationRegistry.class)); - } - - /** - * This test case was added while fixing DEV-9223. From now on, we assume that the default value for maxTotalCount in - * Toolkit (-1), and the default value for maxEntriesInCache in EhCache (0) will be aligned. That is, they both will - * mean the same thing. Currently they mean no-limit cache. If someone changes the default value of one of those, then - * this test case will fail and we would need to handle it. - */ - @Test - public void testToolkitAndEhCacheDefaultsAreAligned() { - Assert.assertEquals(0, CacheConfiguration.DEFAULT_MAX_ENTRIES_IN_CACHE); - Assert.assertEquals(-1, ToolkitConfigFields.DEFAULT_MAX_TOTAL_COUNT); - } - - - private ToolkitInstanceFactoryImplTest assertInstanceOfWanAwareToolkitCache(boolean expectedResult) { - Assert.assertEquals(expectedResult, (resultantCache instanceof WanAwareToolkitCache)); - return this; - } - - private ToolkitInstanceFactoryImplTest callGetOrCreateToolkitCache() { - resultantCache = factory.getOrCreateToolkitCache(ehcache); - return this; - } - - private ToolkitInstanceFactoryImplTest whenCacheIsWanEnabled() { - when(wanUtil.isWanEnabledCache(CACHE_MANAGER_NAME, CACHE_NAME)).thenReturn(true); - return this; - } - - private ToolkitInstanceFactoryImplTest whenCacheIsWanDisabled() { - when(wanUtil.isWanEnabledCache(CACHE_MANAGER_NAME, CACHE_NAME)).thenReturn(false); - return this; - } - - @Test - public void testAddCacheEntityInfo() { - factory.addCacheEntityInfo(CACHE_NAME, new CacheConfiguration(), "testTKCacheName"); - } - - @Test - public void testRetrievingExistingClusteredCacheManagerEntity() { - String name = "existing"; - net.sf.ehcache.config.Configuration configuration = new net.sf.ehcache.config.Configuration(); - - Toolkit toolkit = getMockToolkit(); - when(toolkit.getMap(anyString(), eq(String.class), eq(ClusteredCache.class))).thenReturn(mock(ToolkitMap.class)); - - ClusteredEntityManager clusteredEntityManager = mock(ClusteredEntityManager.class); - ToolkitBackedClusteredCacheManager cacheManagerEntity = new ToolkitBackedClusteredCacheManager(name, new ClusteredCacheManagerConfiguration("test")); - cacheManagerEntity.setEntityLockHandler(mock(EntityLockHandler.class)); - when(clusteredEntityManager.getRootEntity(name, ClusteredCacheManager.class)) - .thenReturn(cacheManagerEntity); - when(clusteredEntityManager.getEntityLock(anyString())).thenReturn(mock(ToolkitReadWriteLock.class)); - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(getMockToolkit(), - clusteredEntityManager); - - toolkitInstanceFactory.linkClusteredCacheManager(name, configuration); - verify(clusteredEntityManager).getRootEntity(name, ClusteredCacheManager.class); - verify(clusteredEntityManager).getEntityLock(anyString()); - verifyNoMoreInteractions(clusteredEntityManager); - } - - @Test - public void testCreatingNewClusteredCacheManagerEntity() { - String name = "newCM"; - - net.sf.ehcache.config.Configuration configuration = new net.sf.ehcache.config.Configuration(); - - ClusteredEntityManager clusteredEntityManager = mock(ClusteredEntityManager.class); - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocationOnMock) throws Throwable { - Object[] arguments = invocationOnMock.getArguments(); - ((ToolkitBackedClusteredCacheManager)arguments[2]).setEntityLockHandler(mock(EntityLockHandler.class)); - return null; - } - }).when(clusteredEntityManager).addRootEntityIfAbsent(eq(name), eq(ClusteredCacheManager.class), any(ClusteredCacheManager.class)); - ToolkitReadWriteLock rwLock = mock(ToolkitReadWriteLock.class); - ToolkitLock writeLock = mock(ToolkitLock.class); - when(writeLock.tryLock()).thenReturn(true); - when(rwLock.writeLock()).thenReturn(writeLock); - when(clusteredEntityManager.getEntityLock(any(String.class))).thenReturn(rwLock); - - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(getMockToolkit(), - clusteredEntityManager); - - toolkitInstanceFactory.linkClusteredCacheManager(name, configuration); - verify(clusteredEntityManager).getRootEntity(name, ClusteredCacheManager.class); - verify(clusteredEntityManager).getEntityLock(EhcacheEntitiesNaming.getCacheManagerLockNameFor(name)); - verify(clusteredEntityManager).addRootEntityIfAbsent(eq(name), any(Class.class), any(ClusteredCacheManager.class)); - verifyNoMoreInteractions(clusteredEntityManager); - } - - @Test - public void testTryingToCreateNewClusteredCacheManagerEntityButLooseRace() { - String name = "newCM"; - - net.sf.ehcache.config.Configuration configuration = new net.sf.ehcache.config.Configuration(); - - ClusteredEntityManager clusteredEntityManager = mock(ClusteredEntityManager.class); - when(clusteredEntityManager.addRootEntityIfAbsent(eq(name), any(Class.class), any(ClusteredCacheManager.class))).thenReturn(mock(ClusteredCacheManager.class)); - when(clusteredEntityManager.getRootEntity(name, ClusteredCacheManager.class)).thenReturn(null, mock(ClusteredCacheManager.class)); - ToolkitReadWriteLock rwLock = mock(ToolkitReadWriteLock.class); - ToolkitLock writeLock = mock(ToolkitLock.class); - when(writeLock.tryLock()).thenReturn(true); - when(rwLock.writeLock()).thenReturn(writeLock); - when(clusteredEntityManager.getEntityLock(any(String.class))).thenReturn(rwLock); - - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(getMockToolkit(), - clusteredEntityManager); - - toolkitInstanceFactory.linkClusteredCacheManager(name, configuration); - InOrder inOrder = inOrder(clusteredEntityManager); - inOrder.verify(clusteredEntityManager).getRootEntity(name, ClusteredCacheManager.class); - inOrder.verify(clusteredEntityManager).getEntityLock(EhcacheEntitiesNaming.getCacheManagerLockNameFor(name)); - inOrder.verify(clusteredEntityManager).addRootEntityIfAbsent(eq(name), any(Class.class), any(ClusteredCacheManager.class)); - verifyNoMoreInteractions(clusteredEntityManager); - } - - @Test - public void testConfigurationSavedContainsNoCachesAnymore() { - String name = "newCM"; - - net.sf.ehcache.config.Configuration configuration = new net.sf.ehcache.config.Configuration(); - configuration.addCache(new CacheConfiguration("test", 1)); - - ClusteredEntityManager clusteredEntityManager = mock(ClusteredEntityManager.class); - doAnswer(new Answer() { - @Override - public Object answer(InvocationOnMock invocationOnMock) throws Throwable { - Object[] arguments = invocationOnMock.getArguments(); - ((ToolkitBackedClusteredCacheManager)arguments[2]).setEntityLockHandler(mock(EntityLockHandler.class)); - return null; - } - }).when(clusteredEntityManager).addRootEntityIfAbsent(eq(name), eq(ClusteredCacheManager.class), any(ClusteredCacheManager.class)); - ToolkitReadWriteLock rwLock = mock(ToolkitReadWriteLock.class); - ToolkitLock writeLock = mock(ToolkitLock.class); - when(writeLock.tryLock()).thenReturn(true); - when(rwLock.writeLock()).thenReturn(writeLock); - when(clusteredEntityManager.getEntityLock(any(String.class))).thenReturn(rwLock); - - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(getMockToolkit(), - clusteredEntityManager); - - toolkitInstanceFactory.linkClusteredCacheManager(name, configuration); - ArgumentCaptor captor = ArgumentCaptor.forClass(ClusteredCacheManager.class); - verify(clusteredEntityManager).addRootEntityIfAbsent(eq(name), any(Class.class), captor.capture()); - - assertThat(captor.getValue().getConfiguration().getConfigurationAsText(), not(containsString(" captor = ArgumentCaptor.forClass(ClusteredCacheManager.class); - verify(clusteredEntityManager).addRootEntityIfAbsent(eq(name), any(Class.class), captor.capture()); - - assertThat(captor.getValue().getConfiguration().getConfigurationAsText(), containsString("name=\"" + name)); - } - - @Test - public void testClusterRejoinedCacheManagerDestroyed() { - Toolkit toolkit = getMockToolkit(); - ClusteredEntityManager entityManager = mock(ClusteredEntityManager.class); - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(toolkit, entityManager); - - toolkitInstanceFactory.clusterRejoined(); - - verify(entityManager).dispose(); - verify(toolkit).shutdown(); - } - - @Test - public void testClusterRejoinedCMDestroyedBetweenGetAndLock() { - Toolkit toolkit = getMockToolkit(); - ClusteredEntityManager entityManager = mock(ClusteredEntityManager.class); - ClusteredCacheManager cmEntity = mock(ClusteredCacheManager.class); - ClusteredCache cEntity = mock(ClusteredCache.class); - when(cmEntity.getCache(CACHE_NAME)).thenReturn(cEntity); - - when(entityManager.getRootEntity(CACHE_MANAGER_NAME, ClusteredCacheManager.class)).thenReturn(cmEntity, cmEntity, null); - when(entityManager.getEntityLock(any(String.class))).thenReturn(mock(ToolkitReadWriteLock.class)); - - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(toolkit, entityManager); - toolkitInstanceFactory.linkClusteredCacheManager(CACHE_MANAGER_NAME, null); - toolkitInstanceFactory.addCacheEntityInfo(CACHE_NAME, null, EhcacheEntitiesNaming.getToolkitCacheNameFor(CACHE_MANAGER_NAME, CACHE_NAME)); - - toolkitInstanceFactory.clusterRejoined(); - - verify(cmEntity, times(2)).markInUse(); - verify(entityManager).dispose(); - verify(toolkit).shutdown(); - } - - private Toolkit getMockToolkit() { - ToolkitInternal toolkitInternal = mock(ToolkitInternal.class); - when(toolkitInternal.getLogger(anyString())).thenReturn(mock(ToolkitLogger.class)); - - return toolkitInternal; - } - - @Test - public void testClusterRejoined() { - Toolkit toolkit = getMockToolkit(); - ClusteredEntityManager entityManager = mock(ClusteredEntityManager.class); - ClusteredCacheManager cmEntity = mock(ClusteredCacheManager.class); - ClusteredCache cEntity = mock(ClusteredCache.class); - when(cmEntity.getCache(CACHE_NAME)).thenReturn(cEntity); - - when(entityManager.getRootEntity(CACHE_MANAGER_NAME, ClusteredCacheManager.class)).thenReturn(cmEntity); - when(entityManager.getEntityLock(any(String.class))).thenReturn(mock(ToolkitReadWriteLock.class)); - - ToolkitInstanceFactoryImpl toolkitInstanceFactory = new ToolkitInstanceFactoryImpl(toolkit, entityManager); - toolkitInstanceFactory.linkClusteredCacheManager(CACHE_MANAGER_NAME, null); - toolkitInstanceFactory.addCacheEntityInfo(CACHE_NAME, null, EhcacheEntitiesNaming.getToolkitCacheNameFor(CACHE_MANAGER_NAME, CACHE_NAME)); - - toolkitInstanceFactory.clusterRejoined(); - - verify(cmEntity, times(2)).markInUse(); - verify(cmEntity, times(2)).markCacheInUse(cEntity); - } - - private final String defaultCMConfig = "" + - " " + - " " + - ""; - -} Index: rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/servermap/ServerMapElementTTLExpressTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/servermap/ServerMapElementTTLExpressTest.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/servermap/ServerMapElementTTLExpressTest.java (revision 0) @@ -1,37 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.ehcache.tests.servermap; - -import org.terracotta.ehcache.tests.AbstractCacheTestBase; - -import com.tc.properties.TCPropertiesConsts; -import com.tc.test.config.model.TestConfig; - -import java.util.Iterator; - -public class ServerMapElementTTLExpressTest extends AbstractCacheTestBase { - - public ServerMapElementTTLExpressTest(TestConfig testConfig) { - super("/servermap/basic-servermap-cache-test.xml", testConfig, ServerMapElementTTLExpressTestClient.class); - testConfig.setDgcEnabled(true); - testConfig.setDgcIntervalInSec(60); - testConfig.addTcProperty("ehcache.evictor.logging.enabled", "true"); - testConfig.addTcProperty(TCPropertiesConsts.EHCACHE_EVICTOR_LOGGING_ENABLED, "true"); - testConfig.addTcProperty(TCPropertiesConsts.EHCACHE_STORAGESTRATEGY_DCV2_EVICT_UNEXPIRED_ENTRIES_ENABLED, "false"); - testConfig.addTcProperty(TCPropertiesConsts.EHCACHE_STORAGESTRATEGY_DCV2_PERELEMENT_TTI_TTL_ENABLED, "true"); - - final Iterator iter = testConfig.getClientConfig().getExtraClientJvmArgs().iterator(); - while (iter.hasNext()) { - final String prop = iter.next(); - if (prop.contains("ehcache.storageStrategy.dcv2.localcache.enabled")) { - // remove it and always disable localcache for this test - iter.remove(); - } - } - // always disable local cache - testConfig.getClientConfig().addExtraClientJvmArg("-Dcom.tc.ehcache.storageStrategy.dcv2.localcache.enabled=false"); - testConfig.getClientConfig().addExtraClientJvmArg("-Dcom.tc.ehcache.evictor.logging.enabled=true"); - } - -} Index: rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/modules/ehcache/store/DynamicCacheConfigurationTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/modules/ehcache/store/DynamicCacheConfigurationTest.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/modules/ehcache/store/DynamicCacheConfigurationTest.java (revision 0) @@ -1,368 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.modules.ehcache.store; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Element; -import net.sf.ehcache.config.CacheConfiguration; -import net.sf.ehcache.config.TerracottaConfiguration; -import net.sf.ehcache.config.TerracottaConfiguration.Consistency; -import org.junit.Assert; -import org.terracotta.ehcache.tests.AbstractCacheTestBase; -import org.terracotta.ehcache.tests.ClientBase; -import org.terracotta.test.util.WaitUtil; -import org.terracotta.toolkit.Toolkit; - -import com.tc.properties.TCPropertiesConsts; -import com.tc.test.config.model.TestConfig; - -import java.util.concurrent.Callable; - -import static java.util.concurrent.TimeUnit.SECONDS; - -/** - * @author cdennis - */ -public class DynamicCacheConfigurationTest extends AbstractCacheTestBase { - public DynamicCacheConfigurationTest(TestConfig testConfig) { - super(testConfig, App.class); - testConfig.addTcProperty(TCPropertiesConsts.L2_SERVERMAP_EVICTION_CLIENTOBJECT_REFERENCES_REFRESH_INTERVAL, "5000"); - testConfig.addTcProperty(TCPropertiesConsts.EHCACHE_EVICTOR_LOGGING_ENABLED, "true"); - } - - public static class App extends ClientBase { - private static final double TOLERANCE = 0.1; - - public App(String[] args) { - super(args); - } - - public static void main(String[] args) { - new App(args).run(); - } - - @Override - protected void runTest(Cache cache, Toolkit clusteringToolkit) throws Throwable { - testTTIChange(cacheManager); - testTTLChange(cacheManager); - testDiskCapacityChange(cacheManager); - testMemoryCapacityChange(cacheManager); - testTTIChangeWithCustomElements(cacheManager); - testTTLChangeWithCustomElements(cacheManager); - } - - private Cache createCache(String cacheName, int maxMemory, boolean eternal, long ttl, long tti) { - return new Cache(new CacheConfiguration(cacheName, maxMemory) - .eternal(eternal) - .timeToLiveSeconds(ttl) - .timeToIdleSeconds(tti) - .clearOnFlush(true) - .terracotta(new TerracottaConfiguration().clustered(true).consistency(Consistency.STRONG) - .coherentReads(true).orphanEviction(true).orphanEvictionPeriod(4).localKeyCache(false) - .localKeyCacheSize(0).copyOnRead(false)).logging(true)); - } - - private void testTTIChange(CacheManager manager) throws InterruptedException { - Cache cache = createCache("testTTIChange", 10, false, 0, 10); - manager.addCache(cache); - - cache.put(new Element("key1", new byte[0])); - cache.put(new Element("key2", new byte[0])); - - SECONDS.sleep(6); - - cache.get("key2"); - - SECONDS.sleep(6); - - Assert.assertNull(cache.get("key1")); - Assert.assertNotNull(cache.get("key2")); - - cache.getCacheConfiguration().setTimeToIdleSeconds(20); - long currentTime = System.currentTimeMillis(); - - cache.put(new Element("key1", new byte[0])); - - SECONDS.sleep(15); - - Assert.assertNotNull(cache.get("key1")); - if (System.currentTimeMillis() - currentTime < 20000 ) { - Assert.assertNotNull(cache.get("key2")); - } else { - Assert.assertNull(cache.get("key2")); - } - - SECONDS.sleep(25); - - Assert.assertNull(cache.get("key1")); - Assert.assertNull(cache.get("key2")); - - cache.getCacheConfiguration().setTimeToIdleSeconds(4); - - cache.put(new Element("key1", new byte[0])); - cache.put(new Element("key2", new byte[0])); - - SECONDS.sleep(8); - - Assert.assertNull(cache.get("key1")); - Assert.assertNull(cache.get("key2")); - - cache.removeAll(); - } - - private void testTTLChange(CacheManager cm) throws InterruptedException { - Cache cache = createCache("testTTLChange", 10, false, 10, 0); - cm.addCache(cache); - - cache.put(new Element("key1", new byte[0])); - - SECONDS.sleep(6); - - Assert.assertNotNull(cache.get("key1")); - cache.put(new Element("key2", new byte[0])); - - SECONDS.sleep(6); - - Assert.assertNull(cache.get("key1")); - Assert.assertNotNull(cache.get("key2")); - - cache.getCacheConfiguration().setTimeToLiveSeconds(20); - - cache.put(new Element("key1", new byte[0])); - - SECONDS.sleep(8); - - Assert.assertNotNull(cache.get("key1")); - Assert.assertNotNull(cache.get("key2")); - - SECONDS.sleep(8); - - Assert.assertNotNull(cache.get("key1")); - Assert.assertNull(cache.get("key2")); - - SECONDS.sleep(10); - - Assert.assertNull(cache.get("key1")); - - cache.getCacheConfiguration().setTimeToLiveSeconds(4); - - cache.put(new Element("key1", new byte[0])); - cache.put(new Element("key2", new byte[0])); - - SECONDS.sleep(8); - - Assert.assertNull(cache.get("key1")); - Assert.assertNull(cache.get("key2")); - - cache.removeAll(); - } - - public void testTTIChangeWithCustomElements(CacheManager cm) throws InterruptedException { - Cache cache = createCache("testTTIChangeWithCustomElements", 10, false, 0, 10); - cm.addCache(cache); - - cache.put(new Element("default", new byte[0])); - cache.put(new Element("eternal", new byte[0], true, 0, 0)); - cache.put(new Element("short", new byte[0], false, 1, 1)); - cache.put(new Element("long", new byte[0], true, 100, 100)); - - SECONDS.sleep(6); - - Assert.assertNull(cache.get("short")); - - SECONDS.sleep(6); - - Assert.assertNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - cache.getCacheConfiguration().setTimeToIdleSeconds(20); - - cache.put(new Element("default", new byte[0])); - cache.put(new Element("short", new byte[0], false, 1, 1)); - - SECONDS.sleep(15); - - Assert.assertNotNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - SECONDS.sleep(25); - - Assert.assertNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - cache.getCacheConfiguration().setTimeToIdleSeconds(4); - - cache.put(new Element("default", new byte[0])); - cache.put(new Element("short", new byte[0], false, 1, 1)); - - SECONDS.sleep(8); - - Assert.assertNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - cache.removeAll(); - } - - public void testTTLChangeWithCustomElements(CacheManager cm) throws InterruptedException { - Cache cache = createCache("testTTLChangeWithCustomElements", 10, false, 10, 0); - cm.addCache(cache); - - cache.put(new Element("default", new byte[0])); - cache.put(new Element("eternal", new byte[0], true, 0, 0)); - cache.put(new Element("short", new byte[0], false, 1, 1)); - cache.put(new Element("long", new byte[0], true, 100, 100)); - - SECONDS.sleep(6); - - Assert.assertNotNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - SECONDS.sleep(6); - - Assert.assertNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - cache.getCacheConfiguration().setTimeToLiveSeconds(20); - - cache.put(new Element("default", new byte[0])); - cache.put(new Element("short", new byte[0], false, 1, 1)); - - SECONDS.sleep(6); - - Assert.assertNotNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - SECONDS.sleep(6); - - Assert.assertNotNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - SECONDS.sleep(10); - - Assert.assertNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - cache.getCacheConfiguration().setTimeToLiveSeconds(4); - - cache.put(new Element("default", new byte[0])); - cache.put(new Element("short", new byte[0], false, 1, 1)); - - SECONDS.sleep(8); - - Assert.assertNull(cache.get("default")); - Assert.assertNotNull(cache.get("eternal")); - Assert.assertNull(cache.get("short")); - Assert.assertNotNull(cache.get("long")); - - cache.removeAll(); - } - - private void testMemoryCapacityChange(CacheManager cm) throws Exception { - final Cache cache = createCache("testMemoryCapacityChange", 100, true, 0, 0); - cache.getCacheConfiguration().getTerracottaConfiguration() - .consistency(TerracottaConfiguration.Consistency.STRONG); - cm.addCache(cache); - - int i = 0; - for (; i < 150; i++) { - cache.put(new Element("key" + i, new byte[0])); - } - - waitForCacheMemoryStoreSize(cache, 100); - - cache.getCacheConfiguration().setMaxEntriesLocalHeap(200); - - for (; i < 250; i++) { - cache.put(new Element("key" + i, new byte[0])); - } - - waitForCacheMemoryStoreSize(cache, 100, 200); - - cache.getCacheConfiguration().setMaxEntriesLocalHeap(50); - - for (; i < 350; i++) { - cache.put(new Element("key" + i, new byte[0])); - } - - waitForCacheMemoryStoreSize(cache, 50); - - cache.removeAll(); - } - - private void waitForCacheMemoryStoreSize(final Cache cache, final int lowerBound, final int upperBound) - throws Exception { - final int min = (int) ((1 - TOLERANCE) * lowerBound); - final int max = (int) ((1 + TOLERANCE) * upperBound); - WaitUtil.waitUntilCallableReturnsTrue(new Callable() { - @Override - public Boolean call() throws Exception { - if (cache.getStatistics().getLocalHeapSize() <= max && cache.getStatistics().getLocalHeapSize() >= min) { - return true; - } - System.out.println("Still waiting for memory store size to fall in bounds [" + lowerBound + ", " + upperBound - + "] current=" + cache.getStatistics().getLocalHeapSize()); - return false; - } - }); - } - - private void waitForCacheMemoryStoreSize(final Cache cache, final int upperBound) throws Exception { - waitForCacheMemoryStoreSize(cache, 0, upperBound); - } - - public void testDiskCapacityChange(CacheManager cm) throws Exception { - final Cache cache = createCache("testDiskCapacityChange", 10, true, 0, 0); - cache.getCacheConfiguration().maxEntriesLocalHeap(1).maxEntriesInCache(100).getTerracottaConfiguration() - .consistency(TerracottaConfiguration.Consistency.STRONG).concurrency(16); - cm.addCache(cache); - - testCacheDiskCapacity(cache, 100); - - cache.getCacheConfiguration().setMaxEntriesInCache(200); - - testCacheDiskCapacity(cache, 200); - - cache.getCacheConfiguration().setMaxEntriesInCache(50); - - testCacheDiskCapacity(cache, 50); - - cache.removeAll(); - } - - private void testCacheDiskCapacity(final Cache cache, final int capacity) throws Exception { - for (int i = 0; i < 1000; i++) { - cache.put(new Element("key" + i, new byte[0])); - } - System.out.println("Waiting on capacoty of " + capacity); - WaitUtil.waitUntilCallableReturnsTrue(new Callable() { - @Override - public Boolean call() throws Exception { - System.out.println("Current cache size " + cache.getSize()); - Assert.assertTrue(cache.getSize() > capacity * .85); - return cache.getSize() >= capacity * 0.9 && cache.getSize() <= capacity * 1.1; - } - }); - } - - } -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/OperationImpl.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/OperationImpl.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/OperationImpl.java (revision 0) @@ -1,130 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.statistics.extended; - -import java.util.Set; -import java.util.concurrent.ScheduledExecutorService; - -import net.sf.ehcache.statistics.extended.ExtendedStatistics.Latency; -import net.sf.ehcache.statistics.extended.ExtendedStatistics.Result; -import net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic; - -import org.terracotta.statistics.OperationStatistic; - -/** - * The Class OperationImpl. - * - * @param the generic type - * @author cdennis - */ -class OperationImpl> implements Result { - - /** The source. */ - private final OperationStatistic source; - - /** The count. */ - private final SemiExpiringStatistic count; - - /** The rate. */ - private final RateImpl rate; - - /** The latency. */ - private final LatencyImpl latency; - - /** - * Instantiates a new operation impl. - * - * @param source the source - * @param targets the targets - * @param averageNanos the average nanos - * @param executor the executor - * @param historySize the history size - * @param historyNanos the history nanos - */ - public OperationImpl(OperationStatistic source, Set targets, long averageNanos, - ScheduledExecutorService executor, int historySize, long historyNanos) { - this.source = source; - this.count = new SemiExpiringStatistic(source.statistic(targets), executor, historySize, historyNanos); - this.latency = new LatencyImpl(source, targets, averageNanos, executor, historySize, historyNanos); - this.rate = new RateImpl(source, targets, averageNanos, executor, historySize, historyNanos); - } - - /* (non-Javadoc) - * @see net.sf.ehcache.statisticsV2.extended.ExtendedStatistics.Result#rate() - */ - @Override - public Statistic rate() { - return rate; - } - - /* (non-Javadoc) - * @see net.sf.ehcache.statisticsV2.extended.ExtendedStatistics.Result#latency() - */ - @Override - public Latency latency() throws UnsupportedOperationException { - return latency; - } - - /* (non-Javadoc) - * @see net.sf.ehcache.statisticsV2.extended.ExtendedStatistics.Result#count() - */ - @Override - public Statistic count() { - return count; - } - - /** - * Start. - */ - void start() { - count.start(); - rate.start(); - latency.start(); - } - - /** - * Expire. - * - * @param expiryTime the expiry time - * @return true, if successful - */ - boolean expire(long expiryTime) { - return (count.expire(expiryTime) & rate.expire(expiryTime) & latency.expire(expiryTime)); - } - - /** - * Sets the window. - * - * @param averageNanos the new window - */ - void setWindow(long averageNanos) { - rate.setWindow(averageNanos); - latency.setWindow(averageNanos); - } - - /** - * Sets the history. - * - * @param historySize the history size - * @param historyNanos the history nanos - */ - void setHistory(int historySize, long historyNanos) { - count.setHistory(historySize, historyNanos); - rate.setHistory(historySize, historyNanos); - latency.setHistory(historySize, historyNanos); - } -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/servermaplocalcache/ServerMapLocalCache.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/servermaplocalcache/ServerMapLocalCache.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/servermaplocalcache/ServerMapLocalCache.java (revision 0) @@ -1,194 +0,0 @@ -/** - * All content copyright 2010 (c) Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All - * rights reserved. - */ -package net.sf.ehcache.servermaplocalcache; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.ReentrantReadWriteLock; -import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.event.CacheEventListenerAdapter; - -public class ServerMapLocalCache { - - private final static int CONCURRENCY = 256; - private volatile TCObjectSelfStore tcoSelfStore; - private volatile Cache ehcache; - private final ReentrantReadWriteLock[] locks = new ReentrantReadWriteLock[CONCURRENCY]; - private final Object localSync = new Object(); - private static final ExecutorService evictionHandlerStage = Executors.newFixedThreadPool(4, new ThreadFactory() { - private final AtomicInteger count = new AtomicInteger(); - - public Thread newThread(Runnable r) { - Thread t = new Thread(r, "eviction_handler_stage_thread_" + count.incrementAndGet()); - t.setDaemon(true); - return t; - } - }); - - public ServerMapLocalCache(TCObjectSelfStore tcoSelfStore, Cache ehcache) { - this.tcoSelfStore = tcoSelfStore; - this.ehcache = ehcache; - ehcache.getCacheEventNotificationService().registerListener(new EvictionListener(this)); - for (int i = 0; i < CONCURRENCY; i++) { - locks[i] = new ReentrantReadWriteLock(); - } - } - - private ReentrantReadWriteLock getLock(Object key) { - return locks[Math.abs(key.hashCode() % CONCURRENCY)]; - } - - public void put(TCObjectSelf tcoSelf) { - synchronized (localSync) { - tcoSelfStore.addTCObjectSelf(tcoSelf); - addToCache(tcoSelf); - } - } - - public TCObjectSelf getFromTCObjectSelfStore(Long oid) { - synchronized (localSync) { - return tcoSelfStore.getById(oid); - } - } - - // public void remove(String key) { - // synchronized (localSync) { - // removeFromCache(key); - // } - // } - // - // private void removeFromCache(String key) { - // WriteLock writeLock = getLock(key).writeLock(); - // writeLock.lock(); - // try { - // // remove key-value mapping: key->value - // Element element = ehcache.removeAndReturnElement(key); - // if (element != null) { - // TCObjectSelf tcoSelf = (TCObjectSelf) element.getObjectValue(); - // if (tcoSelf != null) { - // handleKeyValueMappingRemoved(key, tcoSelf); - // } - // } - // - // } finally { - // writeLock.unlock(); - // } - // } - - private void handleKeyValueMappingRemoved(String key, TCObjectSelf tcoSelf) { - // remote remove - tcoSelfStore.removeTCObjectSelf(tcoSelf); - if (tcoSelf != null) { - // clean up meta-mapping: id->key - ehcache.remove(tcoSelf.getOid()); - } - } - - private void addToCache(TCObjectSelf tcoSelf) { - ReentrantReadWriteLock lock = getLock(tcoSelf.getKey()); - lock.writeLock().lock(); - try { - if (DebugUtil.DEBUG) { - DebugUtil.debug("Add to cache: " + tcoSelf); - } - - // add meta mapping: oid->key - ehcache.put(new Element(tcoSelf.getOid(), tcoSelf.getKey())); - - // add the key->value mapping - ehcache.put(new Element(tcoSelf.getKey(), tcoSelf)); - - } finally { - lock.writeLock().unlock(); - } - } - - public void entryEvicted(Object objectKey, Object objectValue) { - if (DebugUtil.DEBUG) { - DebugUtil.debug("Entry evicted; evictedKey: " + objectKey + ", evictedValue: " + objectValue); - } - if (objectValue instanceof TCObjectSelf) { - // key-value mapping evicted - keyValueMappingEvicted((String) objectKey, (TCObjectSelf) objectValue); - } else { - // oid-> key mapping removed - objectIdMappingEvicted((Long) objectKey, (String) objectValue); - } - } - - private void objectIdMappingEvicted(Long oid, String key) { - WriteLock writeLock = getLock(key).writeLock(); - writeLock.lock(); - Element element = null; - try { - element = ehcache.get(key); - if (element != null) { - TCObjectSelf tcoSelf = (TCObjectSelf) element.getObjectValue(); - if (tcoSelf != null && tcoSelf.getOid() == oid) { - // clean up key-value mapping - ehcache.remove(key); - tcoSelfStore.removeTCObjectSelf(tcoSelf); - } - } - } finally { - writeLock.unlock(); - } - if (DebugUtil.DEBUG) { - DebugUtil.debug("[objectIdEvicted] oid: " + oid + ", key: " + key + ", was mapped to value: " - + (element == null ? "null" : element.getObjectValue())); - } - } - - private void keyValueMappingEvicted(String objectKey, TCObjectSelf objectValue) { - WriteLock writeLock = getLock(objectKey).writeLock(); - writeLock.lock(); - try { - if (DebugUtil.DEBUG) { - DebugUtil.debug("[keyValueMappingEvicted] key: " + objectKey + ", value: " + objectValue); - } - handleKeyValueMappingRemoved(objectKey, objectValue); - } finally { - writeLock.unlock(); - } - } - - private static class EvictionListener extends CacheEventListenerAdapter { - private final ServerMapLocalCache serverMapLocalCache; - - public EvictionListener(ServerMapLocalCache serverMapLocalCache) { - this.serverMapLocalCache = serverMapLocalCache; - } - - @Override - public void notifyElementExpired(Ehcache cache, final Element element) { - if (DebugUtil.DEBUG) { - DebugUtil.debug("[ElementExpired] expiredKey: " + element.getObjectKey() + ", expiredValue: " + element.getObjectValue()); - } - evictionHandlerStage.submit(new Runnable() { - public void run() { - serverMapLocalCache.entryEvicted(element.getObjectKey(), element.getObjectValue()); - } - }); - } - - @Override - public void notifyElementEvicted(Ehcache cache, final Element element) { - if (DebugUtil.DEBUG) { - DebugUtil.debug("[ElementEvicted] expiredKey: " + element.getObjectKey() + ", expiredValue: " + element.getObjectValue()); - } - evictionHandlerStage.submit(new Runnable() { - public void run() { - serverMapLocalCache.entryEvicted(element.getObjectKey(), element.getObjectValue()); - } - }); - } - } -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/constructs/blocking/CountingCacheEntryFactory.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/constructs/blocking/CountingCacheEntryFactory.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/constructs/blocking/CountingCacheEntryFactory.java (revision 0) @@ -1,87 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.constructs.blocking; - -import net.sf.ehcache.Element; - -import java.util.Random; - -/** - * A cache entry factory that counts the number of entries it has created. - *

- * This is useful for writing tests. - * - * @author Greg Luck - * @version $Id: CountingCacheEntryFactory.java 10789 2018-04-26 02:08:13Z adahanne $ - */ -public class CountingCacheEntryFactory implements UpdatingCacheEntryFactory { - - private int count; - private final Object value; - private Random random; - - /** - * Creates a new instance - * - * @param value the factory always creates values equal to this value - */ - public CountingCacheEntryFactory(final Object value) { - this.value = value; - random = new Random(); - } - - /** - * Fetches an entry. - */ - public Object createEntry(final Object key) { - count++; - if (random.nextInt(2) == 1) { - return value; - } else { - return new Element(key, value); - } - } - - /** - * @return number of entries the factory has created. - */ - public int getCount() { - return count; - } - - /** - * Perform an incremental update of data within a CacheEntry. - * Based on identification of dirty values within a CacheEntry - * Insert Update or Delete those entries based on the existing value. - *

- * This method does not return a modified value, because it modifies the value passed into it, relying - * on the pass by reference feature of Java. - *

- * Implementations of this method must be thread safe. - * - * @param key the cache Key - * @param value a value copied from the value that belonged to the Element in the cache. Value must be mutable - * @throws Exception - */ - public void updateEntryValue(Object key, Object value) throws Exception { - count++; - if (key.equals("explode") && count > 1) { - throw new RuntimeException("EXPLODE!"); - } - } - -} Index: rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/OverflowToDiskStandaloneCacheTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/OverflowToDiskStandaloneCacheTest.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/OverflowToDiskStandaloneCacheTest.java (revision 0) @@ -1,45 +0,0 @@ -/* - * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright - * notice. All rights reserved. - */ -package org.terracotta.ehcache.tests; - -import com.tc.test.config.model.TestConfig; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; - -/** - * @author cdennis - */ -public class OverflowToDiskStandaloneCacheTest extends AbstractCacheTestBase { - - public OverflowToDiskStandaloneCacheTest(TestConfig testConfig) { - super("overflow-to-disk-cache-test.xml", testConfig); - } - - @Override - protected void evaluateClientOutput(String clientName, int exitCode, File output) throws Throwable { - if ((exitCode == 0)) { throw new AssertionError("Client " + clientName + " exited with exit code: " + exitCode); } - - FileReader fr = null; - try { - fr = new FileReader(output); - BufferedReader reader = new BufferedReader(fr); - String st = ""; - while ((st = reader.readLine()) != null) { - if (st.contains("InvalidConfigurationException")) return; - } - throw new AssertionError("Client " + clientName + " did not pass"); - } catch (Exception e) { - throw new AssertionError(e); - } finally { - try { - fr.close(); - } catch (Exception e) { - // - } - } - } -} Index: rctags/ehcache-2.10.7.0.37/system-tests/src/test/resources/double-config-cache-test.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/system-tests/src/test/resources/double-config-cache-test.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/system-tests/src/test/resources/double-config-cache-test.xml (revision 0) @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - PORT - - - - - Index: rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/store/ToolkitNonStopExceptionOnTimeoutConfiguration.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/store/ToolkitNonStopExceptionOnTimeoutConfiguration.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/store/ToolkitNonStopExceptionOnTimeoutConfiguration.java (revision 0) @@ -1,27 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.modules.ehcache.store; - -import net.sf.ehcache.config.NonstopConfiguration; - -import org.terracotta.toolkit.nonstop.NonStopConfigurationFields.NonStopReadTimeoutBehavior; -import org.terracotta.toolkit.nonstop.NonStopConfigurationFields.NonStopWriteTimeoutBehavior; - -public class ToolkitNonStopExceptionOnTimeoutConfiguration extends ToolkitNonStopConfiguration { - - public ToolkitNonStopExceptionOnTimeoutConfiguration(NonstopConfiguration ehcacheNonStopConfig) { - super(ehcacheNonStopConfig); - } - - @Override - public NonStopReadTimeoutBehavior getReadOpNonStopTimeoutBehavior() { - return NonStopReadTimeoutBehavior.EXCEPTION; - } - - @Override - public NonStopWriteTimeoutBehavior getWriteOpNonStopTimeoutBehavior() { - return NonStopWriteTimeoutBehavior.EXCEPTION; - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/statistics/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/statistics/package.html (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/statistics/package.html (revision 0) @@ -1,8 +0,0 @@ - - - - -This package contains classes related to LiveCacheStatistics and its implementation. -

- - Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/hibernate/domain/VersionedItem.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/hibernate/domain/VersionedItem.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/java/net/sf/ehcache/hibernate/domain/VersionedItem.java (revision 0) @@ -1,28 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.sf.ehcache.hibernate.domain; - -public class VersionedItem extends Item { - private Long version; - - public Long getVersion() { - return version; - } - - public void setVersion(Long version) { - this.version = version; - } -} Index: rctags/ehcache-2.10.7.0.37/ehcache-search-parser/src/main/java/net/sf/ehcache/search/parser/MAggregate.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-search-parser/src/main/java/net/sf/ehcache/search/parser/MAggregate.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-search-parser/src/main/java/net/sf/ehcache/search/parser/MAggregate.java (revision 0) @@ -1,130 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.sf.ehcache.search.parser; - -import net.sf.ehcache.search.aggregator.Aggregator; - -public class MAggregate implements ModelElement { - - /** - * The aggregation type enum. - */ - public static enum AggOp { - /** - * The Sum. - */ - Sum, - /** - * The Min. - */ - Min, - /** - * The Max. - */ - Max, - /** - * The Average. - */ - Average, - /** - * The Count. - */ - Count - } - - ; - - /** - * The op. - */ - private final AggOp op; - - /** - * The attribute. - */ - private final MAttribute ma; - - /** - * Instantiates a new m aggregate. - * - * @param op the operation - * @param ma the attribute - */ - public MAggregate(AggOp op, MAttribute ma) { - this.op = op; - this.ma = ma; - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - public String toString() { - return op.toString().toLowerCase() + "(" + ma + ")"; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((ma == null) ? 0 : ma.hashCode()); - result = prime * result + ((op == null) ? 0 : op.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (getClass() != obj.getClass()) return false; - MAggregate other = (MAggregate)obj; - if (ma == null) { - if (other.ma != null) return false; - } else if (!ma.equals(other.ma)) return false; - if (op != other.op) return false; - return true; - } - - public AggOp getOp() { - return op; - } - - public MAttribute getAttribute() { - return ma; - } - - /** - * Return this model aggregator as an ehacache aggregator. - * - * @return the aggregator - */ - public Aggregator asEhcacheObject(ClassLoader loader) { - switch (op) { - case Sum: - return ma.asEhcacheObject(loader).sum(); - case Min: - return ma.asEhcacheObject(loader).min(); - case Max: - return ma.asEhcacheObject(loader).max(); - case Count: - return ma.asEhcacheObject(loader).count(); - case Average: - return ma.asEhcacheObject(loader).average(); - } - throw new IllegalStateException("Unknown agg operator: " + op); - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-search-parser/.classpath =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-search-parser/.classpath (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-search-parser/.classpath (revision 0) @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/txns/TwoResourceBTMXATest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/txns/TwoResourceBTMXATest.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/system-tests/src/test/java/org/terracotta/ehcache/tests/txns/TwoResourceBTMXATest.java (revision 0) @@ -1,33 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.ehcache.tests.txns; - -import org.terracotta.ehcache.tests.AbstractCacheTestBase; -import org.terracotta.test.util.TestBaseUtil; - -import bitronix.tm.TransactionManagerServices; - -import com.tc.test.config.model.TestConfig; - -import java.util.ArrayList; -import java.util.List; - -public class TwoResourceBTMXATest extends AbstractCacheTestBase { - - public TwoResourceBTMXATest(TestConfig testConfig) { - super("two-resource-xa-test.xml", testConfig, BTMTwoResourceTx1.class, BTMTwoResourceTx2.class); - testConfig.getClientConfig().setParallelClients(true); - - // DEV-3930 - // disableAllUntil("2010-03-31"); - } - - @Override - protected List getExtraJars() { - List extraJars = new ArrayList(); - extraJars.add(TestBaseUtil.jarFor(TransactionManagerServices.class)); - return extraJars; - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/transaction/SoftLockFactory.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/transaction/SoftLockFactory.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/transaction/SoftLockFactory.java (revision 0) @@ -1,35 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.transaction; - -/** - * A factory of soft-locks supporting a specific isolation level. - * - * @author Chris Dennis - */ -public interface SoftLockFactory { - - /** - * Construct a new softlock to be managed by the given manager for a specific key. - * - * @param manager soft lock manager - * @param key key to generate against - * @return a new soft lock - */ - SoftLock newSoftLock(SoftLockManager manager, Object key); - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-scheduled-refresh/src/main/java/net/sf/ehcache/constructs/scheduledrefresh/RefreshBatchJob.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-scheduled-refresh/src/main/java/net/sf/ehcache/constructs/scheduledrefresh/RefreshBatchJob.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-scheduled-refresh/src/main/java/net/sf/ehcache/constructs/scheduledrefresh/RefreshBatchJob.java (revision 0) @@ -1,157 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.constructs.scheduledrefresh; - -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.loader.CacheLoader; -import org.quartz.Job; -import org.quartz.JobDataMap; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.ReentrantLock; - -/** - * This class is used to actually process a batch of keys for refreshing. - * Instances of this job are scheduled by the {@link OverseerJob} class. - * - * @author cschanck - */ -public class RefreshBatchJob implements Job { - - private static final Logger LOG = LoggerFactory.getLogger(OverseerJob.class); - private static HashMap bulkLoadTrackingMap = new HashMap(1); - private static ReentrantLock bulkloadLock = new ReentrantLock(); - - private static void requestBulkLoadEnabled(Ehcache cache) { - bulkloadLock.lock(); - try { - boolean prior = cache.isNodeBulkLoadEnabled(); - // yes, this is racy. we can do no better until we have per-thread bulk loading - if (prior) { - String key = cache.getCacheManager().getName() + "/" + cache.getName(); - AtomicInteger permits = bulkLoadTrackingMap.get(key); - if (permits == null) { - // first time in. actually switch it - permits = new AtomicInteger(1); - bulkLoadTrackingMap.put(key, permits); - cache.setNodeBulkLoadEnabled(true); - } else { - permits.incrementAndGet(); - } - } - } finally { - bulkloadLock.unlock(); - } - } - - private static void requestBulkLoadRestored(Ehcache cache) { - bulkloadLock.lock(); - try { - String key = cache.getCacheManager().getName() + "/" + cache.getName(); - AtomicInteger permits = bulkLoadTrackingMap.get(key); - if (permits != null) { - if (permits.decrementAndGet() == 0) { - // last one out. reset it to true - bulkLoadTrackingMap.remove(key); - cache.setNodeBulkLoadEnabled(true); - } - } - } finally { - bulkloadLock.unlock(); - } - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - @Override - public void execute(JobExecutionContext context) throws JobExecutionException { - try { - JobDataMap jdm = context.getMergedJobDataMap(); - ScheduledRefreshConfiguration config = (ScheduledRefreshConfiguration) jdm.get(ScheduledRefreshCacheExtension - .PROP_CONFIG_OBJECT); - String cacheManagerName = jdm.getString(ScheduledRefreshCacheExtension.PROP_CACHE_MGR_NAME); - String cacheName = jdm.getString(ScheduledRefreshCacheExtension.PROP_CACHE_NAME); - - CacheManager cacheManager = CacheManager.getCacheManager(cacheManagerName); - Ehcache underlyingCache = cacheManager.getEhcache(cacheName); - - HashSet keysToProcess = new HashSet((Collection) jdm.get( - ScheduledRefreshCacheExtension.PROP_KEYS_TO_PROCESS)); - - ScheduledRefreshCacheExtension extension = ScheduledRefreshCacheExtension.findExtensionFromCache(underlyingCache, - context.getJobDetail().getKey().getGroup()); - boolean keepingStats=false; - if (extension != null) { - extension.incrementJobCount(); - extension.incrementProcessedCount(keysToProcess.size()); - keepingStats=true; - } - - LOG.info("Scheduled refresh batch job: " + context.getJobDetail().getKey() + " size: " + keysToProcess.size()+" "+OverseerJob.statsNote(keepingStats)); - try { - if (config.isUseBulkload()) { - requestBulkLoadEnabled(underlyingCache); - } - } catch (UnsupportedOperationException e) { - LOG.warn("Bulk Load requested for cache that does not support bulk load."); - } - - // iterate through the loaders - for (CacheLoader loader : underlyingCache.getRegisteredCacheLoaders()) { - // if we are out of keys, punt - if (keysToProcess.isEmpty()) { - break; - } - - // try and load them all - Map values = loader.loadAll(keysToProcess); - // subtract the ones that were loaded - keysToProcess.removeAll(values.keySet()); - for (Map.Entry entry : values.entrySet()) { - Element newElement = new Element(entry.getKey(), entry.getValue()); - underlyingCache.put(newElement); - } - } - // assume we got here ok, now evict any that don't evict - if (config.isEvictOnLoadMiss() && !keysToProcess.isEmpty()) { - underlyingCache.removeAll(keysToProcess); - } - - try { - if (config.isUseBulkload()) { - requestBulkLoadRestored(underlyingCache); - } - } catch (UnsupportedOperationException e) { - // warned above. - } - } - catch(Throwable t) { - LOG.warn("Scheduled refresh batch job failure: " + context.getJobDetail().getKey(), t); - } - - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/SizeOfPolicyConfigurationElement.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/SizeOfPolicyConfigurationElement.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/SizeOfPolicyConfigurationElement.java (revision 0) @@ -1,67 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.config.generator.model.elements; - -import net.sf.ehcache.config.SizeOfPolicyConfiguration; -import net.sf.ehcache.config.generator.model.NodeElement; -import net.sf.ehcache.config.generator.model.SimpleNodeAttribute; -import net.sf.ehcache.config.generator.model.SimpleNodeElement; - -/** - * Element representing the {@link net.sf.ehcache.config.SizeOfPolicyConfiguration} - * - * @author Ludovic Orban - * - */ -public class SizeOfPolicyConfigurationElement extends SimpleNodeElement { - private final SizeOfPolicyConfiguration sizeOfPolicyConfiguration; - - /** - * Construtor accepting the parent and the {@link net.sf.ehcache.config.SizeOfPolicyConfiguration} - * - * @param parent - * @param sizeOfPolicyConfiguration - */ - public SizeOfPolicyConfigurationElement(ConfigurationElement parent, SizeOfPolicyConfiguration sizeOfPolicyConfiguration) { - super(parent, "sizeOfPolicy"); - this.sizeOfPolicyConfiguration = sizeOfPolicyConfiguration; - init(); - } - - /** - * Construtor accepting the element and the {@link net.sf.ehcache.config.SizeOfPolicyConfiguration} - * - * @param element - * @param sizeOfPolicyConfiguration - */ - public SizeOfPolicyConfigurationElement(NodeElement element, SizeOfPolicyConfiguration sizeOfPolicyConfiguration) { - super(element, "sizeOfPolicy"); - this.sizeOfPolicyConfiguration = sizeOfPolicyConfiguration; - init(); - } - - private void init() { - if (sizeOfPolicyConfiguration == null) { - return; - } - addAttribute(new SimpleNodeAttribute("maxDepth", sizeOfPolicyConfiguration.getMaxDepth()) - .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_SIZEOF_DEPTH)); - addAttribute(new SimpleNodeAttribute("maxDepthExceededBehavior", sizeOfPolicyConfiguration.getMaxDepthExceededBehavior()) - .optional(true).defaultValue(SizeOfPolicyConfiguration.DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR)); - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/store/compound/ReadWriteSerializationCopyStrategy.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/store/compound/ReadWriteSerializationCopyStrategy.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/store/compound/ReadWriteSerializationCopyStrategy.java (revision 0) @@ -1,132 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.sf.ehcache.store.compound; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; - -import net.sf.ehcache.CacheException; -import net.sf.ehcache.Element; -import net.sf.ehcache.ElementIdHelper; -import net.sf.ehcache.util.PreferredLoaderObjectInputStream; - -/** - * A copy strategy that can use partial (if both copy on read and copy on write are set) or full Serialization to copy the object graph - * - * @author Alex Snaps - * @author Ludovic Orban - */ -public class ReadWriteSerializationCopyStrategy implements ReadWriteCopyStrategy { - - private static final long serialVersionUID = 2659269742281205622L; - - /** - * Deep copies some object and returns an internal storage-ready copy - * - * @param value the value to copy - * @return the storage-ready copy - */ - public Element copyForWrite(Element value, ClassLoader loader) { - if (value == null) { - return null; - } else { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - ObjectOutputStream oos = null; - - if (value.getObjectValue() == null) { - return duplicateElementWithNewValue(value, null); - } - - try { - oos = new ObjectOutputStream(bout); - oos.writeObject(value.getObjectValue()); - } catch (Exception e) { - throw new CacheException("When configured copyOnRead or copyOnWrite, a Store will only accept Serializable values", e); - } finally { - try { - if (oos != null) { - oos.close(); - } - } catch (Exception e) { - // - } - } - - return duplicateElementWithNewValue(value, bout.toByteArray()); - } - } - - /** - * Reconstruct an object from its storage-ready copy. - * - * @param storedValue the storage-ready copy - * @return the original object - */ - public Element copyForRead(Element storedValue, ClassLoader loader) { - if (storedValue == null) { - return null; - } else { - if (storedValue.getObjectValue() == null) { - return duplicateElementWithNewValue(storedValue, null); - } - - ByteArrayInputStream bin = new ByteArrayInputStream((byte[]) storedValue.getObjectValue()); - ObjectInputStream ois = null; - try { - ois = new PreferredLoaderObjectInputStream(bin, loader); - return duplicateElementWithNewValue(storedValue, ois.readObject()); - } catch (Exception e) { - throw new CacheException("When configured copyOnRead or copyOnWrite, a Store will only accept Serializable values", e); - } finally { - try { - if (ois != null) { - ois.close(); - } - } catch (Exception e) { - // - } - } - } - } - - /** - * Make a duplicate of an element but using the specified value - * - * @param element the element to duplicate - * @param newValue the new element's value - * @return the duplicated element - */ - public Element duplicateElementWithNewValue(final Element element, final Object newValue) { - Element newElement; - if (element.usesCacheDefaultLifespan()) { - newElement = new Element(element.getObjectKey(), newValue, element.getVersion(), - element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), element.usesCacheDefaultLifespan(), - Integer.MIN_VALUE, Integer.MIN_VALUE, element.getLastUpdateTime()); - } else { - newElement = new Element(element.getObjectKey(), newValue, element.getVersion(), - element.getCreationTime(), element.getLastAccessTime(), element.getHitCount(), element.usesCacheDefaultLifespan(), - element.getTimeToLive(), element.getTimeToIdle(), element.getLastUpdateTime()); - } - if (ElementIdHelper.hasId(element)) { - ElementIdHelper.setId(newElement, ElementIdHelper.getId(element)); - } - return newElement; - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/constructs/refreshahead/RefreshAheadCacheFactory.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/constructs/refreshahead/RefreshAheadCacheFactory.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/constructs/refreshahead/RefreshAheadCacheFactory.java (revision 0) @@ -1,45 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.sf.ehcache.constructs.refreshahead; - -import java.util.Properties; - -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.constructs.CacheDecoratorFactory; - -/** - * Cache decorator factory for {@link RefreshAheadCache} instances - * - * @author cschanck - * - */ -public class RefreshAheadCacheFactory extends CacheDecoratorFactory { - - @Override - public Ehcache createDecoratedEhcache(Ehcache cache, Properties properties) { - RefreshAheadCacheConfiguration config = new RefreshAheadCacheConfiguration().fromProperties(properties).build(); - RefreshAheadCache decorator = new RefreshAheadCache(cache, config); - return decorator; - } - - @Override - public Ehcache createDefaultDecoratedEhcache(Ehcache cache, Properties properties) { - RefreshAheadCacheConfiguration config = new RefreshAheadCacheConfiguration().fromProperties(properties).build(); - RefreshAheadCache decorator = new RefreshAheadCache(cache, config); - return decorator; - } - -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/transaction/DelegatingTransactionIDFactory.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/transaction/DelegatingTransactionIDFactory.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/transaction/DelegatingTransactionIDFactory.java (revision 0) @@ -1,151 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.sf.ehcache.transaction; - -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.FeaturesManager; -import net.sf.ehcache.terracotta.ClusteredInstanceFactory; -import net.sf.ehcache.terracotta.TerracottaClient; -import net.sf.ehcache.transaction.xa.XidTransactionID; - -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicReference; - -import javax.transaction.xa.Xid; - -/** - * A TransactionIDFactory implementation with delegates calls to either a clustered - * or non-clustered factory - * - * @author Ludovic Orban - */ -public class DelegatingTransactionIDFactory implements TransactionIDFactory { - - private final FeaturesManager featuresManager; - private final TerracottaClient terracottaClient; - private final String cacheManagerName; - private volatile ClusteredInstanceFactory clusteredInstanceFactory; - private volatile AtomicReference transactionIDFactory = new AtomicReference(); - - /** - * Create a new DelegatingTransactionIDFactory - * - * @param terracottaClient a terracotta client - * @param cacheManagerName the name of the cache manager which creates this. - */ - public DelegatingTransactionIDFactory(FeaturesManager featuresManager, TerracottaClient terracottaClient, String cacheManagerName) { - this.featuresManager = featuresManager; - this.terracottaClient = terracottaClient; - this.cacheManagerName = cacheManagerName; - } - - private TransactionIDFactory get() { - ClusteredInstanceFactory cif = terracottaClient.getClusteredInstanceFactory(); - if (cif != null && cif != this.clusteredInstanceFactory) { - this.transactionIDFactory.set(cif.createTransactionIDFactory(UUID.randomUUID().toString(), cacheManagerName)); - this.clusteredInstanceFactory = cif; - } - - if (transactionIDFactory.get() == null) { - TransactionIDFactory constructed; - if (featuresManager == null) { - constructed = new TransactionIDFactoryImpl(); - } else { - constructed = featuresManager.createTransactionIDFactory(); - } - if (transactionIDFactory.compareAndSet(null, constructed)) { - return constructed; - } else { - return transactionIDFactory.get(); - } - } else { - return transactionIDFactory.get(); - } - } - - /** - * {@inheritDoc} - */ - public TransactionID createTransactionID() { - return get().createTransactionID(); - } - - /** - * {@inheritDoc} - */ - public TransactionID restoreTransactionID(TransactionIDSerializedForm serializedForm) { - return get().restoreTransactionID(serializedForm); - } - - /** - * {@inheritDoc} - */ - public XidTransactionID createXidTransactionID(Xid xid, Ehcache cache) { - return get().createXidTransactionID(xid, cache); - } - - /** - * {@inheritDoc} - */ - public XidTransactionID restoreXidTransactionID(XidTransactionIDSerializedForm serializedForm) { - return get().restoreXidTransactionID(serializedForm); - } - - @Override - public void markForCommit(TransactionID transactionID) { - get().markForCommit(transactionID); - } - - @Override - public void markForRollback(XidTransactionID transactionID) { - get().markForRollback(transactionID); - } - - @Override - public boolean isDecisionCommit(TransactionID transactionID) { - return get().isDecisionCommit(transactionID); - } - - @Override - public void clear(TransactionID transactionID) { - get().clear(transactionID); - } - - @Override - public Set getAllXidTransactionIDsFor(Ehcache cache) { - return get().getAllXidTransactionIDsFor(cache); - } - - @Override - public Set getAllTransactionIDs() { - return get().getAllTransactionIDs(); - } - - @Override - public boolean isExpired(TransactionID transactionID) { - return get().isExpired(transactionID); - } - - @Override - public Boolean isPersistent() { - if (transactionIDFactory.get() == null) { - return null; - } else { - return get().isPersistent(); - } - } -} Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/resources/ehcache-conflict-eternal.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/resources/ehcache-conflict-eternal.xml (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/test/resources/ehcache-conflict-eternal.xml (revision 0) @@ -1,16 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file Index: rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/store/cachingtier/OnHeapCachingTier.java =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/store/cachingtier/OnHeapCachingTier.java (revision 10990) +++ rctags/ehcache-2.10.7.0.37/ehcache-core/src/main/java/net/sf/ehcache/store/cachingtier/OnHeapCachingTier.java (revision 0) @@ -1,364 +0,0 @@ -/** - * Copyright Terracotta, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package net.sf.ehcache.store.cachingtier; - -import net.sf.ehcache.CacheException; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.config.AbstractCacheConfigurationListener; -import net.sf.ehcache.config.PinningConfiguration; -import net.sf.ehcache.config.SizeOfPolicyConfiguration; -import net.sf.ehcache.pool.Pool; -import net.sf.ehcache.pool.Size; -import net.sf.ehcache.pool.SizeOfEngine; -import net.sf.ehcache.pool.SizeOfEngineLoader; -import net.sf.ehcache.pool.sizeof.annotations.IgnoreSizeOf; -import net.sf.ehcache.store.CachingTier; -import net.sf.ehcache.store.FifoPolicy; -import net.sf.ehcache.store.LfuPolicy; -import net.sf.ehcache.store.LruPolicy; -import net.sf.ehcache.store.MemoryStoreEvictionPolicy; -import net.sf.ehcache.store.Policy; - -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.CopyOnWriteArrayList; -import net.sf.ehcache.store.StoreOperationOutcomes.GetOutcome; -import net.sf.ehcache.store.StoreOperationOutcomes.PutOutcome; -import net.sf.ehcache.store.StoreOperationOutcomes.RemoveOutcome; -import org.terracotta.context.annotations.ContextChild; -import org.terracotta.statistics.Statistic; -import org.terracotta.statistics.observer.OperationObserver; - -import static net.sf.ehcache.statistics.StatisticBuilder.operation; - -/** - * An instance of this class will delegate the storage to the backing HeapCacheBackEnd.
- * Adding : - *

    - *
  • making sure only a single thread populates the cache for a given key at a time
  • - *
  • translate calls to the eviction listeners
  • - *
  • Add all the crap about sizing and stuff
  • - *
- * - * @param The key type - * @param the value type - * @author Alex Snaps - */ -public class OnHeapCachingTier implements CachingTier { - - @ContextChild - private final HeapCacheBackEnd backEnd; - - private final OperationObserver getObserver = operation(GetOutcome.class).named("get").of(this).tag("local-heap").build(); - private final OperationObserver putObserver = operation(PutOutcome.class).named("put").of(this).tag("local-heap").build(); - private final OperationObserver removeObserver = operation(RemoveOutcome.class).named("remove").of(this).tag("local-heap").build(); - - - private volatile List> listeners = new CopyOnWriteArrayList>(); - - /** - * A Constructor - * - * @param backEnd the HeapCacheBackEnd that will back this CachingTier - */ - public OnHeapCachingTier(final HeapCacheBackEnd backEnd) { - this.backEnd = backEnd; - this.backEnd.registerEvictionCallback(new HeapCacheBackEnd.EvictionCallback() { - @Override - public void evicted(final K key, final Object value) { - final V v = getValue(value); - if (v != null) { - for (Listener listener : listeners) { - listener.evicted(key, v); - } - } - } - }); - } - - /** - * Factory method - * @param cache the cache we're planning to back - * @param onHeapPool the pool, if any, to use - * @return the OnHeapCachingTier properly configured for this cache - */ - public static OnHeapCachingTier createOnHeapCache(final Ehcache cache, final Pool onHeapPool) { - final HeapCacheBackEnd memCacheBackEnd; - final Policy memoryEvictionPolicy = determineEvictionPolicy(cache); - if (cache.getCacheConfiguration().isCountBasedTuned()) { - final long maxEntriesLocalHeap = getCachingTierMaxEntryCount(cache); - final CountBasedBackEnd countBasedBackEnd = - new CountBasedBackEnd(maxEntriesLocalHeap, memoryEvictionPolicy); - memCacheBackEnd = countBasedBackEnd; - cache.getCacheConfiguration().addConfigurationListener(new AbstractCacheConfigurationListener() { - @Override - public void memoryCapacityChanged(final int oldCapacity, final int newCapacity) { - countBasedBackEnd.setMaxEntriesLocalHeap(newCapacity); - } - }); - } else { - final PooledBasedBackEnd pooledBasedBackEnd = new PooledBasedBackEnd(memoryEvictionPolicy); - - pooledBasedBackEnd.registerAccessor( - onHeapPool.createPoolAccessor(new PooledBasedBackEnd.PoolParticipant(pooledBasedBackEnd), - SizeOfPolicyConfiguration.resolveMaxDepth(cache), - SizeOfPolicyConfiguration.resolveBehavior(cache) - .equals(SizeOfPolicyConfiguration.MaxDepthExceededBehavior.ABORT))); - - memCacheBackEnd = pooledBasedBackEnd; - } - - return new OnHeapCachingTier( - memCacheBackEnd); - } - - /** - * Chooses the Policy from the cache configuration - * - * @param cache the cache - * @return the chosen eviction policy - */ - static Policy determineEvictionPolicy(Ehcache cache) { - MemoryStoreEvictionPolicy policySelection = cache.getCacheConfiguration().getMemoryStoreEvictionPolicy(); - - if (policySelection.equals(MemoryStoreEvictionPolicy.LRU)) { - return new LruPolicy(); - } else if (policySelection.equals(MemoryStoreEvictionPolicy.FIFO)) { - return new FifoPolicy(); - } else if (policySelection.equals(MemoryStoreEvictionPolicy.LFU)) { - return new LfuPolicy(); - } else if (policySelection.equals(MemoryStoreEvictionPolicy.CLOCK)) { - return new LruPolicy(); - } - - throw new IllegalArgumentException(policySelection + " isn't a valid eviction policy"); - } - - - private static long getCachingTierMaxEntryCount(final Ehcache cache) { - final PinningConfiguration pinningConfiguration = cache.getCacheConfiguration().getPinningConfiguration(); - if (pinningConfiguration != null && pinningConfiguration.getStore() != PinningConfiguration.Store.INCACHE) { - return 0; - } - return cache.getCacheConfiguration().getMaxEntriesLocalHeap(); - } - - @Override - public boolean loadOnPut() { - return backEnd.hasSpace(); - } - - @Override - public V get(final K key, final Callable source, final boolean updateStats) { - if (updateStats) { getObserver.begin(); } - Object cachedValue = backEnd.get(key); - if (cachedValue == null) { - if (updateStats) { getObserver.end(GetOutcome.MISS); } - Fault f = new Fault(source); - cachedValue = backEnd.putIfAbsent(key, f); - if (cachedValue == null) { - try { - V value = f.get(); - putObserver.begin(); - if (value == null) { - backEnd.remove(key, f); - } else if (backEnd.replace(key, f, value)) { - putObserver.end(PutOutcome.ADDED); - } else { - V p = getValue(backEnd.remove(key)); - return p == null ? value : p; - } - return value; - } catch (Throwable e) { - backEnd.remove(key, f); - if (e instanceof RuntimeException) { - throw (RuntimeException)e; - } else { - throw new CacheException(e); - } - } - } - } else { - if (updateStats) { getObserver.end(GetOutcome.HIT); } - } - - return getValue(cachedValue); - } - - @Override - public V remove(final K key) { - removeObserver.begin(); - try { - return getValue(backEnd.remove(key)); - } finally { - removeObserver.end(RemoveOutcome.SUCCESS); - } - } - - @Override - public void clear() { - backEnd.clear(false); - } - - @Override - public void clearAndNotify() { - backEnd.clear(true); - } - - @Override - public void addListener(final Listener listener) { - if (listener == null) { - throw new NullPointerException("Listener can't be null!"); - } - listeners.add(listener); - } - - @Statistic(name = "size", tags = "local-heap") - @Override - public int getInMemorySize() { - return backEnd.size(); - } - - @Override - public int getOffHeapSize() { - return 0; - } - - @Override - public boolean contains(final K key) { - return backEnd.get(key) != null; - } - - @Statistic(name = "size-in-bytes", tags = "local-heap") - @Override - public long getInMemorySizeInBytes() { - long sizeInBytes; - if (backEnd instanceof PooledBasedBackEnd) { - sizeInBytes = ((PooledBasedBackEnd)backEnd).getSizeInBytes(); - } else { - SizeOfEngine defaultSizeOfEngine = SizeOfEngineLoader.newSizeOfEngine( - SizeOfPolicyConfiguration.DEFAULT_MAX_SIZEOF_DEPTH, - SizeOfPolicyConfiguration.DEFAULT_MAX_DEPTH_EXCEEDED_BEHAVIOR == SizeOfPolicyConfiguration.MaxDepthExceededBehavior.ABORT, - true - ); - sizeInBytes = 0; - for (Map.Entry entry : backEnd.entrySet()) { - // This could leak Fault values... We ignore these entirely - if (entry.getValue() != null && entry.getValue() instanceof Element) { - Element element = (Element)entry.getValue(); - // TODO this is a lie here! Should we add a dedicated method to BackEnd to return a container ? - Size size = defaultSizeOfEngine.sizeOf(element.getObjectKey(), element, null); - sizeInBytes += size.getCalculated(); - } - } - } - return sizeInBytes; - } - - @Override - public long getOffHeapSizeInBytes() { - return 0; - } - - @Override - public long getOnDiskSizeInBytes() { - return 0; - } - - @Override - public void recalculateSize(final K key) { - backEnd.recalculateSize(key); - } - - @Override - public Policy getEvictionPolicy() { - return backEnd.getPolicy(); - } - - @Override - public void setEvictionPolicy(final Policy policy) { - backEnd.setPolicy(policy); - } - - private V getValue(final Object cachedValue) { - if (cachedValue instanceof Fault) { - return ((Fault)cachedValue).get(); - } else { - return (V)cachedValue; - } - } - - /** - * Document me - * - * @param - */ - @IgnoreSizeOf - private static class Fault { - - private final Callable source; - private V value; - private Throwable throwable; - private boolean complete; - - public Fault(final Callable source) { - this.source = source; - } - - private void complete(V value) { - synchronized (this) { - this.value = value; - this.complete = true; - notifyAll(); - } - } - - private V get() { - synchronized (this) { - if (!complete) { - try { - complete(source.call()); - } catch (Throwable e) { - fail(e); - } - } - } - - return throwOrReturn(); - } - - private V throwOrReturn() { - if (throwable != null) { - if (throwable instanceof RuntimeException) { - throw (RuntimeException) throwable; - } - throw new CacheException("Faulting from repository failed", throwable); - } - return value; - } - - private void fail(final Throwable t) { - synchronized (this) { - this.throwable = t; - this.complete = true; - notifyAll(); - } - throwOrReturn(); - } - } -} Index: rctags/ehcache-2.10.7.0.37/terracotta/.settings/org.eclipse.jdt.ui.prefs =================================================================== diff -u -N --- rctags/ehcache-2.10.7.0.37/terracotta/.settings/org.eclipse.jdt.ui.prefs (revision 10990) +++ rctags/ehcache-2.10.7.0.37/terracotta/.settings/org.eclipse.jdt.ui.prefs (revision 0) @@ -1,66 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_Terracotta profile -formatter_settings_version=11 -org.eclipse.jdt.ui.exception.name=e -org.eclipse.jdt.ui.gettersetter.use.is=true -org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=org;com;java;javax; -org.eclipse.jdt.ui.javadoc=false -org.eclipse.jdt.ui.keywordthis=false -org.eclipse.jdt.ui.ondemandthreshold=99 -org.eclipse.jdt.ui.overrideannotation=true -org.eclipse.jdt.ui.staticondemandthreshold=99 -org.eclipse.jdt.ui.text.custom_code_templates=