Index: rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-impl-v1/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-impl-v1/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-impl-v1/pom.xml (revision 0) @@ -1,110 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.9.0.373 - .. - - - 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 - - - javax.servlet - javax.servlet-api - - - org.easymock - easymock - test - - - org.eclipse.jetty - jetty-servlet - test - - - org.mockito - mockito-core - - - org.powermock - powermock-api-easymock - test - - - org.powermock - powermock-module-junit4 - test - - - org.hamcrest - hamcrest - - - 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.9.0.373/distribution/colorcache/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/distribution/colorcache/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/distribution/colorcache/pom.xml (revision 0) @@ -1,152 +0,0 @@ - - 4.0.0 - - org.terracotta.forge - forge-parent - 4.16 - - - net.sf.ehcache.examples - colorcache - 2.10.9.0.373 - colorcache - war - Clustered Ehcache sample with Terracotta - - 4.3.9.0.270 - true - 9.4.28.v20200408 - - - ${project.name} - - - maven-assembly-plugin - 2.3 - - ${project.name} - - src/assemble/distribution.xml - - gnu - - - - package - - single - - - - - - jetty-maven-plugin - ${jetty.version} - org.eclipse.jetty - - - ${project.name} - - STOP - - - - org.terracotta.maven.plugins - tc-maven-plugin - - - org.terracotta - terracotta - ${terracotta.version} - - - - - - - - net.sf.ehcache - ehcache - ${project.version} - - - org.terracotta - terracotta-toolkit-runtime - ${terracotta.version} - - - javax.servlet - javax.servlet-api - 3.1.0 - - - org.slf4j - slf4j-jdk14 - 1.7.25 - - - - - 9081 - - - - jetty-maven-plugin - ${jetty.version} - org.eclipse.jetty - - - - jetty.port - 9081 - - - 9981 - - - - - - - 9082 - - - - jetty-maven-plugin - ${jetty.version} - org.eclipse.jetty - - - - jetty.port - 9082 - - - 9982 - - - - - - - - - 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.9.0.373/distribution/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/distribution/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/distribution/pom.xml (revision 0) @@ -1,298 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - - - 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 - groovy-maven-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.9.0.373/ehcache/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache/pom.xml (revision 0) @@ -1,418 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - .. - - - 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 - 2.1.1 - 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 - - - org.terracotta - product-upgradability-testing-utils - 0.9.4 - test - - - org.codehaus.btm - btm - 2.1.3 - test - - - org.quartz-scheduler - quartz - 2.2.3 - test - - - org.slf4j - slf4j-jdk14 - - - - - - - ${basedir}/src/main/resources - true - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-TIMs - - org.terracotta.modules - ${project.build.outputDirectory}/META-INF/terracotta/TIMs - - 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} - - - - - - - - - - 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 - 3.1.1 - - - create-javadoc - prepare-package - - jar - - - - - org.hibernate - hibernate-core - ${hibernate-core.version} - - - none - ${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 - - 8 -
-
-
-
- - - 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 - 4.2.1 - - ${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;resolution:=optional, - javax.xml.transform.sax;resolution:=optional, - javax.xml.transform.dom;resolution:=optional, - javax.xml.transform.stream;resolution:=optional, - org.w3c.dom;resolution:=optional, - org.hibernate.*;resolution:=optional, - org.terracotta.toolkit.*;resolution:=optional, - org.quartz.*;resolution:=optional, - org.terracotta.quartz.*;resolution:=optional, - com.sun.management.*;resolution:="optional", - net.sf.ehcache.terracotta.security;resolution:=optional, - org.jboss.vfs;resolution:=optional, - sun.management.*;resolution:=optional, - !com.google.apphosting.api, - !sun.misc,* - - net.sf.ehcache.* - org.terracotta.* - JavaSE-1.8 - - *;scope=provided|runtime - - - - generate-osgi-headers - package - - manifest - - - - - - org.codehaus.gmaven - groovy-maven-plugin - ${groovy-maven-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.9.0.373/ehcache-scheduled-refresh/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/pom.xml (revision 0) @@ -1,49 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - .. - - - 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 - - - org.hamcrest - hamcrest - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - Index: rctags/ehcache-2.10.9.0.373/README.txt =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/README.txt (revision 11344) +++ rctags/ehcache-2.10.9.0.373/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.9.0.373/ehcache-search-parser/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-search-parser/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-search-parser/pom.xml (revision 0) @@ -1,56 +0,0 @@ - - - 4.0.0 - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - .. - - - 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 - - - org.hamcrest - hamcrest - - - net.sf.ehcache.internal - ehcache-core - test-jar - ${project.version} - test - - - Index: rctags/ehcache-2.10.9.0.373/system-tests/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/pom.xml (revision 0) @@ -1,291 +0,0 @@ - - 4.0.0 - - org.terracotta - system-tests-parent - 4.3.9.0.270 - - - net.sf.ehcache.internal - ehcache-terracotta-system-tests - 2.10.9.0.373 - ehcache-terracotta-system-tests - System tests for ehcache-terracotta - - 512m - 1024m - -XX:MaxPermSize=512m - true - 10.10.1.1 - 2.2.3 - 1.7.25 - 1.9 - - - - org.terracotta - terracotta - ${terracotta.core.version} - - - javax.servlet - 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.terracotta - terracotta-toolkit-runtime - ${terracotta.core.version} - test - - - org.ow2.asm - asm - 7.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 - - - commons-logging - commons-logging - - - commons-logging - commons-logging-api - - - - - org.terracotta.test - container-test-framework - - - org.quartz-scheduler - quartz - ${quartz.version} - - - io.rest-assured - rest-assured - - - org.codehaus.groovy - groovy - - - org.codehaus.groovy - groovy-json - - - org.codehaus.groovy - groovy-xml - - - 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 - - - - - - - - - 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.9.0.373/management-ehcache-impl/ehcache-rest-agent/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/ehcache-rest-agent/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/ehcache-rest-agent/pom.xml (revision 0) @@ -1,223 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.9.0.373 - .. - - - net.sf.ehcache.internal - ehcache-rest-agent - ehcache-rest-agent - - Ehcache REST implementation - - - rest-management-private-classpath - .class_terracotta - true - false - 2.3.2 - - - - - net.sf.ehcache - management-ehcache-impl-v1 - ${project.version} - - - net.sf.ehcache - management-ehcache-impl-v2 - ${project.version} - - - javax.servlet - javax.servlet-api - 3.1.0 - runtime - - - org.eclipse.jetty - jetty-servlet - - - org.glassfish.jaxb - jaxb-runtime - ${jaxb-runtime.version} - runtime - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - - - - 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 - groovy-maven-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.9.0.373/management-ehcache-impl/management-ehcache-common/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/pom.xml (revision 0) @@ -1,87 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.9.0.373 - .. - - - management-ehcache-common - management-ehcache-common - A common library shared between different management-ehcache implementation versions - - - - org.terracotta - management-core-resources - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - provided - - - javax.servlet - javax.servlet-api - - - org.eclipse.jetty - jetty-servlet - - - commons-io - commons-io - 2.6 - test - - - org.easymock - easymock - 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.9.0.373/management-ehcache-impl/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/pom.xml (revision 0) @@ -1,43 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - .. - - - 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.9.0.373/ehcache-core/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/pom.xml (revision 0) @@ -1,537 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - - - 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 - - - commons-logging - commons-logging - - - org.codehaus.btm - btm - - - net.sf.hibernate - hibernate - - - org.hamcrest - hamcrest - - - junit - junit - - - hamcrest-core - org.hamcrest - - - - - dom4j - dom4j - - - javassist - javassist - - - org.hibernate - hibernate-ehcache - - - 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 - - 1 - false - ${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 - - - - - build-info - generate-resources - - buildinfo - - - ${basedir}/.. - - - - - 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 - false - false - false - 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.glassfish.corba - rmic - 4.2.1 - - - - - - - - - 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.9.0.373/TestCategories.properties =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/TestCategories.properties (revision 11344) +++ rctags/ehcache-2.10.9.0.373/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.9.0.373/management-ehcache-impl/management-ehcache-impl-v2/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-impl-v2/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-impl-v2/pom.xml (revision 0) @@ -1,137 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - management-ehcache-impl-parent - 2.10.9.0.373 - .. - - - 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.10 - provided - - - org.terracotta.toolkit - terracotta-toolkit-api-internal - provided - - - javax.servlet - javax.servlet-api - runtime - - - 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 - 2.1 - 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.9.0.373/third-party.txt =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/third-party.txt (revision 11344) +++ rctags/ehcache-2.10.9.0.373/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.9.0.373/terracotta/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/terracotta/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/terracotta/pom.xml (revision 0) @@ -1,74 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - - - 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.9.0.373/distribution/events/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/distribution/events/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/distribution/events/pom.xml (revision 0) @@ -1,247 +0,0 @@ - - 4.0.0 - - org.terracotta.forge - forge-parent - 4.16 - - - net.sf.ehcache.examples - events - 2.10.9.0.373 - events - war - Clustered Ehcache Terracotta as second level cache for Hibernate - - 4.3.9.0.270 - 1.1.116 - 1.1 - true - - - - org.slf4j - slf4j-api - 1.7.25 - - - ch.qos.logback - logback-classic - 1.2.3 - - - javassist - javassist - 3.8.0.GA - - - h2 - ${h2.version} - com.h2database - - - net.sf.ehcache - ehcache - ${project.version} - - - org.terracotta - terracotta-toolkit-runtime - ${terracotta.version} - - - javax.servlet - 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 - - - - - - jetty-maven-plugin - ${jetty.version} - org.eclipse.jetty - - - ${project.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 - - - 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 - - - - jetty-maven-plugin - ${jetty.version} - org.eclipse.jetty - - - - jetty.port - 9081 - - - 9981 - - - - - - - 9082 - - - - jetty-maven-plugin - ${jetty.version} - org.eclipse.jetty - - - - jetty.port - 9082 - - - 9982 - - - - - - - - - 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.9.0.373/terracotta/bootstrap/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/pom.xml (revision 0) @@ -1,98 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache.internal - ehcache-terracotta-root - 2.10.9.0.373 - - - ehcache-terracotta-bootstrap - ehcache-terracotta-bootstrap - jar - - - false - 1.19 - 0.11.1 - - - - - net.sf.ehcache.internal - ehcache-core - ${project.version} - provided - - - org.terracotta.toolkit - terracotta-toolkit-api-internal - ${terracotta-toolkit-api-internal.version} - - - com.terracotta - clustered-entity-management - ${clustered-entity-management.version} - - - org.mockito - mockito-core - 3.0.0 - test - - - junit - junit - 4.12 - test - - - org.hamcrest - hamcrest-core - - - - - org.hamcrest - hamcrest - - - 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.9.0.373/management-ehcache-v2/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-v2/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-v2/pom.xml (revision 0) @@ -1,72 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - .. - - - 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.9.0.373/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/pom.xml (revision 0) @@ -1,486 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-parent - 2.25 - - - - ehcache-root - net.sf.ehcache - ehcache-root - pom - 2.10.9.0.373 - - - scm:svn:https://svn.terracotta.org/repo/ehcache/trunk/ehcache - - - - 1.7.25 - 1.0.1 - 2.1.1 - 1.19 - 2.1.21 - 0.11.1 - 1.0.5 - 2.2.3 - 9.4.28.v20200408 - 2.3.2 - 3.5.1-Final - 1.2 - false - - - - 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 - - - - - - - - - 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 - ${sizeof-agent.version} - provided - - - - - org.slf4j - slf4j-jdk14 - ${slf4j.version} - test - - - commons-logging - commons-logging - ${commons-logging.version} - test - - - org.codehaus.btm - btm - 2.1.3 - test - - - net.sf.hibernate - hibernate - 2.1.8 - test - - - org.hamcrest - hamcrest - 2.1 - test - - - junit - junit - 4.12 - test - - - hamcrest-core - org.hamcrest - - - - - 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 - - - - - org.apache.derby - derby - 10.5.3.0_1 - test - - - org.mockito - mockito-core - 3.0.0 - test - - - com.sun.xsom - xsom - 20100725 - test - - - org.beanshell - bsh - 1.3.0 - test - - - org.quartz-scheduler - quartz - ${quartz.version} - - - org.easymock - easymock - 4.0.2 - test - - - org.powermock - powermock-api-easymock - 2.0.2 - test - - - org.powermock - powermock-module-junit4 - 2.0.2 - test - - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - - true - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.1 - - ${skipJavadoc} - 8 - -Xdoclint:all,-Xdoclint:-missing - true - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.1.0 - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.1 - - - 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 - groovy-maven-plugin - ${groovy-maven-plugin.version} - - - org.codehaus.mojo - rmic-maven-plugin - 1.3 - - - - - - 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.9.0.373/management-ehcache-v1/pom.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-v1/pom.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-v1/pom.xml (revision 0) @@ -1,72 +0,0 @@ - - - 4.0.0 - - - net.sf.ehcache - ehcache-root - 2.10.9.0.373 - .. - - - 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.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/constructs/CacheDecoratorFactoryTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/constructs/CacheDecoratorFactoryTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/constructs/CacheDecoratorFactoryTest.java (revision 0) @@ -1,99 +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; - -import java.util.Arrays; -import java.util.List; - -import org.junit.Test; -import org.junit.experimental.categories.Category; - -import junit.framework.TestCase; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.constructs.MockDecoratorFactory.MockDecoratorFactoryCache; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.terracotta.test.categories.CheckShorts; - -/** - * @author Abhishek Sanoujam - */ -@Category(CheckShorts.class) -public class CacheDecoratorFactoryTest extends TestCase { - - private static final Logger LOG = LoggerFactory.getLogger(CacheDecoratorFactoryTest.class); - - @Test - public void testCacheDecoratorFactory() { - CacheManager cacheManager = new CacheManager(getClass().getResourceAsStream("/ehcache-decorator-test.xml")); - List cacheNames = Arrays.asList(cacheManager.getCacheNames()); - LOG.info("" + cacheNames); - - assertEquals(12, cacheNames.size()); - - assertTrue(cacheNames.contains("noDecoratorCache")); - assertTrue(cacheNames.contains("oneDecoratorCache")); - assertTrue(cacheNames.contains("oneDecoratorFirst")); - assertTrue(cacheNames.contains("twoDecoratorCache")); - assertTrue(cacheNames.contains("twoDecoratorFirst")); - assertTrue(cacheNames.contains("twoDecoratorSecond")); - assertTrue(cacheNames.contains("fiveDecoratorCache")); - assertTrue(cacheNames.contains("fiveDecoratorFirst")); - assertTrue(cacheNames.contains("fiveDecoratorSecond")); - assertTrue(cacheNames.contains("fiveDecoratorThird")); - assertTrue(cacheNames.contains("fiveDecoratorFourth")); - assertTrue(cacheNames.contains("fiveDecoratorFifth")); - - cacheManager.shutdown(); - - } - - @Test - public void testCacheDecoratorFactoryProperties() { - CacheManager cacheManager = new CacheManager(getClass().getResourceAsStream("/ehcache-decorator-test.xml")); - List cacheNames = Arrays.asList(cacheManager.getCacheNames()); - assertEquals(12, cacheNames.size()); - - MockDecoratorFactoryCache cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("oneDecoratorFirst"); - assertEquals("oneFirst", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("twoDecoratorFirst"); - assertEquals("twoFirst", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("twoDecoratorSecond"); - assertEquals("twoSecond", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("fiveDecoratorFirst"); - assertEquals("fiveFirst", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("fiveDecoratorSecond"); - assertEquals("fiveSecond", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("fiveDecoratorThird"); - assertEquals("fiveThird", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("fiveDecoratorFourth"); - assertEquals("fiveFourth", cache.getProperties().getProperty("someKey")); - - cache = (MockDecoratorFactoryCache) cacheManager.getEhcache("fiveDecoratorFifth"); - assertEquals("fiveFifth", cache.getProperties().getProperty("someKey")); - - cacheManager.shutdown(); - - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/container/hibernate/domain/Person.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/container/hibernate/domain/Person.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/container/hibernate/domain/Person.java (revision 0) @@ -1,108 +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.container.hibernate.domain; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -public class Person { - - private Long id; - private int age; - private String firstname; - private String lastname; - private List events = new ArrayList(); // list semantics, e.g., indexed - private Set emailAddresses = new HashSet(); - private Set phoneNumbers = new HashSet(); - private List talismans = new ArrayList(); // a Bag of good-luck charms. - - public Person() { - // - } - - public List getEvents() { - return events; - } - - protected void setEvents(List events) { - this.events = events; - } - - public void addToEvent(Event event) { - this.getEvents().add(event); - event.getParticipants().add(this); - } - - public void removeFromEvent(Event event) { - this.getEvents().remove(event); - event.getParticipants().remove(this); - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getFirstname() { - return firstname; - } - - public void setFirstname(String firstname) { - this.firstname = firstname; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLastname() { - return lastname; - } - - public void setLastname(String lastname) { - this.lastname = lastname; - } - - public Set getEmailAddresses() { - return emailAddresses; - } - - public void setEmailAddresses(Set emailAddresses) { - this.emailAddresses = emailAddresses; - } - - public Set getPhoneNumbers() { - return phoneNumbers; - } - - public void setPhoneNumbers(Set phoneNumbers) { - this.phoneNumbers = phoneNumbers; - } - - public void addTalisman(String name) { - talismans.add(name); - } - - public List getTalismans() { - return talismans; - } - - public void setTalismans(List talismans) { - this.talismans = talismans; - } - - public String toString() { - return getFirstname() + " " + getLastname(); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/transaction/TransactionTimeoutException.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/transaction/TransactionTimeoutException.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/transaction/TransactionTimeoutException.java (revision 0) @@ -1,32 +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; - -/** - * This exception is thrown when a transactional operation times out - * - * @author Ludovic Orban - */ -public class TransactionTimeoutException extends TransactionException { - - /** - * Create a new TransactionTimeoutException - * @param message the error message - */ - public TransactionTimeoutException(String message) { - super(message); - } -} Index: rctags/ehcache-2.10.9.0.373/distribution/events/src/assemble/bin/start-jetty.bat =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/distribution/events/src/assemble/bin/start-jetty.bat (revision 11344) +++ rctags/ehcache-2.10.9.0.373/distribution/events/src/assemble/bin/start-jetty.bat (revision 0) @@ -1,40 +0,0 @@ -@echo off - -if not defined JAVA_HOME ( - echo JAVA_HOME is not defined - exit /b 1 -) - -setlocal - -set jetty_instance=%1 - -if "%jetty_instance%" == "" ( - echo Need to specify which instance of Jetty: 9081 or 9082 - exit /b 1 -) - -pushd "%~d0%~p0" -for /f "tokens=*" %%a in ('call relative-paths.bat tc_install_dir') do set tc_install_dir=%%a -pushd -cd %tc_install_dir% -set tc_install_dir=%CD% -set tc_install_dir="%tc_install_dir:"=%" -popd -popd - -set JAVA_HOME="%JAVA_HOME:"=%" -set root=%~d0%~p0.. -set root="%root:"=%" -set jetty_work_dir=%root%\jetty6.1\%jetty_instance% -set jetty_home=%tc_install_dir%\third-party\jetty-6.1.15 -set start_jar=%jetty_home%\start.jar -set /a stop_port=jetty_instance + 2 - -cd %jetty_work_dir% -mkdir logs -echo Starting Jetty %jetty_instance%... -start "Jetty %jetty_instance%" %JAVA_HOME%\bin\java -Dtc.install-root=%tc_install_dir% -Xmx256m -XX:MaxPermSize=128m -Dconfig.home=%jetty_work_dir% -Djetty.home=%jetty_home% -DSTOP.PORT=%stop_port% -DSTOP.KEY=secret -jar %start_jar% conf.xml -echo. - -endlocal Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/cluster/NoopCacheCluster.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/cluster/NoopCacheCluster.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/cluster/NoopCacheCluster.java (revision 0) @@ -1,98 +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.cluster; - -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -/** - * This is a dummy implementation of the CacheCluster (Null Object Pattern). It ignores - * all listeners and reports no nodes. - * - * @author Geert Bevin - * @since 2.0 - */ -public class NoopCacheCluster implements CacheCluster { - - /** - * A singleton instance you can use rather than constructing your own. - */ - public static final CacheCluster INSTANCE = new NoopCacheCluster(); - - /** - * {@inheritDoc} - */ - public Collection getNodes() { - return Collections.emptyList(); - } - - /** - * Always returns the ClusterScheme.NONE - * - * @return {@link ClusterScheme#NONE} - */ - public ClusterScheme getScheme() { - return ClusterScheme.NONE; - } - - /** - * {@inheritDoc} - */ - public boolean addTopologyListener(ClusterTopologyListener listener) { - return false; - } - - /** - * {@inheritDoc} - */ - public boolean removeTopologyListener(ClusterTopologyListener listener) { - return false; - } - - /** - * {@inheritDoc} - */ - public boolean isClusterOnline() { - return true; - } - - /** - * {@inheritDoc} - */ - public ClusterNode getCurrentNode() { - return null; - } - - /** - * {@inheritDoc} - */ - public ClusterNode waitUntilNodeJoinsCluster() { - return null; - } - - /** - * {@inheritDoc} - */ - public List getTopologyListeners() { - return Collections.emptyList(); - } - - @Override - public void removeAllListeners() { - // - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/util/WeakIdentityConcurrentMapTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/util/WeakIdentityConcurrentMapTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/util/WeakIdentityConcurrentMapTest.java (revision 0) @@ -1,62 +0,0 @@ -package net.sf.ehcache.util; - -import org.hamcrest.core.Is; -import org.junit.Test; - -import java.util.concurrent.Callable; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.atomic.AtomicLong; - -import static java.util.concurrent.TimeUnit.SECONDS; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.assertThat; - -/** - * @author Alex Snaps - */ -public class WeakIdentityConcurrentMapTest { - - private Long someKey = 1024L; - - @Test - public void testReturnsValueAndCleanUpsProperly() { - - final ConcurrentMap cleanedUpValues = new ConcurrentHashMap(); - - final WeakIdentityConcurrentMap map = new WeakIdentityConcurrentMap(new WeakIdentityConcurrentMap.CleanUpTask() { - public void cleanUp(final String value) { - final AtomicLong previous = cleanedUpValues.putIfAbsent(value, new AtomicLong(1)); - if(previous != null) { - previous.incrementAndGet(); - } - } - }); - - final String value1 = "someValue for 1"; - final String value2 = "someValue for 1024"; - assertThat(map.putIfAbsent(1L, value1), nullValue()); - assertThat(map.putIfAbsent(someKey, value2), nullValue()); - assertThat(map.putIfAbsent(someKey, value2), equalTo(value2)); - assertThat(map.get(1L), equalTo(value1)); - assertThat(map.get(someKey), equalTo(value2)); - someKey = null; - - RetryAssert.assertBy(10, SECONDS, new Callable() { - public Integer call() throws Exception { - int i = 0; - while (i++ < 50) { - System.gc(); - assertThat(map.get(someKey), nullValue()); - } - return cleanedUpValues.size(); - } - }, Is.is(1)); - - assertThat(cleanedUpValues.get(value2), notNullValue()); - assertThat(cleanedUpValues.get(value2).get(), is(1L)); - } -} Index: rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/test/java/org/terracotta/modules/ehcache/store/CacheConfigChangeBridgeTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/test/java/org/terracotta/modules/ehcache/store/CacheConfigChangeBridgeTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/test/java/org/terracotta/modules/ehcache/store/CacheConfigChangeBridgeTest.java (revision 0) @@ -1,132 +0,0 @@ -package org.terracotta.modules.ehcache.store; - -import net.sf.ehcache.config.CacheConfiguration; -import org.junit.Before; -import org.junit.Test; -import org.terracotta.toolkit.config.AbstractConfiguration; -import org.terracotta.toolkit.config.Configuration; -import org.terracotta.toolkit.events.ToolkitNotifier; -import org.terracotta.toolkit.internal.cache.ToolkitCacheInternal; -import org.terracotta.toolkit.store.ToolkitConfigFields; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.when; - -/** - * @author tim - */ -public class CacheConfigChangeBridgeTest { - - private ToolkitCacheInternal backend; - private CacheConfiguration cacheConfiguration; - private ToolkitNotifier notifier; - private TestConfiguration toolkitCacheConfig; - - @Before - public void setUp() throws Exception { - toolkitCacheConfig = new TestConfiguration(); - backend = when(mock(ToolkitCacheInternal.class).getConfiguration()) - .thenReturn(toolkitCacheConfig).getMock(); - cacheConfiguration = spy(new CacheConfiguration()); - notifier = mock(ToolkitNotifier.class); - } - - @Test - public void testConnectConfigsSetsUpLocalCacheConfiguration() throws Exception { - cacheConfiguration.freezeConfiguration(); - - CacheConfigChangeBridge bridge = new CacheConfigChangeBridge("foo", - backend, notifier, cacheConfiguration); - - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TOTAL_COUNT_FIELD_NAME, 123); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TTI_SECONDS_FIELD_NAME, 321); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TTL_SECONDS_FIELD_NAME, 456); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_COUNT_LOCAL_HEAP_FIELD_NAME, 42); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_BYTES_LOCAL_HEAP_FIELD_NAME, 1L); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_BYTES_LOCAL_OFFHEAP_FIELD_NAME, 2L); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.OFFHEAP_ENABLED_FIELD_NAME, true); - - bridge.connectConfigs(); - - assertThat(cacheConfiguration.getMaxEntriesInCache(), is(123L)); - assertThat(cacheConfiguration.getTimeToLiveSeconds(), is(456L)); - assertThat(cacheConfiguration.getTimeToIdleSeconds(), is(321L)); - assertThat(cacheConfiguration.isEternal(), is(false)); - assertThat(cacheConfiguration.getMaxEntriesLocalHeap(), is(42L)); - assertThat(cacheConfiguration.getMaxBytesLocalHeap(), is(1L)); - assertThat(cacheConfiguration.getMaxBytesLocalOffHeap(), is(2L)); - assertThat(cacheConfiguration.isOverflowToOffHeap(), is(true)); - } - - @Test - public void testEmptyConfigFromToolkitCache() throws Exception { - CacheConfigChangeBridge bridge = new CacheConfigChangeBridge("foo", - backend, notifier, cacheConfiguration); - - bridge.connectConfigs(); - - // Empty config so only check for registration of the listener and nothing else. - verify(cacheConfiguration).addConfigurationListener(bridge); - verifyNoMoreInteractions(cacheConfiguration); - } - - @Test - public void testOverrideLocallyConfiguredExpiry() throws Exception { - cacheConfiguration.setEternal(false); - cacheConfiguration.setTimeToLiveSeconds(123); - cacheConfiguration.setTimeToIdleSeconds(321); - - CacheConfigChangeBridge bridge = new CacheConfigChangeBridge("foo", - backend, notifier, cacheConfiguration); - - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TTI_SECONDS_FIELD_NAME, 0); - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TTL_SECONDS_FIELD_NAME, 0); - - bridge.connectConfigs(); - - assertThat(cacheConfiguration.isEternal(), is(false)); - assertThat(cacheConfiguration.getTimeToLiveSeconds(), is(0L)); - assertThat(cacheConfiguration.getTimeToIdleSeconds(), is(0L)); - } - - @Test - public void testSetUnlimitedMaxEntriesInCache() throws Exception { - CacheConfigChangeBridge bridge = new CacheConfigChangeBridge("foo", - backend, notifier, cacheConfiguration); - - toolkitCacheConfig.internalSetConfigMapping(ToolkitConfigFields.MAX_TOTAL_COUNT_FIELD_NAME, -1); - - bridge.connectConfigs(); - - assertThat(cacheConfiguration.getMaxEntriesInCache(), is(0L)); - } - - private static class TestConfiguration extends AbstractConfiguration { - private final Map map = new HashMap(); - - @Override - protected void internalSetConfigMapping(final String key, final Serializable value) { - map.put(key, value); - } - - @Override - public Set getKeys() { - return map.keySet(); - } - - @Override - public Serializable getObjectOrNull(final String name) { - return map.get(name); - } - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/readthrough/ReadThroughCache.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/readthrough/ReadThroughCache.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/readthrough/ReadThroughCache.java (revision 0) @@ -1,77 +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.readthrough; - -import java.io.Serializable; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheException; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.constructs.EhcacheDecoratorAdapter; - -/** - * This class implements the simplest of all possible read through cache - * behaviors, where a call the get() will delegate to a call to getWithLoader(). - * This means that a get() call can take a long time; beware. It also does no more - * locking than {@link Cache} implements; each separate cache may try to load - * a key at the same time. - * - * @author cschanck - * - */ -public class ReadThroughCache extends EhcacheDecoratorAdapter { - - private final ReadThroughCacheConfiguration readThroughCacheConfig; - private final boolean isModeGet; - - /** - * - * @param underlyingCache - * @param config - */ - public ReadThroughCache(Ehcache underlyingCache, ReadThroughCacheConfiguration config) { - super(underlyingCache); - this.readThroughCacheConfig = config; - this.isModeGet = readThroughCacheConfig.isModeGet(); - } - - @Override - public Element get(Object key) throws IllegalStateException, CacheException { - if (isModeGet) { - return super.getWithLoader(key, null, null); - } - return super.get(key); - } - - @Override - public Element get(Serializable key) throws IllegalStateException, CacheException { - if (isModeGet) { - return super.getWithLoader(key, null, null); - } - return super.get(key); - } - - @Override - public String getName() { - if (readThroughCacheConfig.getName() != null) { - return readThroughCacheConfig.getName(); - } - return super.getName(); - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/ElementValueComparatorConfigurationElement.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/ElementValueComparatorConfigurationElement.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/ElementValueComparatorConfigurationElement.java (revision 0) @@ -1,55 +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.ElementValueComparatorConfiguration; -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 net.sf.ehcache.config.generator.model.NodeElement} representing the - * {@link net.sf.ehcache.config.ElementValueComparatorConfiguration} - * - * @author Ludovic Orban - * - */ -public class ElementValueComparatorConfigurationElement extends SimpleNodeElement { - - private final ElementValueComparatorConfiguration elementValueComparatorConfiguration; - - /** - * Constructor accepting the parent and the {@link net.sf.ehcache.config.ElementValueComparatorConfiguration} - * - * @param parent - * @param elementValueComparatorConfiguration - */ - public ElementValueComparatorConfigurationElement(NodeElement parent, - ElementValueComparatorConfiguration elementValueComparatorConfiguration) { - super(parent, "elementValueComparator"); - this.elementValueComparatorConfiguration = elementValueComparatorConfiguration; - init(); - } - - private void init() { - if (elementValueComparatorConfiguration == null) { - return; - } - addAttribute(new SimpleNodeAttribute("class", elementValueComparatorConfiguration.getClassName()).optional(false)); - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/loader/CompositeLoaderTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/loader/CompositeLoaderTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/loader/CompositeLoaderTest.java (revision 0) @@ -1,69 +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.loader; - - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * ComponentA is composed of ComponentB and some other fields. Tests the interactions between two loaders, where the first component's - * loader loads component B by using getWithLoader, which in turn invokes component B's loader. - * - * @author Greg Luck - * @version $Id: CompositeLoaderTest.java 5594 2012-05-07 16:04:31Z cdennis $ - */ -public class CompositeLoaderTest { - - private static final Logger LOG = LoggerFactory.getLogger(CompositeLoaderTest.class.getName()); - - /** - * Sets up the fixture, for example, open a network connection. - * This method is called before a test is executed. - */ - @Before - public void setUp() throws Exception { - CacheHelper.init(); - } - - /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - */ - @After - public void tearDown() throws Exception { - CacheHelper.shutdown(); - } - - /** - * This test reproduces a deadlock found in 1.4-beta1 around loading interactions and getWithLoader. Now fixed. - */ - @Test - public void testCompositeLoad() { - LOG.info("Getting from cache"); - ComponentA compA = (ComponentA) CacheHelper.get("ehcache-loaderinteractions.xml", "ACache", "key1"); - LOG.info(compA.toString()); - - } - -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/store/StorageStrategyNotSupportedTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/store/StorageStrategyNotSupportedTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/store/StorageStrategyNotSupportedTest.java (revision 0) @@ -1,69 +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.CacheException; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.config.CacheConfiguration; -import net.sf.ehcache.config.TerracottaConfiguration; - -import org.terracotta.ehcache.tests.AbstractCacheTestBase; -import org.terracotta.ehcache.tests.ClientBase; -import org.terracotta.toolkit.Toolkit; - -import com.tc.test.config.model.TestConfig; - -import junit.framework.Assert; - -public class StorageStrategyNotSupportedTest extends AbstractCacheTestBase { - - public StorageStrategyNotSupportedTest(TestConfig testConfig) { - super("ehcache-not-supported.xml", testConfig, App.class); - } - - public static class App extends ClientBase { - - 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 { - - CacheManager cm = getCacheManager(); - - try { - Assert.assertEquals(1, cm.getCacheNames().length); - Assert.assertTrue(cm.getCacheNames()[0].equals("test")); - } catch (CacheException e) { - fail("Using storageStrategy=dcv2 should work even without ee"); - } - - // test programmatic way - cm.shutdown(); - setupCacheManager(); - cm = getCacheManager(); - CacheConfiguration cacheConfiguration = new CacheConfiguration("testCache", 100); - TerracottaConfiguration tc = new TerracottaConfiguration().clustered(true); - cacheConfiguration.addTerracotta(tc); - cache = new Cache(cacheConfiguration); - - cm.removeCache("test"); - - try { - cm.addCache(cache); - Assert.assertEquals(1, cm.getCacheNames().length); - Assert.assertTrue(cm.getCacheNames()[0].equals("testCache")); - } catch (CacheException e) { - e.printStackTrace(); - fail("Using storageStrategy=dcv2 should work even without ee"); - } - } - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/event/CacheEventListenerFactory.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/event/CacheEventListenerFactory.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/event/CacheEventListenerFactory.java (revision 0) @@ -1,39 +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.event; - -import java.util.Properties; - -/** - * An abstract factory for creating listeners. Implementers should provide their own - * concrete factory extending this factory. It can then be configured in ehcache.xml. - * - * @author Greg Luck - * @version $Id: CacheEventListenerFactory.java 5594 2012-05-07 16:04:31Z cdennis $ - */ -public abstract class CacheEventListenerFactory { - - /** - * Create a CacheEventListener - * - * @param properties implementation specific properties. These are configured as comma - * separated name value pairs in ehcache.xml - * @return a constructed CacheEventListener - */ - public abstract CacheEventListener createCacheEventListener(Properties properties); - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/util/SetAsList.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/util/SetAsList.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/util/SetAsList.java (revision 0) @@ -1,212 +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.util; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.Set; - -/** - * Wraps a set to provide a list interface. - * All list methods not application to set throws an {@link UnsupportedOperationException} - * - * @author Chris Dennis - * @param - */ -public class SetAsList implements List { - - private final Set set; - private transient Object[] array; - - /** - * @param set - */ - public SetAsList(Set set) { - this.set = set; - } - - /** - * {@inheritDoc} - */ - public int size() { - return set.size(); - } - - /** - * {@inheritDoc} - */ - public boolean isEmpty() { - return set.isEmpty(); - } - - /** - * {@inheritDoc} - */ - public boolean contains(Object o) { - return set.contains(o); - } - - /** - * {@inheritDoc} - */ - public Iterator iterator() { - return set.iterator(); - } - - /** - * {@inheritDoc} - */ - public Object[] toArray() { - return set.toArray(); - } - - /** - * {@inheritDoc} - */ - public T[] toArray(T[] a) { - return set.toArray(a); - } - - /** - * {@inheritDoc} - */ - public boolean add(E e) { - return set.add(e); - } - - /** - * {@inheritDoc} - */ - public boolean remove(Object o) { - return set.remove(o); - } - - /** - * {@inheritDoc} - */ - public boolean containsAll(Collection c) { - return set.containsAll(c); - } - - /** - * {@inheritDoc} - */ - public boolean addAll(Collection c) { - return set.addAll(c); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public boolean addAll(int index, Collection c) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * {@inheritDoc} - */ - public boolean removeAll(Collection c) { - return set.removeAll(c); - } - - /** - * {@inheritDoc} - */ - public boolean retainAll(Collection c) { - return set.retainAll(c); - } - - /** - * {@inheritDoc} - */ - public void clear() { - set.clear(); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - * - * @param index Index - */ - public E get(int index) { - if (this.array == null) { - this.array = toArray(); - } - if (array.length <= index) { - throw new IndexOutOfBoundsException(); - } - return (E) this.array[index]; - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public E set(int index, E element) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public void add(int index, E element) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public E remove(int index) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public int indexOf(Object o) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public int lastIndexOf(Object o) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public ListIterator listIterator() { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public ListIterator listIterator(int index) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } - - /** - * Does not support List methods {@link UnsupportedOperationException}. - */ - public List subList(int fromIndex, int toIndex) { - throw new UnsupportedOperationException("Delegates to set, operation not supported"); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/util/LongSequence.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/util/LongSequence.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/util/LongSequence.java (revision 0) @@ -1,32 +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.util; - -/** - * A sequence producing longs - * - * @author teck - */ -public interface LongSequence { - - /** - * Get the next value in the sequence - * - * @return the next value - */ - long next(); -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/search/attribute/JavaBeanAttributeExtractor.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/search/attribute/JavaBeanAttributeExtractor.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/search/attribute/JavaBeanAttributeExtractor.java (revision 0) @@ -1,163 +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.attribute; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import net.sf.ehcache.Element; - -/** - * Extracts a search attribute determining the value as a javabean property on either - * the key or the value. If the property exists on both the key and the value an exception is thrown - * - * @author teck - */ -public class JavaBeanAttributeExtractor implements AttributeExtractor { - - private static final Object NO_VALUE = new Object(); - - private transient volatile MethodRef lastKeyMethod; - private transient volatile MethodRef lastValueMethod; - - private final String beanProperty; - - /** - * Constructor - * - * @param beanProperty the bean property name to extract - */ - public JavaBeanAttributeExtractor(String beanProperty) { - if (beanProperty == null) { - throw new NullPointerException(); - } - - beanProperty = beanProperty.trim(); - - if (beanProperty.length() == 0) { - throw new IllegalArgumentException("bean property empty"); - } - - this.beanProperty = beanProperty; - } - - /** - * {@inheritDoc} - */ - public Object attributeFor(Element element, String attributeName) throws AttributeExtractorException { - Object attribute = NO_VALUE; - - final Object key = element.getObjectKey(); - - if (key != null) { - MethodRef keyMethod = lastKeyMethod; - if (keyMethod == null || keyMethod.targetClass != key.getClass()) { - keyMethod = findMethod(key); - lastKeyMethod = keyMethod; - } - if (keyMethod.method != null) { - attribute = getValue(keyMethod.method, key); - } - } - - final Object value = element.getObjectValue(); - - if (value != null) { - MethodRef valueMethod = lastValueMethod; - if (valueMethod == null || valueMethod.targetClass != value.getClass()) { - valueMethod = findMethod(value); - lastValueMethod = valueMethod; - } - - if (valueMethod.method != null) { - if (attribute != NO_VALUE) { - throw new AttributeExtractorException("Bean property [" + beanProperty + "] present on both key and value"); - } - - return getValue(valueMethod.method, value); - } - } - - if (attribute != NO_VALUE) { - return attribute; - } - - throw new AttributeExtractorException("Bean property [" + beanProperty + "] not present on either key or value"); - } - - private MethodRef findMethod(Object obj) { - String upperFirstProp = "" + Character.toUpperCase(beanProperty.charAt(0)); - if (beanProperty.length() > 1) { - upperFirstProp += beanProperty.substring(1); - } - - final Class target = obj.getClass(); - - try { - return new MethodRef(target, target.getMethod("get" + upperFirstProp)); - } catch (SecurityException e) { - throw new AttributeExtractorException(e); - } catch (NoSuchMethodException e) { - // keep looking - } - - try { - Method m = target.getMethod("is" + upperFirstProp); - if (m.getReturnType().equals(Boolean.class) || m.getReturnType().equals(Boolean.TYPE)) { - return new MethodRef(target, m); - } - } catch (SecurityException e) { - throw new AttributeExtractorException(e); - } catch (NoSuchMethodException e) { - // - } - - // no applicable method available - return new MethodRef(target, null); - } - - private Object getValue(Method method, Object key) { - try { - return method.invoke(key); - } catch (Throwable t) { - if (t instanceof InvocationTargetException) { - t = t.getCause(); - } - - if (t instanceof Error) { - throw ((Error) t); - } - - throw new AttributeExtractorException("Error getting bean property [" + beanProperty + "] on instance of " - + key.getClass().getName(), t); - } - } - - /** - * A cached method lookup. Method is null to indicate the method is not present/accessible - */ - private static class MethodRef { - private final Class targetClass; - private final Method method; - - MethodRef(Class target, Method method) { - this.targetClass = target; - this.method = method; - } - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/config/ehcache.xsd =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/config/ehcache.xsd (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/config/ehcache.xsd (revision 0) @@ -1,422 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/bulkops/BulkOpsExplictLockingTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/bulkops/BulkOpsExplictLockingTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/bulkops/BulkOpsExplictLockingTest.java (revision 0) @@ -1,229 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.modules.ehcache.bulkops; - -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.terracotta.ehcache.tests.AbstractCacheTestBase; -import org.terracotta.ehcache.tests.ClientBase; -import org.terracotta.toolkit.Toolkit; -import org.terracotta.toolkit.concurrent.ToolkitBarrier; - -import com.tc.test.config.model.TestConfig; - -import java.io.Serializable; -import java.util.Collection; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.BrokenBarrierException; - -import junit.framework.Assert; - -public class BulkOpsExplictLockingTest extends AbstractCacheTestBase { - private static final int NODE_COUNT = 2; - - public BulkOpsExplictLockingTest(TestConfig testConfig) { - super(testConfig, App.class, App.class); - } - - public static class App extends ClientBase { - private final ToolkitBarrier barrier; - - public App(String[] args) { - super(args); - this.barrier = getClusteringToolkit().getBarrier("test-barrier", NODE_COUNT); - } - - public static void main(String[] args) { - new App(args).run(); - } - - @Override - protected void runTest(Cache cache, Toolkit clusteringToolkit) throws Throwable { - Cache dcv2Strong = createCache("dcv2Strong", cacheManager, Consistency.STRONG); - testBulkOpsWithExplictLocking(dcv2Strong); - Cache dcv2Eventual = createCache("dcv2Eventual", cacheManager, Consistency.EVENTUAL); - testBulkOpsWithExplictLocking(dcv2Eventual); - - } - - private void testBulkOpsWithExplictLocking(Cache cache) throws InterruptedException, BrokenBarrierException { - int index = barrier.await(); - int numOfElements = 100; - Set elements = new HashSet(); - for (int i = 0; i < numOfElements; i++) { - elements.add(new Element(new Key("key" + i, i), new Value("val" + i, i))); - } - Key key = new Key("key0", 0); - if (index == 0) { - cache.acquireWriteLockOnKey(key); - cache.putAll(elements); - } - - barrier.await(); - if (index == 0) { - Assert.assertTrue(cache.isWriteLockedByCurrentThread(key)); - } else { - Assert.assertFalse(cache.isWriteLockedByCurrentThread(key)); - } - - if (index == 0) { - cache.releaseWriteLockOnKey(key); - } - Assert.assertFalse(cache.isWriteLockedByCurrentThread(key)); - barrier.await(); - - while (cache.getSize() != numOfElements) { - Thread.sleep(1000); - } - Assert.assertEquals(numOfElements, cache.getSize()); - - Set keySet1 = new HashSet(); - for (int i = 0; i < numOfElements; i++) { - keySet1.add(new Key("key" + i, i)); - } - - cache.acquireReadLockOnKey(key); - Map rv = cache.getAll(keySet1); - cache.releaseReadLockOnKey(key); - Assert.assertEquals(numOfElements, rv.size()); - - for (Element element : rv.values()) { - Assert.assertTrue(elements.contains(element)); - } - - Collection values = rv.values(); - for (Element element : elements) { - Assert.assertTrue(values.contains(element)); - } - - Set keySet2 = new HashSet(); - for (int i = 0; i < numOfElements; i++) { - if (i % 2 == 0) { - keySet2.add(new Key("key" + i, i)); - } - } - - rv = cache.getAll(keySet2); - Assert.assertEquals(keySet2.size(), rv.size()); - - for (Element element : rv.values()) { - Assert.assertTrue(elements.contains(element)); - } - - Assert.assertEquals(keySet2, rv.keySet()); - System.out.println("verified by client now waiting for others..."); - barrier.await(); - - if (index != 0) { - cache.acquireWriteLockOnKey(key); - cache.removeAll(keySet2); - cache.releaseWriteLockOnKey(key); - System.out.println("removed " + keySet2.size() + " keys from " + cache.getName() - + ". Now waiting for others..."); - } - barrier.await(); - while (cache.getSize() != numOfElements - keySet2.size()) { - Thread.sleep(1000); - } - - Assert.assertEquals(numOfElements - keySet2.size(), cache.getSize()); - System.out.println("now checking removed in " + cache.getName() + " by client"); - for (Object k : keySet2) { - Assert.assertNull(cache.get(k)); - } - System.out.println("client, I am done with " + cache.getName()); - } - - private Cache createCache(String cacheName, CacheManager cm, Consistency consistency) { - CacheConfiguration cacheConfiguration = new CacheConfiguration(); - cacheConfiguration.setName(cacheName); - cacheConfiguration.setMaxElementsInMemory(100000); - cacheConfiguration.setEternal(false); - cacheConfiguration.setTimeToLiveSeconds(100000); - cacheConfiguration.setTimeToIdleSeconds(200000); - - TerracottaConfiguration tcConfiguration = new TerracottaConfiguration(); - tcConfiguration.setConsistency(Consistency.STRONG); - cacheConfiguration.addTerracotta(tcConfiguration); - - Cache cache = new Cache(cacheConfiguration); - cm.addCache(cache); - return cache; - } - } - - private static class Key implements Serializable { - private final String stringKey; - private final int intKey; - - public Key(String stringKey, int intKey) { - super(); - this.stringKey = stringKey; - this.intKey = intKey; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + intKey; - result = prime * result + ((stringKey == null) ? 0 : stringKey.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; - Key other = (Key) obj; - if (intKey != other.intKey) return false; - if (stringKey == null) { - if (other.stringKey != null) return false; - } else if (!stringKey.equals(other.stringKey)) return false; - return true; - } - - } - - private static class Value implements Serializable { - private final String keyVal; - private final int intVal; - - public Value(String keyVal, int intVal) { - this.keyVal = keyVal; - this.intVal = intVal; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + intVal; - result = prime * result + ((keyVal == null) ? 0 : keyVal.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; - Value other = (Value) obj; - if (intVal != other.intVal) return false; - if (keyVal == null) { - if (other.keyVal != null) return false; - } else if (!keyVal.equals(other.keyVal)) return false; - return true; - } - - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/terracotta/ClusteredInstanceFactoryWrapper.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/terracotta/ClusteredInstanceFactoryWrapper.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/terracotta/ClusteredInstanceFactoryWrapper.java (revision 0) @@ -1,165 +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.terracotta; - -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.cluster.CacheCluster; -import net.sf.ehcache.config.Configuration; -import net.sf.ehcache.event.CacheEventListener; -import net.sf.ehcache.management.event.ManagementEventSink; -import net.sf.ehcache.store.Store; -import net.sf.ehcache.store.TerracottaStore; -import net.sf.ehcache.transaction.SoftLockManager; -import net.sf.ehcache.transaction.TransactionIDFactory; -import net.sf.ehcache.writer.writebehind.WriteBehind; - -import java.util.concurrent.Callable; - -/** - * A {@link ClusteredInstanceFactory} implementation that delegates all operations to an underlying delegate except for the following - * operations: - *
    - *
  • {@link #getTopology()} : Delegates to the {@link TerracottaClient#getCacheCluster()}
  • - *
- * - * @author Abhishek Sanoujam - * - */ -public class ClusteredInstanceFactoryWrapper implements ClusteredInstanceFactory { - - private final TerracottaClient client; - private final ClusteredInstanceFactory delegate; - - /** - * Constructor accepting the TerracottaClient and the actual factory - * - * @param client - * @param delegate - */ - public ClusteredInstanceFactoryWrapper(TerracottaClient client, ClusteredInstanceFactory delegate) { - this.client = client; - this.delegate = delegate; - - } - - /** - * Returns the actual underlying factory - * - * @return the actual underlying factory - */ - protected ClusteredInstanceFactory getActualFactory() { - return delegate; - } - - /** - * {@inheritDoc} - */ - public CacheCluster getTopology() { - return client.getCacheCluster(); - } - - // all methods below delegate to the real factory - - /** - * {@inheritDoc} - */ - public String getUUID() { - return delegate.getUUID(); - } - - /** - * {@inheritDoc} - */ - @Override - public void enableNonStopForCurrentThread(boolean enable) { - delegate.enableNonStopForCurrentThread(enable); - } - - /** - * {@inheritDoc} - */ - public CacheEventListener createEventReplicator(Ehcache cache) { - return delegate.createEventReplicator(cache); - } - - /** - * {@inheritDoc} - */ - public Store createStore(Ehcache cache) { - return delegate.createStore(cache); - } - - /** - * {@inheritDoc} - */ - public TransactionIDFactory createTransactionIDFactory(String uuid, String cacheManagerName) { - return delegate.createTransactionIDFactory(uuid, cacheManagerName); - } - - /** - * {@inheritDoc} - */ - public WriteBehind createWriteBehind(Ehcache cache) { - return delegate.createWriteBehind(cache); - } - - /** - * {@inheritDoc} - */ - public SoftLockManager getOrCreateSoftLockManager(Ehcache cache) { - return delegate.getOrCreateSoftLockManager(cache); - } - - /** - * {@inheritDoc} - */ - public void shutdown() { - delegate.shutdown(); - } - - @Override - public TerracottaStore createNonStopStore(Callable store, Ehcache cache) { - return delegate.createNonStopStore(store, cache); - } - - @Override - public boolean destroyCache(final String cacheManagerName, final String cacheName) { - return delegate.destroyCache(cacheManagerName, cacheName); - } - - @Override - public void linkClusteredCacheManager(String cacheManagerName, Configuration configuration) { - delegate.linkClusteredCacheManager(cacheManagerName, configuration); - } - - @Override - public void unlinkCache(String cacheName) { - delegate.unlinkCache(cacheName); - } - - @Override - public ManagementEventSink createEventSink() { - return delegate.createEventSink(); - } - - /** - * {@inheritDoc} - */ - public void waitForOrchestrator(String cacheManagerName) { - delegate.waitForOrchestrator(cacheManagerName); - } -} Index: rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/writebehind/operations/WriteAllAsyncOperation.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/writebehind/operations/WriteAllAsyncOperation.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/writebehind/operations/WriteAllAsyncOperation.java (revision 0) @@ -1,28 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.modules.ehcache.writebehind.operations; - - -import net.sf.ehcache.Element; -import net.sf.ehcache.writer.CacheWriter; - -import java.util.Collection; - -/** - * Implements the write all operation for write behind - * - * @author Abhishek Maheshwari - */ - -public class WriteAllAsyncOperation implements BatchAsyncOperation { - private final Collection elements; - - public WriteAllAsyncOperation(Collection elements) { - this.elements = elements; - } - - public void performBatchOperation(CacheWriter cacheWriter) { - cacheWriter.writeAll(elements); - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/net/sf/ehcache/osgi/SimpleOsgiTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/net/sf/ehcache/osgi/SimpleOsgiTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/net/sf/ehcache/osgi/SimpleOsgiTest.java (revision 0) @@ -1,126 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package net.sf.ehcache.osgi; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.ops4j.pax.exam.CoreOptions.bootDelegationPackages; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.terracotta.test.OsgiUtil.commonOptions; -import static org.terracotta.test.OsgiUtil.getMavenBundle; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Element; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Configuration; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerMethod; -import org.terracotta.context.ContextManager; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Serializable; -import java.net.URL; - -/** - * Test a simple BigMemory usage with BM Go license key. The product name should include "BigMemory" and not "Ehcache" - * NOTE: this test only works in fullmode - * - * @author hhuynh - */ -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerMethod.class) -public class SimpleOsgiTest { - - @Configuration - public Option[] config() { - return options(bootDelegationPackages("sun.*,jdk.*"), - // need this for REST agent test - getMavenBundle("net.sf.ehcache", "ehcache-ee", "ehcache"), - commonOptions()); - } - - @Test - public void testSimpleCache() throws Exception { - CacheManager manager = new CacheManager(SimpleOsgiTest.class.getResource("/net/sf/ehcache/osgi/simple-ehcache.xml")); - try { - Cache cache = manager.getCache("sampleCache1"); - Element element = new Element("key1", "value1"); - cache.put(element); - Element element1 = cache.get("key1"); - assertEquals("value1", element1.getObjectValue()); - assertEquals(1, cache.getSize()); - } finally { - manager.shutdown(); - } - } - - @Test - public void testValueClass() throws Exception { - CacheManager manager = new CacheManager(SimpleOsgiTest.class.getResource("/net/sf/ehcache/osgi/simple-ehcache.xml")); - try { - Cache cache = manager.getCache("sampleCache1"); - Element element = new Element("key1", new Value("value1")); - cache.put(element); - Element element1 = cache.get("key1"); - assertEquals("value1", ((Value) element1.getObjectValue()).v); - assertEquals(1, cache.getSize()); - } finally { - manager.shutdown(); - } - } - - @Test - public void testUsingNonExportedClass() { - try { - ContextManager cm = new ContextManager(); - fail("Expected class not found exception"); - } catch (Throwable e) { - // expected - } - } - - @Test - public void testRestAgent() throws Exception { - CacheManager manager = new CacheManager( - SimpleOsgiTest.class - .getResource("/net/sf/ehcache/osgi/rest-enabled-ehcache.xml")); - InputStream in = null; - try { - Cache testCache = manager.getCache("testCache"); - testCache.put(new Element("k", "v")); - assertEquals(1, testCache.getSize()); - URL url = new URL("http://localhost:9888/tc-management-api/agents"); - in = url.openStream(); - BufferedReader reader = new BufferedReader(new InputStreamReader(in)); - String line = null; - StringBuilder sb = new StringBuilder(); - while ((line = reader.readLine()) != null) { - sb.append(line.trim()).append("\n"); - } - System.out.println("Rest response: " + sb); - assertTrue(sb.toString().contains("\"agentId\":\"embedded\"")); - } finally { - manager.shutdown(); - if (in != null) { - in.close(); - } - } - } - - private static class Value implements Serializable { - public String v; - - public Value(String value) { - v = value; - } - } -} \ No newline at end of file Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/store/disk/DiskStoreHelper.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/store/disk/DiskStoreHelper.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/store/disk/DiskStoreHelper.java (revision 0) @@ -1,59 +0,0 @@ -package net.sf.ehcache.store.disk; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheStoreHelper; -import net.sf.ehcache.store.CacheStore; -import net.sf.ehcache.store.LegacyStoreWrapper; -import net.sf.ehcache.store.Store; - -import java.lang.reflect.Field; -import java.util.concurrent.Future; - -/** - * @author Alex Snaps - */ -public class DiskStoreHelper { - - public static Future flushAllEntriesToDisk(final Cache cache) { - CacheStoreHelper cacheStoreHelper = new CacheStoreHelper(cache); - return flushAllEntriesToDisk(cacheStoreHelper.getStore()); - } - - public static Future flushAllEntriesToDisk(final Store store) { - if (store instanceof CacheStore) { - final DiskStore authority = getField("authoritativeTier", store); - return flushAllEntriesToDisk(authority); - } else if (store instanceof LegacyStoreWrapper) { - final DiskStore authority = getField("disk", store); - return flushAllEntriesToDisk(authority); - } else if (store instanceof DiskStore) { - final DiskStorageFactory factory = getField("disk", store); - return factory.flush(); - } else if (store instanceof LegacyStoreWrapper) { - final DiskStore disk = getField("disk", store); - return flushAllEntriesToDisk(disk); - } else { - return null; - } - } - - private static T getField(final String fieldName, final Object obj) { - try { - Field field = null; - Class clazz = obj.getClass(); - while(field == null && clazz != null) { - try { - field = clazz.getDeclaredField(fieldName); - } catch (NoSuchFieldException e) { - clazz = clazz.getSuperclass(); - } catch (SecurityException e) { - throw new RuntimeException(e); - } - } - field.setAccessible(true); - return (T) field.get(obj); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/CompoundOperationImpl.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/CompoundOperationImpl.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/CompoundOperationImpl.java (revision 0) @@ -1,285 +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.Arrays; -import java.util.EnumMap; -import java.util.EnumSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -import net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation; -import net.sf.ehcache.statistics.extended.ExtendedStatistics.Result; -import net.sf.ehcache.statistics.extended.ExtendedStatistics.Statistic; - -import org.terracotta.statistics.OperationStatistic; -import org.terracotta.statistics.ValueStatistic; - -/** - * The Class CompoundOperationImpl. - * - * @param the generic type - * @author cdennis - */ -class CompoundOperationImpl> implements Operation { - - private final OperationStatistic source; - - private final Class type; - private final Map> operations; - private final ConcurrentMap, OperationImpl> compounds = new ConcurrentHashMap, OperationImpl>(); - private final ConcurrentMap>, ExpiringStatistic> ratios = new ConcurrentHashMap>, ExpiringStatistic>(); - - private final ScheduledExecutorService executor; - - private volatile long averageNanos; - private volatile int historySize; - private volatile long historyNanos; - - private volatile boolean alwaysOn = false; - - /** - * Instantiates a new compound operation impl. - * - * @param source the source - * @param type the type - * @param averagePeriod the average period - * @param averageUnit the average unit - * @param executor the executor - * @param historySize the history size - * @param historyPeriod the history period - * @param historyUnit the history unit - */ - public CompoundOperationImpl(OperationStatistic source, Class type, long averagePeriod, TimeUnit averageUnit, - ScheduledExecutorService executor, int historySize, long historyPeriod, TimeUnit historyUnit) { - this.type = type; - this.source = source; - - this.averageNanos = averageUnit.toNanos(averagePeriod); - this.executor = executor; - this.historySize = historySize; - this.historyNanos = historyUnit.toNanos(historyPeriod); - - this.operations = new EnumMap(type); - for (T result : type.getEnumConstants()) { - operations.put(result, new OperationImpl(source, EnumSet.of(result), averageNanos, executor, historySize, historyNanos)); - } - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#type() - */ - @Override - public Class type() { - return type; - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#component(java.lang.Enum) - */ - @Override - public Result component(T result) { - return operations.get(result); - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#compound(java.util.Set) - */ - @Override - public Result compound(Set results) { - if (results.size() == 1) { - return component(results.iterator().next()); - } else { - Set key = EnumSet.copyOf(results); - OperationImpl existing = compounds.get(key); - if (existing == null) { - OperationImpl created = new OperationImpl(source, key, averageNanos, executor, historySize, historyNanos); - OperationImpl racer = compounds.putIfAbsent(key, created); - if (racer == null) { - return created; - } else { - return racer; - } - } else { - return existing; - } - } - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#ratioOf(java.util.Set, java.util.Set) - */ - @Override - public Statistic ratioOf(Set numerator, Set denominator) { - List> key = Arrays.> asList(EnumSet.copyOf(numerator), EnumSet.copyOf(denominator)); - ExpiringStatistic existing = ratios.get(key); - if (existing == null) { - final Statistic numeratorRate = compound(numerator).rate(); - final Statistic denominatorRate = compound(denominator).rate(); - ExpiringStatistic created = new ExpiringStatistic(new ValueStatistic() { - @Override - public Double value() { - return numeratorRate.value() / denominatorRate.value(); - } - }, executor, historySize, historyNanos); - ExpiringStatistic racer = ratios.putIfAbsent(key, created); - if (racer == null) { - return created; - } else { - return racer; - } - } else { - return existing; - } - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#setAlwaysOn(boolean) - */ - @Override - public void setAlwaysOn(boolean enable) { - alwaysOn = enable; - if (enable) { - for (OperationImpl op : operations.values()) { - op.start(); - } - for (OperationImpl op : compounds.values()) { - op.start(); - } - for (ExpiringStatistic ratio : ratios.values()) { - ratio.start(); - } - } - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#isAlwaysOn() - */ - @Override - public boolean isAlwaysOn() { - return alwaysOn; - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#setWindow(long, java.util.concurrent.TimeUnit) - */ - @Override - public void setWindow(long time, TimeUnit unit) { - averageNanos = unit.toNanos(time); - for (OperationImpl op : operations.values()) { - op.setWindow(averageNanos); - } - for (OperationImpl op : compounds.values()) { - op.setWindow(averageNanos); - } - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#setHistory(int, long, java.util.concurrent.TimeUnit) - */ - @Override - public void setHistory(int samples, long time, TimeUnit unit) { - historySize = samples; - historyNanos = unit.toNanos(time); - for (OperationImpl op : operations.values()) { - op.setHistory(historySize, historyNanos); - } - for (OperationImpl op : compounds.values()) { - op.setHistory(historySize, historyNanos); - } - for (ExpiringStatistic ratio : ratios.values()) { - ratio.setHistory(historySize, historyNanos); - } - } - - /* - * (non-Javadoc) - * - * @see net.sf.ehcache.statistics.extended.ExtendedStatistics.Operation#getWindowSize(java.util.concurrent.TimeUnit) - */ - @Override - public long getWindowSize(TimeUnit unit) { - return unit.convert(averageNanos, TimeUnit.NANOSECONDS); - } - - /** - * Get the history sample size. - */ - @Override - public int getHistorySampleSize() { - return historySize; - } - - /** - * Get the history sample time. - */ - @Override - public long getHistorySampleTime(TimeUnit unit) { - return unit.convert(historySize, TimeUnit.NANOSECONDS); - } - - /** - * Expire. - * - * @param expiryTime the expiry time - * @return true, if successful - */ - boolean expire(long expiryTime) { - if (alwaysOn) { - return false; - } else { - boolean expired = true; - for (OperationImpl o : operations.values()) { - expired &= o.expire(expiryTime); - } - for (Iterator> it = compounds.values().iterator(); it.hasNext();) { - if (it.next().expire(expiryTime)) { - it.remove(); - } - } - for (Iterator> it = ratios.values().iterator(); it.hasNext();) { - if (it.next().expire(expiryTime)) { - it.remove(); - } - } - return expired & compounds.isEmpty() & ratios.isEmpty(); - } - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-disk.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-disk.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-disk.xml (revision 0) @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/store/TerracottaStoreInitializationService.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/store/TerracottaStoreInitializationService.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/store/TerracottaStoreInitializationService.java (revision 0) @@ -1,101 +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.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.terracotta.toolkit.cluster.ClusterInfo; - -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import java.util.concurrent.atomic.AtomicInteger; - -public class TerracottaStoreInitializationService { - private static final Logger LOGGER = LoggerFactory.getLogger(TerracottaStoreInitializationService.class); - private final ExecutorService threadPool; - private final ClusterInfo clusterInfo; - - - public TerracottaStoreInitializationService(ClusterInfo clusterInfo) { - this.clusterInfo = clusterInfo; - this.threadPool = getThreadPool(); - } - - /** - * This method should be called when the associated CacheManager is shutdown. Once shutdowm, the initialization - * service cannot be started again. - */ - public void shutdown() { - threadPool.shutdownNow(); - } - - public void initialize(Runnable runnable, NonstopConfiguration nonStopConfiguration) { - - // Submit the Thread for execution - Future future = threadPool.submit(runnable); - - // wait for initialization to complete (until operations are enabled) - waitForInitialization(future, nonStopConfiguration.getTimeoutMillis()); - } - - /** - * This method holds the calling thread until the given Future returns the result or the Cluster operations get/are - * disabled. In case the Cluster operations get disabled while waiting, the method call returns honoring the nonstop - * timeout. - * - */ - private void waitForInitialization(Future future, long nonStopTimeOutInMillis) { - boolean interrupted = false; - boolean initializationCompleted = false; - try { - do { - try { - future.get(nonStopTimeOutInMillis, TimeUnit.MILLISECONDS); - initializationCompleted = true; - } catch (InterruptedException e) { - interrupted = true; - } catch (ExecutionException e) { - throw new RuntimeException(e.getCause()); - } catch (TimeoutException e) { - // Retry if operations are enabled - } - } while (!initializationCompleted && areOperationsEnabled()); - - } finally { - if (interrupted) Thread.currentThread().interrupt(); - } - - if (!initializationCompleted) { - LOGGER.debug("Returning without completing TerracottaStore initialization. Operations Enabled = {}", - areOperationsEnabled()); - } - } - - private boolean areOperationsEnabled() { - return clusterInfo.areOperationsEnabled(); - } - - private ExecutorService getThreadPool() { - ThreadFactory daemonThreadFactory = new ThreadFactory() { - private final AtomicInteger threadID = new AtomicInteger(); - - @Override - public Thread newThread(Runnable runnable) { - Thread thread = new Thread(runnable, "TerracottaStoreInitializationThread_" + threadID.incrementAndGet()); - thread.setDaemon(true); - return thread; - } - }; - - return Executors.newCachedThreadPool(daemonThreadFactory); - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/.project =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/.project (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/.project (revision 0) @@ -1,23 +0,0 @@ - - - ehcache-scheduled-refresh - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/cache-consistency-test.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/cache-consistency-test.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/cache-consistency-test.xml (revision 0) @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/AbstractWriteBehindAtomicityTestBase.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/AbstractWriteBehindAtomicityTestBase.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/AbstractWriteBehindAtomicityTestBase.java (revision 0) @@ -1,73 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.ehcache.tests; - -import org.terracotta.tests.base.AbstractClientBase; - -import com.tc.test.config.model.TestConfig; -import com.tc.util.Assert; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; - -public abstract class AbstractWriteBehindAtomicityTestBase extends AbstractCacheTestBase { - - public AbstractWriteBehindAtomicityTestBase(final String ehcacheConfigPath, TestConfig testConfig, - Class... c) { - super(ehcacheConfigPath, testConfig, c); - testConfig.getClientConfig().getBytemanConfig().setScript("/byteman/writeBehindAtomicity.btm"); - // disableTest(); - } - - // 1) Begin putWithWriter - // 2) lock() putWithWriter - // 3) Begin Transaction - // 4) Commit Transaction - // 5) unlock() putWithWriter - // 6) Done putWithWriter - @Override - protected void evaluateClientOutput(String clientName, int exitCode, File output) throws Throwable { - super.evaluateClientOutput(clientName, exitCode, output); - int txnCount = 0; - boolean underExplicitLock = false; - FileReader fr = null; - BufferedReader reader = null; - try { - fr = new FileReader(output); - reader = new BufferedReader(fr); - String st = ""; - while ((st = reader.readLine()) != null) { - // only check for main thread - if (st.contains("main")) { - if (st.contains("BEGINOPERATION")) { - Assert.assertEquals(false, underExplicitLock); - underExplicitLock = true; - } else if (st.contains("COMMITTRANSACTION") && underExplicitLock) { - txnCount++; - Assert.assertEquals(txnCount, 1); - } else if (st.contains("ENDOPERATION")) { - Assert.assertEquals(true, underExplicitLock); - underExplicitLock = false; - Assert.assertEquals(txnCount, 1); - txnCount = 0; - } - } - } - } catch (Exception e) { - throw new AssertionError(e); - } finally { - try { - fr.close(); - reader.close(); - } catch (Exception e) { - // - } - } - - Assert.assertEquals(false, underExplicitLock); - Assert.assertEquals(txnCount, 0); - } - -} \ No newline at end of file Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/management/sampled/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/management/sampled/package.html (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/management/sampled/package.html (revision 0) @@ -1,8 +0,0 @@ - - - - -This package contains classes related to MBeans with Sampled Statistics. -

- - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/pool/impl/StrictlyBoundedPool.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/pool/impl/StrictlyBoundedPool.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/pool/impl/StrictlyBoundedPool.java (revision 0) @@ -1,52 +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.pool.impl; - -import net.sf.ehcache.pool.PoolAccessor; -import net.sf.ehcache.pool.PoolEvictor; -import net.sf.ehcache.pool.PoolParticipant; -import net.sf.ehcache.pool.SizeOfEngine; - -/** - * A pool which strictly obeys to its bound: it will never allow the accessors to consume more bytes than what - * has been configured. - * - * @author Ludovic Orban - * @author Alex Snaps - */ -public class StrictlyBoundedPool extends AbstractPool { - - /** - * Create a StrictlyBoundedPool instance - * - * @param maximumPoolSize the maximum size of the pool, in bytes. - * @param evictor the pool evictor, for cross-store eviction. - * @param defaultSizeOfEngine the default SizeOf engine used by the accessors. - */ - public StrictlyBoundedPool(long maximumPoolSize, PoolEvictor evictor, SizeOfEngine defaultSizeOfEngine) { - super(maximumPoolSize, evictor, defaultSizeOfEngine); - } - - /** - * {@inheritDoc} - */ - public PoolAccessor createPoolAccessor(PoolParticipant participant, SizeOfEngine sizeOfEngine) { - LockedPoolAccessor accessor = new LockedPoolAccessor(this, participant, sizeOfEngine, 0); - registerPoolAccessor(accessor); - return accessor; - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/search/query/QueryManagerBuilder.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/search/query/QueryManagerBuilder.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/search/query/QueryManagerBuilder.java (revision 0) @@ -1,121 +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.query; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Collection; - -import net.sf.ehcache.CacheException; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Ehcache; - -import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Collection; - -/** - * A {@link net.sf.ehcache.search.query.QueryManager Query Manager} builder providing methods to add caches which - * can be queried. - * The Query Manager instance returned by this builder can be used to execute - * search queries expressed as Big Memory Structured Query Language (BMSQL) statements. - * - * @author dkumar - */ -public final class QueryManagerBuilder { - - private final Collection caches = new ArrayList(); - private final Class defaultClass; - - - private QueryManagerBuilder() { - this(getImplementationClass()); - } - - /** - * Package-local constructor for testing purposes. - * - * @param implementationClass a concrete implementation of the {@link net.sf.ehcache.search.query.QueryManager Query Manager} interface - */ - QueryManagerBuilder(Class implementationClass) { - this.defaultClass = implementationClass; - } - - private static Class getImplementationClass() { - try { - return (Class)Class.forName("net.sf.ehcache.search.parser.QueryManagerImpl"); - } catch (ClassNotFoundException e) { - throw new CacheException(e); - } - } - - /** - * Creates a new {@link net.sf.ehcache.search.query.QueryManager Query Manager} builder. - * - * @return this for the builder pattern - */ - public static QueryManagerBuilder newQueryManagerBuilder() { - return new QueryManagerBuilder(); - } - - /** - * Adds a {@link net.sf.ehcache.Ehcache Cache} to the internal state and allows it to be used as a target in a - * BMSQL statement's FROM clause. - * - * @param cache a {@link net.sf.ehcache.Ehcache cache} instance to be added - * @return this for the builder pattern - */ - public QueryManagerBuilder addCache(Ehcache cache) { - this.caches.add(cache); - return this; - } - - /** - * Adds all {@link net.sf.ehcache.Ehcache Caches} present in a {@link net.sf.ehcache.CacheManager Cache Manager} to - * the internal state of the query manager. - * The added caches can be used in a BMSQL statement's FROM clause. - * - * @param cacheManager a {@link net.sf.ehcache.CacheManager Cache Manager} whose - * {@link net.sf.ehcache.Ehcache caches} need to be added - * @return this for the builder pattern - */ - public QueryManagerBuilder addAllCachesCurrentlyIn(CacheManager cacheManager) { - for (String s : cacheManager.getCacheNames()) { - final Ehcache cache = cacheManager.getEhcache(s); - if (cache != null) { - this.caches.add(cache); - } - } - return this; - } - - /** - * Returns a new {@link net.sf.ehcache.search.query.QueryManager Query Manager} using the options supplied during the building - * process. - * - * @return the fully constructed {@link net.sf.ehcache.search.query.QueryManager Query Manager} - */ - public QueryManager build() { - try { - final Constructor constructor = defaultClass.getConstructor(Collection.class); - return constructor.newInstance(this.caches); - } catch (Exception e) { - throw new CacheException(e); - } - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/nonstop/concurrency/LockOperationTimedOutNonstopException.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/nonstop/concurrency/LockOperationTimedOutNonstopException.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/nonstop/concurrency/LockOperationTimedOutNonstopException.java (revision 0) @@ -1,38 +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.nonstop.concurrency; - -import net.sf.ehcache.constructs.nonstop.NonStopCacheException; - -/** - * Special class of {@link NonStopCacheException} which is thrown on timeout of lock operations - * - * @author Abhishek Sanoujam - * - */ -public class LockOperationTimedOutNonstopException extends NonStopCacheException { - - /** - * public constructor - * - * @param message - */ - public LockOperationTimedOutNonstopException(String message) { - super(message); - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/management/provider/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/management/provider/package.html (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/management/provider/package.html (revision 0) @@ -1,8 +0,0 @@ - - - - -This package contains classes related to MBeanRegistrationProvider and its implementation. -

- - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/cachemanager-perf.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/cachemanager-perf.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/cachemanager-perf.xml (revision 0) @@ -1,488 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/pool/sizeof/filter/annotations/CustomAnnotation.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/pool/sizeof/filter/annotations/CustomAnnotation.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/pool/sizeof/filter/annotations/CustomAnnotation.java (revision 0) @@ -1,32 +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.pool.sizeof.filter.annotations; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD, ElementType.TYPE, ElementType.PACKAGE }) -public @interface CustomAnnotation { - boolean deprecated() default true; - short differentReturnType() default 10; - Class aClass() default Integer.class; - ExampleEnum anEnum() default ExampleEnum.TWO; - Deprecated anAnnotation() default @Deprecated; -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-no-update.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-no-update.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-no-update.xml (revision 0) @@ -1,13 +0,0 @@ - - - - - - - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/store/disk/SegmentTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/store/disk/SegmentTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/store/disk/SegmentTest.java (revision 0) @@ -1,43 +0,0 @@ -package net.sf.ehcache.store.disk; - -import net.sf.ehcache.CacheOperationOutcomes; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.config.CacheConfiguration; -import net.sf.ehcache.event.CacheEventListener; -import net.sf.ehcache.event.RegisteredEventListeners; -import net.sf.ehcache.pool.PoolAccessor; - -import org.junit.Test; -import org.terracotta.statistics.observer.OperationObserver; - -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -/** - * SegmentTest - */ -public class SegmentTest { - - @Test - public void testInlineEvictionNotified() { - PoolAccessor onHeapAccessor = mock(PoolAccessor.class); - when(onHeapAccessor.add(eq("key"), any(DiskStorageFactory.DiskSubstitute.class), any(HashEntry.class), eq(false))).thenReturn(-1L); - RegisteredEventListeners cacheEventNotificationService = new RegisteredEventListeners(mock(Ehcache.class), null); - CacheEventListener listener = mock(CacheEventListener.class); - cacheEventNotificationService.registerListener(listener); - - OperationObserver evictionObserver = mock(OperationObserver.class); - DiskStorageFactory diskStorageFactory = mock(DiskStorageFactory.class); - - Segment segment = new Segment(10, .95f, diskStorageFactory, mock(CacheConfiguration.class), onHeapAccessor, mock(PoolAccessor.class), cacheEventNotificationService, evictionObserver); - Element element = new Element("key", "value"); - when(diskStorageFactory.create(element)).thenReturn(new DiskStorageFactory.DiskMarker(diskStorageFactory, 0L, 0, element)); - segment.put("key", 12, element, false, false); - verify(listener).notifyElementEvicted(any(Ehcache.class), eq(element)); - verify(evictionObserver).end(CacheOperationOutcomes.EvictionOutcome.SUCCESS); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/beans/AttributeProxy.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/beans/AttributeProxy.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/beans/AttributeProxy.java (revision 0) @@ -1,116 +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.beans; - -/** - * The Class AttributeProxy, used to proxy operations from a dynamic mbean to a POJO object. - * Override get()/set() as needed. - * - * @param the return type/set type for the attribute - * - * @author cschanck - */ -public abstract class AttributeProxy { - private final String name; - private final Class clazz; - private final boolean isWrite; - private final boolean isRead; - private final String description; - - /** - * Instantiates a new attribute proxy. - * - * @param clazz the clazz of the return type - * @param name the name - * @param description the description - * @param isRead readable - * @param isWrite writable - */ - public AttributeProxy(Class clazz, String name, String description, boolean isRead, boolean isWrite) { - this.name = name; - this.description = description; - this.clazz = clazz; - this.isWrite = isWrite; - this.isRead = isRead; - } - - /** - * Gets the description. - * - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the type class. - * - * @return the type class - */ - public Class getTypeClass() { - return clazz; - } - - /** - * Gets the name. - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * Gets the value. - * - * @param name the name - * @return the value - */ - public T get(String name) { - throw new UnsupportedOperationException(); - } - - /** - * Sets the value. - * - * @param name the name - * @param t the value - */ - public void set(String name, T t) { - throw new UnsupportedOperationException(); - } - - /** - * Checks if is readable. - * - * @return true, if is read - */ - public boolean isRead() { - return isRead; - } - - /** - * Checks if is writable. - * - * @return true, if is writable - */ - public boolean isWrite() { - return isWrite; - } - -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/net/sf/ehcache/osgi/ehcache-scheduled-refresh.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/net/sf/ehcache/osgi/ehcache-scheduled-refresh.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/net/sf/ehcache/osgi/ehcache-scheduled-refresh.xml (revision 0) @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/management-ehcache-v2/src/main/java/net/sf/ehcache/management/resource/CacheEntityV2.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-v2/src/main/java/net/sf/ehcache/management/resource/CacheEntityV2.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-v2/src/main/java/net/sf/ehcache/management/resource/CacheEntityV2.java (revision 0) @@ -1,23 +0,0 @@ -/* All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.*/ - -package net.sf.ehcache.management.resource; - -import java.util.HashMap; -import java.util.Map; - - -/** - *

- * An entity representing a cache resource from the management API. - *

- * - * @author brandony - * - */ -public class CacheEntityV2 extends AbstractCacheEntityV2 { - private Map attributes = new HashMap(); - - public Map getAttributes() { - return attributes; - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache/src/main/resources/META-INF/terracotta/public-api-types =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache/src/main/resources/META-INF/terracotta/public-api-types (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache/src/main/resources/META-INF/terracotta/public-api-types (revision 0) @@ -1 +0,0 @@ -# Don't remove this line -- if file is empty then everything will become an API type Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/ClientArrayValues1.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/ClientArrayValues1.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/ClientArrayValues1.java (revision 0) @@ -1,27 +0,0 @@ -package org.terracotta.ehcache.tests; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.Element; - -import org.terracotta.toolkit.Toolkit; - -public class ClientArrayValues1 extends ClientBase { - - public ClientArrayValues1(String[] args) { - super("test", args); - } - - public static void main(String[] args) { - new ClientArrayValues1(args).run(); - } - - @Override - protected void runTest(Cache cache, Toolkit toolkit) throws Throwable { - cache.put(new Element("key", new String[] { "a", "b", "c" })); -// } else { -// Element elem = cache.get("key"); -// assertNotNull() -// String[] value = elem.getValue(); -// } - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/container/hibernate/nontransactional/HibernateUtil.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/container/hibernate/nontransactional/HibernateUtil.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/container/hibernate/nontransactional/HibernateUtil.java (revision 0) @@ -1,70 +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.container.hibernate.nontransactional; - -import org.hibernate.HibernateException; -import org.hibernate.SessionFactory; -import org.hibernate.cfg.Configuration; - -public class HibernateUtil { - public static final String DB_PORT_VARIABLE = "__PORT__"; - public static final String DB_PORT_SYSPROP = "HibernateUtil.DB_PORT"; - - private static final String defaultConfig = "/hibernate-config/hibernate.cfg.xml"; - private static SessionFactory sessionFactory; - private static Configuration config; - - public synchronized static void configure(String configResource) { - config = makeConfig(configResource); - } - - public synchronized static SessionFactory getSessionFactory() { - if (sessionFactory == null) { - try { - sessionFactory = getConfig().buildSessionFactory(); - } catch (HibernateException ex) { - System.err.println("Initial SessionFactory creation failed." + ex); - throw new ExceptionInInitializerError(ex); - } - } - return sessionFactory; - } - - public synchronized static void dropAndCreateDatabaseSchema() { - getConfig().setProperty("hibernate.hbm2ddl.auto", "create"); - } - - private synchronized static Configuration getConfig() { - if (config == null) { - config = makeConfig(defaultConfig); - } - return config; - } - - private static Configuration makeConfig(String resource) { - String dbPort = System.getProperty(DB_PORT_SYSPROP, null); - if (dbPort == null) { throw new AssertionError("System property (" + DB_PORT_SYSPROP + ") not set"); } - dbPort = dbPort.trim(); - - Configuration cfg = new Configuration().configure(resource); - - String[] keys = new String[] { "connection.url", "hibernate.connection.url" }; - for (String key : keys) { - String value = cfg.getProperty(key); - value = value.replace(DB_PORT_VARIABLE, dbPort); - cfg.setProperty(key, value); - } - - return cfg; - } - - public synchronized static void closeSessionFactory() { - if (sessionFactory != null) { - sessionFactory.close(); - sessionFactory = null; - } - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/distribution/RMICacheReplicatorWithLargePayloadIT.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/distribution/RMICacheReplicatorWithLargePayloadIT.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/distribution/RMICacheReplicatorWithLargePayloadIT.java (revision 0) @@ -1,269 +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.distribution; - -import static net.sf.ehcache.util.RetryAssert.assertBy; -import static org.hamcrest.collection.IsCollectionWithSize.hasSize; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsNull.notNullValue; -import static org.hamcrest.core.IsNull.nullValue; -import static org.hamcrest.number.OrderingComparison.greaterThan; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; - -import net.sf.ehcache.AbstractCacheTest; -import net.sf.ehcache.CacheException; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Element; -import net.sf.ehcache.config.CacheConfiguration; -import net.sf.ehcache.config.Configuration; -import net.sf.ehcache.util.RetryAssert; - -import org.hamcrest.collection.IsEmptyCollection; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - * Tests replication of Cache events with large payloads exceeding MTU - *

- * Note these tests need a live network interface running in multicast mode to work - *

- * - * @author Abhishek Sanoujam - */ -public class RMICacheReplicatorWithLargePayloadIT extends AbstractRMITest { - - private static final Logger LOG = Logger.getLogger(RMICacheReplicatorWithLargePayloadIT.class.getName()); - - private static int MB = 1024 * 1024; - - /** - * {@inheritDoc} Sets up two caches: cache1 is local. cache2 is to be receive updates - * - * @throws Exception - */ - @Before - public void setUp() throws Exception { - failFastInsufficientMemory(); - assertThat(getActiveReplicationThreads(), IsEmptyCollection.empty()); - } - - private void failFastInsufficientMemory() { - // fail fast if running with insufficient heap - long totalMemory = Runtime.getRuntime().totalMemory(); - if (totalMemory < 200 * MB) { - String msg = "Insufficient heap (approx. " + (totalMemory / MB) + " MB detected), this test requires at least 256 MB to run.\n"; - msg += "Steps to take:\n"; - msg += " 1) If you are running with eclipse: specify \"-Xms256m -Xmx256m\" as VM arguments in the \"Run Confuguration\" for this test\n"; - msg += " 2) If you are running using mvn with \"mvn test -Dtest=" + this.getClass().getSimpleName() - + "\", add this in the command line: -DargLine=\"-Xms256m -Xmx256m\"\n"; - msg += " Run the test like: mvn test -Dtest=" + this.getClass().getSimpleName() + " -DargLine=\"-Xms256m -Xmx256m\""; - LOG.log(Level.WARNING, msg); - fail(msg); - } - } - - @After - public void noReplicationThreads() throws Exception { - RetryAssert.assertBy(30, TimeUnit.SECONDS, new Callable>() { - @Override - public Set call() throws Exception { - return getActiveReplicationThreads(); - } - }, IsEmptyCollection.empty()); - } - - private static List createCluster(int size, String ... caches){ - LOG.info("Creating Cluster"); - Collection required = Arrays.asList(caches); - List configurations = new ArrayList(size); - for (int i = 1; i <= size; i++) { - Configuration config = getConfiguration(AbstractCacheTest.TEST_CONFIG_DIR + "distribution/ehcache-distributed-big-payload-" + i + ".xml").name("cm" + i); - if (!required.isEmpty()) { - for (Iterator> it = config.getCacheConfigurations().entrySet().iterator(); it.hasNext(); ) { - if (!required.contains(it.next().getKey())) { - it.remove(); - } - } - } - configurations.add(config); - } - LOG.info("Created Configurations"); - - List members = startupManagers(configurations); - try { - LOG.info("Created Managers"); - if (required.isEmpty()) { - waitForClusterMembership(10, TimeUnit.SECONDS, members); - LOG.info("Cluster Membership Complete"); - emptyCaches(10, TimeUnit.SECONDS, members); - LOG.info("Caches Emptied"); - } else { - waitForClusterMembership(10, TimeUnit.SECONDS, required, members); - emptyCaches(10, TimeUnit.SECONDS, required, members); - } - return members; - } catch (RuntimeException e) { - destroyCluster(members); - throw e; - } catch (Error e) { - destroyCluster(members); - throw e; - } - } - - private static void destroyCluster(List members) { - for (CacheManager manager : members) { - if (manager != null) { - manager.shutdown(); - } - } - } - - @Test - public void testAssertBigPayload() { - List cluster = createCluster(3); - try { - for (CacheManager manager : cluster) { - List localPeers = cluster.get(0).getCachePeerListener("RMI").getBoundCachePeers(); - List payloadList = PayloadUtil.createCompressedPayloadList(localPeers, 150); - assertThat(manager.getName(), payloadList, hasSize(greaterThan(1))); - } - - cluster.add(new CacheManager(AbstractCacheTest.TEST_CONFIG_DIR + "distribution/ehcache-distributed-big-payload-4.xml")); - - List localPeers = cluster.get(3).getCachePeerListener("RMI").getBoundCachePeers(); - List payloadList = PayloadUtil.createCompressedPayloadList(localPeers, 150); - assertThat(payloadList, hasSize(greaterThan(1))); - } finally { - destroyCluster(cluster); - } - } - - /** - * Does a new cache manager in the cluster get detected? - */ - @Test - public void testRemoteCachePeersDetectsNewCacheManager() throws InterruptedException { - List cluster = createCluster(3); - try { - //Add new CacheManager to cluster - cluster.add(new CacheManager(AbstractCacheTest.TEST_CONFIG_DIR + "distribution/ehcache-distributed-big-payload-4.xml")); - - //Allow detection to occur - waitForClusterMembership(10020, TimeUnit.MILLISECONDS, cluster); - } finally { - destroyCluster(cluster); - } - } - - /** - * Does a down cache manager in the cluster get removed? - */ - @Test - public void testRemoteCachePeersDetectsDownCacheManager() throws InterruptedException { - List cluster = createCluster(3); - try { - MulticastKeepaliveHeartbeatSender.setHeartBeatStaleTime(3000); - //Drop a CacheManager from the cluster - cluster.remove(2).shutdown(); - assertThat(cluster, hasSize(2)); - - //Allow change detection to occur. Heartbeat 1 second and is not stale until 5000 - waitForClusterMembership(11020, TimeUnit.MILLISECONDS, cluster); - } finally { - destroyCluster(cluster); - } - } - - /** - * Does a down cache manager in the cluster get removed? - */ - @Test - public void testRemoteCachePeersDetectsDownCacheManagerSlow() throws InterruptedException { - List cluster = createCluster(3); - try { - CacheManager manager = cluster.get(0); - - Thread.sleep(2000); - - //Drop a CacheManager from the cluster - cluster.remove(2).shutdown(); - - //Insufficient time for it to timeout - CacheManagerPeerProvider provider = manager.getCacheManagerPeerProvider("RMI"); - for (String cacheName : manager.getCacheNames()) { - List remotePeersOfCache1 = provider.listRemoteCachePeers(manager.getCache(cacheName)); - assertThat((List) remotePeersOfCache1, hasSize(2)); - } - } finally { - destroyCluster(cluster); - } - } - - /** - * Tests put and remove initiated from cache1 in a cluster - *

- * This test goes into an infinite loop if the chain of notifications is not somehow broken. - */ - @Test - public void testPutProgagatesFromAndToEveryCacheManagerAndCache() throws CacheException, InterruptedException { - final List cluster = createCluster(3); - try { - final CacheManager manager0 = cluster.get(0); - //Put - final String[] cacheNames = manager0.getCacheNames(); - Arrays.sort(cacheNames); - for (int i = 0; i < cacheNames.length; i++) { - String name = cacheNames[i]; - manager0.getCache(name).put(new Element(Integer.toString(i), Integer.valueOf(i))); - //Add some non serializable elements that should not get propagated - manager0.getCache(name).put(new Element("nonSerializable" + i, new Object())); - } - - assertBy(10, TimeUnit.SECONDS, new Callable() { - - public Boolean call() throws Exception { - for (int i = 0; i < cacheNames.length; i++) { - String name = cacheNames[i]; - for (CacheManager manager : cluster.subList(1, cluster.size())) { - assertThat("Cache : " + name, manager.getCache(name).get(Integer.toString(i)), notNullValue()); - assertThat(manager.getCache(name).get("nonSerializable" + i), nullValue()); - } - } - return Boolean.TRUE; - } - }, is(Boolean.TRUE)); - } finally { - destroyCluster(cluster); - } - - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/management/impl/AggregateCacheRegionStats.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/management/impl/AggregateCacheRegionStats.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/management/impl/AggregateCacheRegionStats.java (revision 0) @@ -1,62 +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.management.impl; - -/** - * @author gkeim - * - */ -public class AggregateCacheRegionStats extends CacheRegionStats { - private int nodeCount; - - /** - * @param region - */ - public AggregateCacheRegionStats(String region) { - super(region); - } - - /** - * @param stats - */ - public void aggregate(CacheRegionStats stats) { - nodeCount++; - hitCount += stats.getHitCount(); - missCount += stats.getMissCount(); - putCount += stats.getPutCount(); - hitRatio = determineHitRatio(); - - // just add the in memory count together, an average will be returned when the getter is used - elementCountInMemory += stats.getElementCountInMemory(); - - // the largest element count on disk is the one that is the most correct - if (stats.getElementCountOnDisk() > elementCountOnDisk) { - elementCountOnDisk = stats.getElementCountOnDisk(); - } - // elementCountTotal is the same for each node, since it's the total count in the cluster - // no real aggregation is needed, just use the same total count - elementCountTotal = stats.getElementCountTotal(); - } - - /** - * @see net.sf.ehcache.hibernate.management.impl.CacheRegionStats#getElementCountInMemory() - */ - @Override - public long getElementCountInMemory() { - return elementCountInMemory / nodeCount; - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/writer/writebehind/OperationConverter.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/writer/writebehind/OperationConverter.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/writer/writebehind/OperationConverter.java (revision 0) @@ -1,34 +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.writer.writebehind; - -/** - * Interface that allows an converter to be implemented that can create an operation based - * on an arbitrary object. - * - * @param the operation type that should be converted to - * @author Geert Bevin - * @version $Id: OperationConverter.java 5594 2012-05-07 16:04:31Z cdennis $ - */ -public interface OperationConverter { - /** - * Convert an arbitrary object - * - * @param source the object to convert - * @return the converted operation instance - */ - public T convert(Object source); -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/txns/SuspendResumeBTMClient.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/txns/SuspendResumeBTMClient.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/txns/SuspendResumeBTMClient.java (revision 0) @@ -1,21 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.ehcache.tests.txns; - -import bitronix.tm.Configuration; -import bitronix.tm.TransactionManagerServices; - -public class SuspendResumeBTMClient extends SuspendResumeClient { - - public SuspendResumeBTMClient(String[] args) { - super(args); - Configuration config = TransactionManagerServices.getConfiguration(); - config.setServerId("suspendResumeTx-1-" + Math.random()); - config.setJournal("null"); - } - - public static void main(String[] args) { - new SuspendResumeBTMClient(args).run(); - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/net/sf/ehcache/osgi/OsgiHibernateTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/net/sf/ehcache/osgi/OsgiHibernateTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/net/sf/ehcache/osgi/OsgiHibernateTest.java (revision 0) @@ -1,348 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package net.sf.ehcache.osgi; - -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.ops4j.pax.exam.CoreOptions.bootDelegationPackages; -import static org.ops4j.pax.exam.CoreOptions.maven; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; -import static org.ops4j.pax.exam.CoreOptions.options; -import static org.ops4j.pax.exam.CoreOptions.systemProperty; -import static org.ops4j.pax.exam.CoreOptions.wrappedBundle; -import static org.terracotta.test.OsgiUtil.commonOptions; -import static org.terracotta.test.OsgiUtil.getMavenBundle; - -import net.sf.ehcache.Cache; -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.Status; - -import org.hibernate.HibernateException; -import org.hibernate.Session; -import org.hibernate.SessionFactory; -import org.hibernate.Transaction; -import org.hibernate.cache.access.SoftLock; -import org.hibernate.cfg.Configuration; -import org.hibernate.stat.QueryStatistics; -import org.hibernate.stat.SecondLevelCacheStatistics; -import org.hibernate.stat.Statistics; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.ProbeBuilder; -import org.ops4j.pax.exam.TestProbeBuilder; -import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; -import org.ops4j.pax.exam.spi.reactors.PerMethod; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.terracotta.ehcache.tests.container.hibernate.domain.Event; -import org.terracotta.ehcache.tests.container.hibernate.domain.EventManager; -import org.terracotta.ehcache.tests.container.hibernate.domain.Item; -import org.terracotta.ehcache.tests.container.hibernate.domain.Person; -import org.terracotta.ehcache.tests.container.hibernate.domain.PhoneNumber; -import org.terracotta.ehcache.tests.container.hibernate.domain.VersionedItem; -import org.terracotta.test.OsgiUtil; - -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import javax.inject.Inject; - -/** - * @author Chris Dennis - * @author hhuynh - */ -@RunWith(PaxExam.class) -@ExamReactorStrategy(PerMethod.class) -@Ignore -public class OsgiHibernateTest { - - private SessionFactory sessionFactory; - private Configuration config; - - /** - * Injected BundleContext - */ - @Inject - protected BundleContext bc; - - public OsgiHibernateTest() { - // - } - - public void testBundle() { - assertThat(bc, is(notNullValue())); - System.out.println(Arrays.asList(bc.getBundles())); - } - - @org.ops4j.pax.exam.Configuration - public Option[] config() { - return options(bootDelegationPackages("sun.*,jdk.*,javax.naming,javax.naming.spi,javax.naming.event,javax.management"), - commonOptions(), - wrappedBundle(maven("javax.transaction", "jta").versionAsInProject()) - .exports("javax.transaction;version=1.1"), - getMavenBundle("net.sf.ehcache", "ehcache-ee", "ehcache"), - getMavenBundle("net.sf.ehcache.test", "hibernate-ehcache-ee-bundle", "hibernate-ehcache-bundle").noStart(), - wrappedBundle(maven("org.apache.derby", "derby").versionAsInProject()), - systemProperty("derby.system.home").value("derby")); - } - - @ProbeBuilder - public TestProbeBuilder extendProbe(TestProbeBuilder builder) { - builder.setHeader(Constants.IMPORT_PACKAGE, - "javax.transaction;version=1.1,org.hibernate,org.osgi.framework,org.slf4j"); - builder.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*"); - return builder; - } - - public synchronized SessionFactory getSessionFactory() { - if (sessionFactory == null) { - try { - sessionFactory = config.buildSessionFactory(); - } catch (HibernateException ex) { - System.err.println("Initial SessionFactory creation failed." + ex); - throw new ExceptionInInitializerError(ex); - } - } - return sessionFactory; - } - - private void printBundles() { - for (Bundle b : bc.getBundles()) { - System.out.println("XXX Bundle " + b.getSymbolicName() + ", " + b.getVersion() + ", state: " + b.getState()); - } - } - - @Before - public void setUp() throws Exception { - printBundles(); - - ClassLoader prev = Thread.currentThread().getContextClassLoader(); - try { - Thread.currentThread().setContextClassLoader(OsgiHibernateTest.class.getClassLoader()); - config = new Configuration().configure(OsgiHibernateTest.class - .getResource("/net/sf/ehcache/osgi/hibernate.cfg.xml")); - - config.setProperty("hibernate.hbm2ddl.auto", "create-drop"); - getSessionFactory(); // call for side effect of initializing the session factory - } finally { - Thread.currentThread().setContextClassLoader(prev); - } - - getSessionFactory().getStatistics().setStatisticsEnabled(true); - removeCaches(); - } - - @After - public void tearDown() { - getSessionFactory().close(); - } - - private void removeCaches() { - for (CacheManager manager : CacheManager.ALL_CACHE_MANAGERS) { - for (String s : manager.getCacheNames()) { - final Cache cache = manager.getCache(s); - if (cache.getStatus() == Status.STATUS_ALIVE) { - cache.removeAll(); - } - } - } - } - - @Test - public void testQueryCacheInvalidation() throws Exception { - Session s = getSessionFactory().openSession(); - Transaction t = s.beginTransaction(); - Item i = new Item(); - i.setName("widget"); - i.setDescription("A really top-quality, full-featured widget."); - s.persist(i); - t.commit(); - s.close(); - - SecondLevelCacheStatistics slcs = s.getSessionFactory().getStatistics() - .getSecondLevelCacheStatistics(Item.class.getName()); - - assertEquals(1, slcs.getPutCount()); - assertEquals(1, slcs.getElementCountInMemory()); - assertEquals(1, slcs.getEntries().size()); - - s = getSessionFactory().openSession(); - t = s.beginTransaction(); - i = (Item) s.get(Item.class, i.getId()); - - assertEquals(1, slcs.getHitCount()); - assertEquals(0, slcs.getMissCount()); - - i.setDescription("A bog standard item"); - - t.commit(); - s.close(); - - assertEquals(2, slcs.getPutCount()); - - Object entry = slcs.getEntries().get(i.getId()); - Map map; - if (entry instanceof Map) { - map = (Map) entry; - } else { - Method valueMethod = entry.getClass().getDeclaredMethod("getValue", (Class[]) null); - valueMethod.setAccessible(true); - map = (Map) valueMethod.invoke(entry, (Object[]) null); - } - assertTrue(map.get("description").equals("A bog standard item")); - assertTrue(map.get("name").equals("widget")); - - // cleanup - s = getSessionFactory().openSession(); - t = s.beginTransaction(); - s.delete(i); - t.commit(); - s.close(); - } - - @Test - public void testEmptySecondLevelCacheEntry() throws Exception { - getSessionFactory().evictEntity(Item.class.getName()); - Statistics stats = getSessionFactory().getStatistics(); - stats.clear(); - SecondLevelCacheStatistics statistics = stats.getSecondLevelCacheStatistics(Item.class.getName()); - Map cacheEntries = statistics.getEntries(); - assertEquals(0, cacheEntries.size()); - } - - @Test - public void testStaleWritesLeaveCacheConsistent() { - Session s = getSessionFactory().openSession(); - Transaction txn = s.beginTransaction(); - VersionedItem item = new VersionedItem(); - item.setName("steve"); - item.setDescription("steve's item"); - s.save(item); - txn.commit(); - s.close(); - - Long initialVersion = item.getVersion(); - - // manually revert the version property - item.setVersion(new Long(item.getVersion().longValue() - 1)); - - try { - s = getSessionFactory().openSession(); - txn = s.beginTransaction(); - s.update(item); - txn.commit(); - s.close(); - fail("expected stale write to fail"); - } catch (Throwable expected) { - // expected behavior here - if (txn != null) { - try { - txn.rollback(); - } catch (Throwable ignore) { - // - } - } - } finally { - if (s != null && s.isOpen()) { - try { - s.close(); - } catch (Throwable ignore) { - // - } - } - } - - // check the version value in the cache... - SecondLevelCacheStatistics slcs = getSessionFactory().getStatistics() - .getSecondLevelCacheStatistics(VersionedItem.class.getName()); - - Object entry = slcs.getEntries().get(item.getId()); - Long cachedVersionValue; - if (entry instanceof SoftLock) { - // FIXME don't know what to test here - // cachedVersionValue = new Long( ( (ReadWriteCache.Lock) - // entry).getUnlockTimestamp() ); - } else { - cachedVersionValue = (Long) ((Map) entry).get("_version"); - assertEquals(initialVersion.longValue(), cachedVersionValue.longValue()); - } - - // cleanup - s = getSessionFactory().openSession(); - txn = s.beginTransaction(); - item = (VersionedItem) s.load(VersionedItem.class, item.getId()); - s.delete(item); - txn.commit(); - s.close(); - - } - - @Test - public void testGeneralUsage() throws Exception { - EventManager mgr = new EventManager(getSessionFactory()); - Statistics stats = getSessionFactory().getStatistics(); - - // create 3 persons Steve, Orion, Tim - Person stevePerson = new Person(); - stevePerson.setFirstname("Steve"); - stevePerson.setLastname("Harris"); - Long steveId = mgr.createAndStorePerson(stevePerson); - mgr.addEmailToPerson(steveId, "steve@tc.com"); - mgr.addEmailToPerson(steveId, "sharrif@tc.com"); - mgr.addTalismanToPerson(steveId, "rabbit foot"); - mgr.addTalismanToPerson(steveId, "john de conqueroo"); - - PhoneNumber p1 = new PhoneNumber(); - p1.setNumberType("Office"); - p1.setPhone(111111); - mgr.addPhoneNumberToPerson(steveId, p1); - - PhoneNumber p2 = new PhoneNumber(); - p2.setNumberType("Home"); - p2.setPhone(222222); - mgr.addPhoneNumberToPerson(steveId, p2); - - Person orionPerson = new Person(); - orionPerson.setFirstname("Orion"); - orionPerson.setLastname("Letizi"); - Long orionId = mgr.createAndStorePerson(orionPerson); - mgr.addEmailToPerson(orionId, "orion@tc.com"); - mgr.addTalismanToPerson(orionId, "voodoo doll"); - - Long timId = mgr.createAndStorePerson("Tim", "Teck"); - mgr.addEmailToPerson(timId, "teck@tc.com"); - mgr.addTalismanToPerson(timId, "magic decoder ring"); - - Long engMeetingId = mgr.createAndStoreEvent("Eng Meeting", stevePerson, new Date()); - mgr.addPersonToEvent(steveId, engMeetingId); - mgr.addPersonToEvent(orionId, engMeetingId); - mgr.addPersonToEvent(timId, engMeetingId); - - Long docMeetingId = mgr.createAndStoreEvent("Doc Meeting", orionPerson, new Date()); - mgr.addPersonToEvent(steveId, docMeetingId); - mgr.addPersonToEvent(orionId, docMeetingId); - - for (Event event : (List) mgr.listEvents()) { - mgr.listEmailsOfEvent(event.getId()); - } - - QueryStatistics queryStats = stats.getQueryStatistics("from Event"); - assertEquals("Cache Miss Count", 1L, queryStats.getCacheMissCount()); - assertEquals("Cache Hit Count", 0L, queryStats.getCacheHitCount()); - assertEquals("Cache Put Count", 1L, queryStats.getCachePutCount()); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/eventual/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/eventual/package.html (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/eventual/package.html (revision 0) @@ -1,10 +0,0 @@ - - - - -

Construct related to eventual operations

- -This package contains a decorator which offers a strong view on an eventual consistent cache. - - - Index: rctags/ehcache-2.10.9.0.373/distribution/events/src/assemble/bin/stop-sample.bat =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/distribution/events/src/assemble/bin/stop-sample.bat (revision 11344) +++ rctags/ehcache-2.10.9.0.373/distribution/events/src/assemble/bin/stop-sample.bat (revision 0) @@ -1,13 +0,0 @@ -@echo off - -setlocal - -set root=%~d0%~p0.. -set root="%root:"=%" - -cd %root% - -call bin/stop-jetty.bat 9081 -call bin/stop-jetty.bat 9082 - -endlocal \ No newline at end of file Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/hibernate/domain/Event.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/hibernate/domain/Event.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/hibernate/domain/Event.java (revision 0) @@ -1,83 +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; - -import java.util.Date; -import java.util.HashSet; -import java.util.Set; - -public class Event { - private Long id; - - private String title; - private Date date; - private Set participants = new HashSet(); - private Person organizer; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Date getDate() { - return date; - } - - public void setDate(Date date) { - this.date = date; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public void setOrganizer(Person organizer) { - this.organizer = organizer; - } - - public Person getOrganizer() { - return organizer; - } - - public Set getParticipants() { - return participants; - } - - public void setParticipants(Set participants) { - this.participants = participants; - } - - public void addParticipant(Person person) { - participants.add(person); - person.getEvents().add(this); - } - - public void removeParticipant(Person person) { - participants.remove(person); - person.getEvents().remove(this); - } - - public String toString() { - return getTitle() + ": " + getDate(); - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/servermap/ServerMapL2EvictionReachesL1Test.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/servermap/ServerMapL2EvictionReachesL1Test.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/ehcache/tests/servermap/ServerMapL2EvictionReachesL1Test.java (revision 0) @@ -1,21 +0,0 @@ -package org.terracotta.ehcache.tests.servermap; - -import org.terracotta.ehcache.tests.AbstractCacheTestBase; - -import com.tc.test.config.model.TestConfig; - -public class ServerMapL2EvictionReachesL1Test extends AbstractCacheTestBase { - - public ServerMapL2EvictionReachesL1Test(TestConfig testConfig) { - super("/servermap/servermap-l2-eviction-reaches-l1-test.xml", testConfig, - ServerMapL2EvictionReachesL1TestClient.class); - testConfig.setDgcEnabled(true); - testConfig.setDgcIntervalInSec(60); - testConfig.addTcProperty("ehcache.evictor.logging.enabled", "true"); - - testConfig.getClientConfig().addExtraClientJvmArg("-Dcom.tc.l1.cachemanager.enabled=false"); - testConfig.getClientConfig().addExtraClientJvmArg("-Dcom.tc.ehcache.evictor.logging.enabled=true"); - testConfig.getClientConfig().addExtraClientJvmArg("-Dcom.tc.l1.lockmanager.timeout.interval=60000"); - } - -} Index: rctags/ehcache-2.10.9.0.373/management-ehcache-v1/src/main/java/net/sf/ehcache/management/resource/CacheManagerConfigEntity.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-v1/src/main/java/net/sf/ehcache/management/resource/CacheManagerConfigEntity.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-v1/src/main/java/net/sf/ehcache/management/resource/CacheManagerConfigEntity.java (revision 0) @@ -1,39 +0,0 @@ -package net.sf.ehcache.management.resource; - -import org.terracotta.management.resource.VersionedEntity; - -/** - * @author brandony - */ -public class CacheManagerConfigEntity extends VersionedEntity { - private String cacheManagerName; - private String agentId; - - private String xml; - - public String getCacheManagerName() { - return cacheManagerName; - } - - public void setCacheManagerName(String cacheManagerName) { - this.cacheManagerName = cacheManagerName; - } - - public String getXml() { - return xml; - } - - public void setXml(String xml) { - this.xml = xml; - } - - @Override - public String getAgentId() { - return agentId; - } - - @Override - public void setAgentId(String agentId) { - this.agentId = agentId; - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-unloadablecachemanagerlistenerclass.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-unloadablecachemanagerlistenerclass.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/ehcache-unloadablecachemanagerlistenerclass.xml (revision 0) @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/servermap/servermap-l2-eviction-reaches-l1-test.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/servermap/servermap-l2-eviction-reaches-l1-test.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/resources/servermap/servermap-l2-eviction-reaches-l1-test.xml (revision 0) @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/nonstop/HibernateNonstopCacheExceptionHandler.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/nonstop/HibernateNonstopCacheExceptionHandler.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/nonstop/HibernateNonstopCacheExceptionHandler.java (revision 0) @@ -1,82 +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.nonstop; - -import net.sf.ehcache.constructs.nonstop.NonStopCacheException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Class that takes care of {@link NonStopCacheException} that happens in hibernate module - * - * @author Abhishek Sanoujam - * - */ -public final class HibernateNonstopCacheExceptionHandler { - /** - * Property name which set as "true" will throw exceptions on timeout with hibernate - */ - public static final String HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY = "ehcache.hibernate.propagateNonStopCacheException"; - - /** - * Property name for logging the stack trace of the nonstop cache exception too. False by default - */ - public static final String HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY = "ehcache.hibernate.logNonStopCacheExceptionStackTrace"; - - private static final Logger LOGGER = LoggerFactory.getLogger(HibernateNonstopCacheExceptionHandler.class); - - private static final HibernateNonstopCacheExceptionHandler INSTANCE = new HibernateNonstopCacheExceptionHandler(); - - /** - * private constructor - */ - private HibernateNonstopCacheExceptionHandler() { - // private - } - - /** - * Returns the singleton instance - * - * @return the singleton instance - */ - public static HibernateNonstopCacheExceptionHandler getInstance() { - return INSTANCE; - } - - /** - * Handle {@link NonStopCacheException}. - * If {@link HibernateNonstopCacheExceptionHandler#HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY} system property is set to true, - * rethrows the {@link NonStopCacheException}, otherwise logs the exception. While logging, if - * {@link HibernateNonstopCacheExceptionHandler#HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY} is set to true, logs the exception stack - * trace too, otherwise logs the exception message only - * - * @param nonStopCacheException - */ - public void handleNonstopCacheException(NonStopCacheException nonStopCacheException) { - if (Boolean.getBoolean(HIBERNATE_THROW_EXCEPTION_ON_TIMEOUT_PROPERTY)) { - throw nonStopCacheException; - } else { - if (Boolean.getBoolean(HIBERNATE_LOG_EXCEPTION_STACK_TRACE_PROPERTY)) { - LOGGER.debug("Ignoring NonstopCacheException - " + nonStopCacheException.getMessage(), nonStopCacheException); - } else { - LOGGER.debug("Ignoring NonstopCacheException - " + nonStopCacheException.getMessage()); - } - } - } - -} Index: rctags/ehcache-2.10.9.0.373/management-ehcache-v2/src/main/java/net/sf/ehcache/management/resource/CacheStatisticSampleEntityV2.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-v2/src/main/java/net/sf/ehcache/management/resource/CacheStatisticSampleEntityV2.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-v2/src/main/java/net/sf/ehcache/management/resource/CacheStatisticSampleEntityV2.java (revision 0) @@ -1,33 +0,0 @@ -/* - * All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright - * notice. All rights reserved. - */ -package net.sf.ehcache.management.resource; - -import java.util.Map; - -/** - * @author brandony - */ -public class CacheStatisticSampleEntityV2 extends AbstractCacheEntityV2{ - - private String statName; - - private Map statValueByTimeMillis; - - public String getStatName() { - return statName; - } - - public void setStatName(String statName) { - this.statName = statName; - } - - public Map getStatValueByTimeMillis() { - return statValueByTimeMillis; - } - - public void setStatValueByTimeMillis(Map statValueByTimeMillis) { - this.statValueByTimeMillis = statValueByTimeMillis; - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/classloader/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/classloader/package.html (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/constructs/classloader/package.html (revision 0) @@ -1,10 +0,0 @@ - - - - -

ClassLoader contstructs package

- -This package contains decorators that are concerned with classloaders - - - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/ExtendedStatistics.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/ExtendedStatistics.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/statistics/extended/ExtendedStatistics.java (revision 0) @@ -1,552 +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 net.sf.ehcache.CacheOperationOutcomes; -import net.sf.ehcache.store.StoreOperationOutcomes; -import net.sf.ehcache.transaction.xa.XaCommitOutcome; -import net.sf.ehcache.transaction.xa.XaRecoveryOutcome; -import net.sf.ehcache.transaction.xa.XaRollbackOutcome; -import org.terracotta.statistics.archive.Timestamped; - -import java.util.EnumSet; -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -/** - * The ExtendedStatistics interface. - * - * @author cschanck - */ -public interface ExtendedStatistics { - - /** The Constant ALL_CACHE_PUT_OUTCOMES. */ - static final Set ALL_CACHE_PUT_OUTCOMES = EnumSet.allOf(CacheOperationOutcomes.PutOutcome.class); - - /** The Constant ALL_CACHE_GET_OUTCOMES. */ - static final Set ALL_CACHE_GET_OUTCOMES = EnumSet.allOf(CacheOperationOutcomes.GetOutcome.class); - - /** The Constant ALL_CACHE_MISS_OUTCOMES. */ - static final Set ALL_CACHE_MISS_OUTCOMES = EnumSet.of( - CacheOperationOutcomes.GetOutcome.MISS_EXPIRED, CacheOperationOutcomes.GetOutcome.MISS_NOT_FOUND); - - /** The Constant ALL_STORE_PUT_OUTCOMES. */ - static final Set ALL_STORE_PUT_OUTCOMES = EnumSet.allOf(StoreOperationOutcomes.PutOutcome.class); - - /** - * Sets the time to disable. - * - * @param time the time - * @param unit the unit - */ - void setTimeToDisable(long time, TimeUnit unit); - - /** - * Sets the always on. - * - * @param alwaysOn the new always on - */ - void setAlwaysOn(boolean alwaysOn); - - /** - * Gets the. - * - * @return the operation - */ - Operation get(); - - /** - * Put. - * - * @return the operation - */ - Operation put(); - - /** - * Removes the. - * - * @return the operation - */ - Operation remove(); - - /** - * single arg replace operation - * @return - */ - Operation replaceOneArg(); - - /** - * two arg replace operation - * @return - */ - Operation replaceTwoArg(); - - /** - * put if absent operation - * @return - */ - Operation putIfAbsent(); - - /** - * remove element operation - * @return - */ - Operation removeElement(); - - /** - * Heap get. - * - * @return the operation - */ - Operation heapGet(); - - /** - * Offheap get. - * - * @return the operation - */ - Operation offheapGet(); - - /** - * Disk get. - * - * @return the operation - */ - Operation diskGet(); - - /** - * Heap put. - * - * @return the operation - */ - Operation heapPut(); - - /** - * Offheap put. - * - * @return the operation - */ - Operation offheapPut(); - - /** - * Disk put. - * - * @return the operation - */ - Operation diskPut(); - - /** - * Heap remove. - * - * @return the operation - */ - Operation heapRemove(); - - /** - * Offheap remove. - * - * @return the operation - */ - Operation offheapRemove(); - - /** - * Disk remove. - * - * @return the operation - */ - Operation diskRemove(); - - /** - * Search. - * - * @return the operation - */ - Operation search(); - - /** - * Xa commit. - * - * @return the operation - */ - Operation xaCommit(); - - /** - * Xa rollback. - * - * @return the operation - */ - Operation xaRollback(); - - /** - * Xa recovery. - * - * @return the operation - */ - Operation xaRecovery(); - - /** - * Eviction. - * - * @return the operation - */ - Operation eviction(); - - /** - * Expiry. - * - * @return the operation - */ - Operation expiry(); - - /** - * Cluster events - * - * @return the operation - */ - Operation clusterEvent(); - - /** - * Nonstop events - * - * @return the operation - */ - Operation nonstop(); - - /** - * All get. - * - * @return the result - */ - Result allGet(); - - /** - * All miss. - * - * @return the result - */ - Result allMiss(); - - /** - * All put. - * - * @return the result - */ - Result allPut(); - - /** - * Heap all put. - * - * @return the result - */ - Result heapAllPut(); - - /** - * Off heap all put. - * - * @return the result - */ - Result offHeapAllPut(); - - /** - * Disk all put. - * - * @return the result - */ - Result diskAllPut(); - - /** - * Cache hit ratio. - * @return - */ - Statistic cacheHitRatio(); - - /** - * Nonstop timeout ratio - * @return - */ - Statistic nonstopTimeoutRatio(); - - /** - * Operations. - * - * @param the generic type - * @param outcome the outcome - * @param name the name - * @param tags the tags - * @return the sets the - */ - > Set> operations(Class outcome, String name, String... tags); - - /** - * Get the set of cache specific pass thru statistics for a nam/tags pair. Used for - * custom pass thru statistics, as opposed to well known standard ones. - * @param name name - * @param tags set of tags - * @return - */ - Set> passthru(String name, Set tags); - - /** - * The Interface Operation. - * - * @param the generic type - */ - public interface Operation> { - - /** - * Type. - * - * @return the class - */ - Class type(); - - /** - * Component. - * - * @param result the result - * @return the result - */ - Result component(T result); - - /** - * Compound. - * - * @param results the results - * @return the result - */ - Result compound(Set results); - - /** - * Ratio of. - * - * @param numerator the numerator - * @param denomiator the denomiator - * @return the statistic - */ - Statistic ratioOf(Set numerator, Set denomiator); - - /** - * Sets the always on. - * - * @param enable the new always on - */ - void setAlwaysOn(boolean enable); - - /** - * Checks if is always on. - * - * @return true, if is always on - */ - boolean isAlwaysOn(); - - /** - * Sets the window. - * - * @param time the time - * @param unit the unit - */ - void setWindow(long time, TimeUnit unit); - - /** - * Sets the history. - * - * @param samples the samples - * @param time the time - * @param unit the unit - */ - void setHistory(int samples, long time, TimeUnit unit); - - /** - * Gets the window size. - * - * @param unit the unit - * @return the window size - */ - long getWindowSize(TimeUnit unit); - - /** - * Gets the history sample size. - * - * @return the history sample size - */ - int getHistorySampleSize(); - - /** - * Gets the history sample time. - * - * @param unit the unit - * @return the history sample time - */ - long getHistorySampleTime(TimeUnit unit); - - } - - /** - * The Interface Result. - */ - public interface Result { - - /** - * Count. - * - * @return the statistic - */ - Statistic count(); - - /** - * Rate. - * - * @return the statistic - */ - Statistic rate(); - - /** - * Latency. - * - * @return the latency - */ - Latency latency(); - } - - /** - * The Latency interface. Provides min/max/average. - */ - public interface Latency { - - /** - * Minimum latency observed. - * - * @return Minimum observed latency. NULL if no operation was observed. - */ - Statistic minimum(); - - /** - * Maximum latency observed. - * - * @return Maximum observed latency. NULL if no operation was observed. - */ - Statistic maximum(); - - /** - * Average observed latency. - * - * @return Average observed latency. NULL if no operation was observed. - */ - Statistic average(); - } - - /** - * The Interface Statistic. - * - * @param the generic type - */ - public interface Statistic { - - /** - * Active. - * - * @return true, if successful - */ - boolean active(); - - /** - * Value. - * - * @return the t - */ - T value(); - - /** - * History. - * - * @return the list - */ - List> history(); - } - - /** - * Gets the size. - * - * @return the size - */ - Statistic size(); - - /** - * Gets the local heap size. - * - * @return the local heap size - */ - Statistic localHeapSize(); - - /** - * Gets the local heap size in bytes. - * - * @return the local heap size in bytes - */ - Statistic localHeapSizeInBytes(); - - /** - * Gets the local off heap size. - * - * @return the local off heap size - */ - Statistic localOffHeapSize(); - - /** - * Gets the local off heap size in bytes. - * - * @return the local off heap size in bytes - */ - Statistic localOffHeapSizeInBytes(); - - /** - * Gets the local disk size. - * - * @return the local disk size - */ - Statistic localDiskSize(); - - /** - * Gets the local disk size in bytes. - * - * @return the local disk size in bytes - */ - Statistic localDiskSizeInBytes(); - - /** - * Gets the remote size. - * - * @return the remote size - */ - Statistic remoteSize(); - - /** - * Gets the writer queue length. - * - * @return the writer queue length - */ - Statistic writerQueueLength(); - - /** - * Get the timestamp (millis) of the last cluster rejoin event - * - * @return statistic for cluster rejoin timestamp - */ - Statistic mostRecentRejoinTimeStampMillis(); - -} \ No newline at end of file Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/store/BlockingCacheTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/store/BlockingCacheTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/store/BlockingCacheTest.java (revision 0) @@ -1,135 +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.CacheException; -import net.sf.ehcache.Ehcache; -import net.sf.ehcache.Element; -import net.sf.ehcache.constructs.blocking.BlockingCache; - -import org.terracotta.ehcache.tests.AbstractCacheTestBase; -import org.terracotta.ehcache.tests.ClientBase; -import org.terracotta.toolkit.Toolkit; -import org.terracotta.toolkit.concurrent.ToolkitBarrier; - -import com.tc.test.config.model.TestConfig; - -import java.io.Serializable; - -import junit.framework.Assert; - -/** - * @author Alex Snaps - */ -public class BlockingCacheTest extends AbstractCacheTestBase { - - public BlockingCacheTest(TestConfig testConfig) { - super("blocking-cache.xml", testConfig, App.class, App.class, App.class); - } - - public static class App extends ClientBase { - private static final String KEY_1 = "funkyKey"; - private static final Serializable VALUE_1 = "A really cool value"; - private static final String KEY_2 = "otherFunkyKey"; - private static final Serializable VALUE_2 = "Even cooler value"; - private static final String KEY_3 = "theUeberFunkyKey"; - private static final Serializable VALUE_3 = "can't get any cooler value"; - private final ToolkitBarrier barrier; - - public App(String[] args) { - super("test1", args); - this.barrier = getClusteringToolkit().getBarrier("test-barrier", getParticipantCount()); - } - - public static void main(String[] args) { - new App(args).run(); - } - - @Override - protected void runTest(Cache testcache, Toolkit clusteringToolkit) throws Throwable { - final int index = barrier.await(); - - Ehcache cache = cacheManager.getCache("test1"); - Assert.assertNotNull("There should be a cache test from that manager!", cache); - BlockingCache blockingCache = new BlockingCache(cache); - cacheManager.replaceCacheWithDecoratedCache(cache, blockingCache); - cache = cacheManager.getEhcache("test1"); - - if (index == 0) { - // Node 0 blocks all other read to the key - Assert.assertNull("Key " + KEY_1 + " should not be present in the cache yet", cache.get(KEY_1)); - cache.put(new Element(KEY_2, VALUE_2)); - } - - barrier.await(); - - if (index != 0) { - // This call should block, until node 0 puts en element for KEY in the cache - Element element = cache.get(KEY_1); - Assert.assertNotNull("Node 0 should have put key " + KEY_1 + " in the cache", element); - Assert.assertEquals("Value for key " + KEY_1 + " should be " + VALUE_1, VALUE_1, element.getValue()); - } else { - Thread.sleep(2000); // Thinking about the meaning of life for a while - cache.put(new Element(KEY_1, VALUE_1)); - } - Element element = cache.get(KEY_2); - Assert.assertNotNull(element); - Assert.assertEquals("Value for key " + KEY_2 + " should be " + VALUE_2, VALUE_2, element.getValue()); - - barrier.await(); - - blockingCache.setTimeoutMillis(3000); - if (index == 0) { - // Should block all other get to the same key - cache.get(KEY_3); - } - - barrier.await(); - - switch (index) { - case 2: - Thread.sleep(2000); - Assert.assertNotNull(cache.get(KEY_3)); - break; - case 1: - try { - cache.get(KEY_3); - Assert.fail(); - } catch (CacheException e) { - // We failed aquiring the lock - } - break; - case 0: - Thread.sleep(3500); - cache.put(new Element(KEY_3, VALUE_3)); - break; - } - - barrier.await(); - - // This tests inline eviction (EHC-420) - Thread.sleep(22000); - - switch (index) { - case 0: - Assert.assertNull(cache.get(KEY_3)); - break; - } - - barrier.await(); - blockingCache.setTimeoutMillis(10000); - switch (index) { - case 0: - Thread.sleep(1500); - cache.put(new Element(KEY_3, VALUE_3)); - break; - default: - Assert.assertNotNull(cache.get(KEY_3)); - Assert.assertEquals(VALUE_3, cache.get(KEY_3).getValue()); - } - } - - } -} Index: rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/impl/CacheManagerConfigurationEntityBuilderV2.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/impl/CacheManagerConfigurationEntityBuilderV2.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/impl/CacheManagerConfigurationEntityBuilderV2.java (revision 0) @@ -1,57 +0,0 @@ -/* - * All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright - * notice. All rights reserved. - */ -package net.sf.ehcache.management.service.impl; - -import net.sf.ehcache.management.resource.CacheManagerConfigEntityV2; -import net.sf.ehcache.management.sampled.CacheManagerSampler; - -import org.terracotta.management.resource.AgentEntityV2; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -/** - * @author brandony - */ -final class CacheManagerConfigurationEntityBuilderV2 { - private final List cmSamplers = new ArrayList(); - - static CacheManagerConfigurationEntityBuilderV2 createWith(CacheManagerSampler sampler) { - return new CacheManagerConfigurationEntityBuilderV2(sampler); - } - - private CacheManagerConfigurationEntityBuilderV2(CacheManagerSampler sampler) { - addSampler(sampler); - } - - CacheManagerConfigurationEntityBuilderV2 add(CacheManagerSampler sampler) { - addSampler(sampler); - return this; - } - - Collection build() { - Collection cmces = new ArrayList(cmSamplers.size()); - - for (CacheManagerSampler sampler : cmSamplers) { - CacheManagerConfigEntityV2 cmce = new CacheManagerConfigEntityV2(); - cmce.setCacheManagerName(sampler.getName()); - cmce.setAgentId(AgentEntityV2.EMBEDDED_AGENT_ID); - // cmce.setVersion(this.getClass().getPackage().getImplementationVersion()); - cmce.setXml(sampler.generateActiveConfigDeclaration()); - - cmces.add(cmce); - } - - return cmces; - } - - private void addSampler(CacheManagerSampler sampler) { - if (sampler == null) { - throw new IllegalArgumentException("sampler == null"); - } - cmSamplers.add(sampler); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/package.html =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/package.html (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/config/generator/model/elements/package.html (revision 0) @@ -1,5 +0,0 @@ - - - This package contains utility classes encapsulating ideas of Elements and Attributes from the ehcache.xsd - - Index: rctags/ehcache-2.10.9.0.373/ehcache/src/test/java/net/sf/ehcache/terracotta/upgradability/serialization/ClusteredTransactionIDSerializationTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache/src/test/java/net/sf/ehcache/terracotta/upgradability/serialization/ClusteredTransactionIDSerializationTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache/src/test/java/net/sf/ehcache/terracotta/upgradability/serialization/ClusteredTransactionIDSerializationTest.java (revision 0) @@ -1,59 +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.terracotta.upgradability.serialization; - -import java.lang.reflect.Field; -import java.util.Comparator; -import java.util.Map; - -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.transaction.TransactionIDFactory; -import net.sf.ehcache.transaction.TransactionIDSerializedForm; -import org.junit.Test; -import org.terracotta.modules.ehcache.transaction.ClusteredTransactionID; - -import static org.mockito.Matchers.refEq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.terracotta.upgradability.serialization.SerializationUpgradabilityTesting.validateSerializedForm; - -/** - * - * @author cdennis - */ -public class ClusteredTransactionIDSerializationTest { - - private static final Comparator COMPARATOR = new Comparator() { - @Override - public int compare(ClusteredTransactionID o1, ClusteredTransactionID o2) { - return o1.equals(o2) && o1.getOwnerID().equals(o2.getOwnerID()) ? 0 : -1; - } - }; - - @Test - public void testBasic() throws Exception { - Field MANAGERS_MAP = CacheManager.class.getDeclaredField("CACHE_MANAGERS_MAP"); - MANAGERS_MAP.setAccessible(true); - CacheManager manager = mock(CacheManager.class); - ((Map) MANAGERS_MAP.get(null)).put("manager", manager); - TransactionIDFactory txnIdFactory = mock(TransactionIDFactory.class); - when(txnIdFactory.restoreTransactionID(refEq(new TransactionIDSerializedForm("manager", "cluster", "owner", 42L, 2)))) - .thenReturn(new ClusteredTransactionID("owner", "cluster", "manager", 42L, 2)); - when(manager.getOrCreateTransactionIDFactory()).thenReturn(txnIdFactory); - validateSerializedForm(new ClusteredTransactionID("owner", "cluster", "manager", 42L, 2), COMPARATOR, "serializedforms/ClusteredTransactionIDSerializationTest.testBasic.ser"); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/config/generator/xsom/XSDAttributeValueType.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/config/generator/xsom/XSDAttributeValueType.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/config/generator/xsom/XSDAttributeValueType.java (revision 0) @@ -1,264 +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.xsom; - -import net.sf.ehcache.config.MemoryUnit; - -import java.util.Iterator; -import java.util.Random; - -import com.sun.xml.xsom.XSAttributeDecl; -import com.sun.xml.xsom.XSFacet; -import com.sun.xml.xsom.XSRestrictionSimpleType; -import com.sun.xml.xsom.XSSimpleType; - -public abstract class XSDAttributeValueType { - - protected static final Random RANDOM = new Random(System.currentTimeMillis()); - protected String pattern; - public enum XsdType { - BOOLEAN, INTEGER, POSITIVE_INTEGER, NON_NEGATIVE_INTEGER, STRING, ANY_SIMPLE_TYPE, ENUMERATION; - } - protected String maxValue; - protected String minValue; - protected String length; - protected String maxLength; - protected String minLength; - - protected String totalDigits; - - private final XsdType type; - - public XSDAttributeValueType(XsdType type) { - this.type = type; - } - - public abstract String getRandomAllowedValue(); - - protected void fillUpRestrictions(XSAttributeDecl attributeDecl) { - XSSimpleType localType = attributeDecl.getType(); - XSRestrictionSimpleType restriction = localType.asRestriction(); - if (restriction != null) { - Iterator i = restriction.getDeclaredFacets().iterator(); - while (i.hasNext()) { - XSFacet facet = i.next(); - if (facet.getName().equals(XSFacet.FACET_MAXINCLUSIVE)) { - maxValue = facet.getValue().value; - } - if (facet.getName().equals(XSFacet.FACET_MININCLUSIVE)) { - minValue = facet.getValue().value; - } - if (facet.getName().equals(XSFacet.FACET_MAXEXCLUSIVE)) { - maxValue = String.valueOf(Integer.parseInt(facet.getValue().value) - 1); - } - if (facet.getName().equals(XSFacet.FACET_MINEXCLUSIVE)) { - minValue = String.valueOf(Integer.parseInt(facet.getValue().value) + 1); - } - if (facet.getName().equals(XSFacet.FACET_LENGTH)) { - length = facet.getValue().value; - } - if (facet.getName().equals(XSFacet.FACET_MAXLENGTH)) { - maxLength = facet.getValue().value; - } - if (facet.getName().equals(XSFacet.FACET_MINLENGTH)) { - minLength = facet.getValue().value; - } - if (facet.getName().equals(XSFacet.FACET_PATTERN)) { - pattern = facet.getValue().value; - } - if (facet.getName().equals(XSFacet.FACET_TOTALDIGITS)) { - totalDigits = facet.getValue().value; - } - } - } - } - - public static class XSDAttributeValueBooleanType extends XSDAttributeValueType { - - public XSDAttributeValueBooleanType() { - super(XsdType.BOOLEAN); - } - - @Override - public String getRandomAllowedValue() { - return RANDOM.nextInt() % 2 == 0 ? getTrue() : getFalse(); - } - - public String getTrue() { - return String.valueOf(true); - } - - public String getFalse() { - return String.valueOf(false); - } - - } - - public static class XSDAttributeValueIntegerType extends XSDAttributeValueType { - - public XSDAttributeValueIntegerType() { - super(XsdType.INTEGER); - } - - @Override - public String getRandomAllowedValue() { - return String.valueOf(RANDOM.nextInt()); - } - - } - - public static class XSDAttributeValuePositiveIntegerType extends XSDAttributeValueType { - - public XSDAttributeValuePositiveIntegerType() { - super(XsdType.POSITIVE_INTEGER); - } - - @Override - public String getRandomAllowedValue() { - return String.valueOf(Math.abs(RANDOM.nextInt() + 1)); - } - - } - - public static class XSDAttributeValueNonNegativeIntegerType extends XSDAttributeValueType { - - public XSDAttributeValueNonNegativeIntegerType() { - super(XsdType.NON_NEGATIVE_INTEGER); - } - - @Override - public String getRandomAllowedValue() { - return String.valueOf(Math.abs(RANDOM.nextInt())); - } - - } - - public static class XSDAttributeValueMemoryUnitType extends XSDAttributeValueType { - - public static final char[] unitChars; - - static { - MemoryUnit[] values = MemoryUnit.values(); - char [] chars = new char[values.length * 2]; - int i = 0; - for (MemoryUnit memoryUnit : values) { - chars[i++] = Character.toLowerCase(memoryUnit.getUnit()); - chars[i++] = Character.toUpperCase(memoryUnit.getUnit()); - } - unitChars = chars; - } - - public XSDAttributeValueMemoryUnitType() { - super(XsdType.NON_NEGATIVE_INTEGER); - } - - @Override - public String getRandomAllowedValue() { - int index = RANDOM.nextInt(unitChars.length + 1); - if(index < unitChars.length) { - return String.valueOf(Math.abs(RANDOM.nextInt())) + unitChars[index]; - } - return String.valueOf(Math.abs(RANDOM.nextInt())); - } - - } - - public static class XSDAttributeValueMemoryUnitOrPercentageType extends XSDAttributeValueType { - - public static final char[] unitChars; - - static { - MemoryUnit[] values = MemoryUnit.values(); - char [] chars = new char[values.length * 2 + 1]; - int i = 0; - for (MemoryUnit memoryUnit : values) { - chars[i++] = Character.toLowerCase(memoryUnit.getUnit()); - chars[i++] = Character.toUpperCase(memoryUnit.getUnit()); - } - chars[i] = '%'; - unitChars = chars; - } - - public XSDAttributeValueMemoryUnitOrPercentageType() { - super(XsdType.NON_NEGATIVE_INTEGER); - } - - @Override - public String getRandomAllowedValue() { - int index = RANDOM.nextInt(unitChars.length + 1); - if(index < unitChars.length) { - switch (unitChars[index]) { - case '%' : - return String.valueOf(Math.abs(RANDOM.nextInt(100) + 1)) + unitChars[index]; - default: - return String.valueOf(Math.abs(RANDOM.nextInt())) + unitChars[index]; - } - } - return String.valueOf(Math.abs(RANDOM.nextInt())); - } - - } - - public static class XSDAttributeValueStringType extends XSDAttributeValueType { - - private static final String[] RANDOM_VALUES = {"random_string_one", "random_string_two", "random_string_three", "random_string_four", - "random_string_five", }; - - public XSDAttributeValueStringType() { - super(XsdType.STRING); - } - - @Override - public String getRandomAllowedValue() { - return RANDOM_VALUES[RANDOM.nextInt(RANDOM_VALUES.length)]; - } - - } - - public static class XSDAttributeValueAnySimpleType extends XSDAttributeValueType { - - private static final String[] RANDOM_VALUES = {"any_simple_type_random_one", "any_simple_type_random_two", - "any_simple_type_random_three", "any_simple_type_random_four", "any_simple_type_random_five", }; - - public XSDAttributeValueAnySimpleType() { - super(XsdType.ANY_SIMPLE_TYPE); - } - - @Override - public String getRandomAllowedValue() { - return RANDOM_VALUES[RANDOM.nextInt(RANDOM_VALUES.length)]; - } - - } - - public static class XSDAttributeValueEnumerationType extends XSDAttributeValueType { - - private final String[] enumeration; - - public XSDAttributeValueEnumerationType(String[] enumeration) { - super(XsdType.ENUMERATION); - this.enumeration = enumeration; - } - - @Override - public String getRandomAllowedValue() { - return enumeration[RANDOM.nextInt(enumeration.length)]; - } - - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/nonstop/basic-cache-test.xml =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/nonstop/basic-cache-test.xml (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/resources/nonstop/basic-cache-test.xml (revision 0) @@ -1,17 +0,0 @@ - - - - - - - - - - - - - Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/pool/PoolAccessor.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/pool/PoolAccessor.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/pool/PoolAccessor.java (revision 0) @@ -1,123 +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.pool; - -/** - * PoolAccessors are used by stores to tell the pools about their resource consumption - * - * @param Type representing this "other" side of this accessor (i.e. a store), so the evictor can interact with it - * - * @author Ludovic Orban - * @author Alex Snaps - * - */ -public interface PoolAccessor { - - /** - * Add an element to the pool. - * - * @param key the key of the element - * @param value the value of the element - * @param container the element-container object - * @param force true if the pool should accept adding the element, even if it's out of resources - * @return how many bytes have been added to the pool or -1 if add failed. - */ - long add(Object key, Object value, Object container, boolean force); - - /** - * Check if there is enough room in the pool to add an element without provoking any eviction - * @param key the key of the element - * @param value the value of the element - * @param container the element-container object - * @return true if there is enough room left - */ - boolean canAddWithoutEvicting(Object key, Object value, Object container); - - /** - * Delete a fixed number of bytes from the pool. - * - * @param size number of bytes - * @return how many bytes have been freed from the pool. - * @throws IllegalArgumentException when sizeOf is negative - */ - long delete(long size) throws IllegalArgumentException; - - /** - * Delete a fixed number of bytes from the pool with the given objects. - * - * @param currentSize the size of the object(s) being replaced - * @param key the key of the element - * @param value the value of the element - * @param container the element-container object - * @param force true if the pool should accept replacing the element, even if it's out of resources - * @return the change in size of the pool, or {@link Long#MIN_VALUE} if replace failed. - */ - long replace(long currentSize, Object key, Object value, Object container, boolean force); - - /** - * Return how many bytes this accessor consumes from the pool. - * - * @return how many bytes this accessor consumes from the pool. - */ - long getSize(); - - /** - * unlink this PoolAccessor from its pool. - */ - void unlink(); - - /** - * Free resources used by this accessor. - */ - void clear(); - - /** - * Return the store that uses this accessor - * - * @return store using this accessor - */ - T getParticipant(); - - /** - * Sets the max size for this pool - * - * @param newValue the value in bytes - */ - void setMaxSize(long newValue); - - /** - * Returns the occupied size for this pool. - * - * @return occupied pool size - */ - long getPoolOccupancy(); - - /** - * Returns the size of this pool. - * - * @return pool size - */ - long getPoolSize(); - - /** - * Check if the store may contain elements which the SizeOf engine could not fully size. - * - * @return true if the store may contain partially sized objects - */ - boolean hasAbortedSizeOf(); - -} Index: rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/impl/ConstrainableEntityBuilderSupportV2.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/impl/ConstrainableEntityBuilderSupportV2.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-impl/management-ehcache-common/impl/ConstrainableEntityBuilderSupportV2.java (revision 0) @@ -1,136 +0,0 @@ -/* - * All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright - * notice. All rights reserved. - */ -package net.sf.ehcache.management.service.impl; - -import net.sf.ehcache.management.service.AccessorPrefix; -import net.sf.ehcache.util.counter.Counter; -import net.sf.ehcache.util.counter.sampled.SampledCounter; -import org.slf4j.Logger; - -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -/** -* @author brandony -*/ -abstract class ConstrainableEntityBuilderSupportV2 { - - private static final Set SIZE_ATTRIBUTE_NAMES = - Collections.unmodifiableSet(new HashSet(Arrays.asList("Size", "SizeSample", "RemoteSizeSample"))); - - private Set constraints; - - abstract Logger getLog(); - - protected void addConstraints(Set constraints) { - if (constraints == null) throw new IllegalArgumentException("constraints == null"); - - if (this.constraints == null) { - this.constraints = constraints; - } else { - this.constraints.addAll(constraints); - } - } - - protected Set getAttributeConstraints() { - return constraints; - } - - protected void buildAttributeMapByAttribute(Class api, - SAMPLER sampler, - Map attributeMap, - Collection attributes, - String nameAccessor) { - Set excludedNames = getExcludedAttributeNames(sampler); - - for (String attribute : attributes) { - Method method = null; - for (AccessorPrefix prefix : AccessorPrefix.values()) { - try { - method = api.getMethod(prefix + attribute); - break; - } catch (NoSuchMethodException e) { - //This is not the accessor you were looking for....move along - } - } - - if (method != null && !nameAccessor.equals(method.getName())) { - if (excludedNames.contains(attribute)) { - attributeMap.put(attribute, 0); - continue; - } - - addAttribute(sampler, attributeMap, attribute, method); - } - } - } - - protected void buildAttributeMapByApi(Class api, - SAMPLER sampler, - Map attributeMap, - Collection attributes, - String nameAccessor) { - Set excludedNames = getExcludedAttributeNames(sampler); - - for (Method method : api.getMethods()) { - String name = method.getName(); - String trimmedName = AccessorPrefix.trimPrefix(name); - if (!nameAccessor.equals(name) && AccessorPrefix.isAccessor(name) && (attributes == null || attributes.contains( - trimmedName))) { - - if (excludedNames.contains(trimmedName)) { - attributeMap.put(trimmedName, 0); - continue; - } - - addAttribute(sampler, attributeMap, trimmedName, method); - } - } - } - - protected abstract Set getExcludedAttributeNames(SAMPLER sampler); - - protected Set getUnsignedIntAttributeNames(SAMPLER sampler) { - return SIZE_ATTRIBUTE_NAMES; - } - - private void addAttribute(SAMPLER sampler, - Map attributeMap, - String attribute, - Method method) { - Object value = null; - try { - value = method.invoke(sampler); - - // stats reflection "helper" code - if (value instanceof SampledCounter) { - value = ((SampledCounter)value).getMostRecentSample().getCounterValue(); - } else if (value instanceof Counter) { - value = ((Counter)value).getValue(); - } - - if (getUnsignedIntAttributeNames(sampler).contains(attribute) && value instanceof Number) { - value = coerceUnsignedIntToLong(((Number)value).intValue()); - } - } catch (Exception e) { - value = null; - String msg = String.format("Failed to invoke method %s while constructing entity.", method.getName()); - getLog().warn(msg); - getLog().debug(msg, e); - } finally { - attributeMap.put(attribute, value); - } - } - - private static long coerceUnsignedIntToLong(int value) { - return value < 0 ? ((long)Integer.MAX_VALUE) + (value - Integer.MIN_VALUE + 1) : value; - } - -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/management/impl/EhcacheHibernateMbeanNames.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/management/impl/EhcacheHibernateMbeanNames.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/main/java/net/sf/ehcache/hibernate/management/impl/EhcacheHibernateMbeanNames.java (revision 0) @@ -1,77 +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.management.impl; - -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; - -/** - * Utility class used for getting {@link ObjectName}'s for ehcache hibernate MBeans - * - *

- * - * @author Abhishek Sanoujam - * @since 1.7 - * - */ -public abstract class EhcacheHibernateMbeanNames { - - /** - * Group id for all sampled mbeans registered - */ - public static final String GROUP_ID = "net.sf.ehcache.hibernate"; - - /** - * Type for the ehcache backed hibernate second level cache statistics mbean - */ - public static final String EHCACHE_HIBERNATE_TYPE = "EhcacheHibernateStats"; - - /** - * Filter out invalid ObjectName characters from s. - * - * @param s - * @return A valid JMX ObjectName attribute value. - */ - public static String mbeanSafe(String s) { - return s == null ? "" : s.replaceAll(",|:|=|\n", "."); - } - - /** - * Returns an ObjectName for the passed name - * - * @param name - * @return An {@link ObjectName} using the input name of cache manager - * @throws MalformedObjectNameException - */ - public static ObjectName getCacheManagerObjectName(String cacheManagerClusterUUID, String name) throws MalformedObjectNameException { - ObjectName objectName = new ObjectName(GROUP_ID + ":type=" + EHCACHE_HIBERNATE_TYPE + ",name=" + mbeanSafe(name) - + getBeanNameSuffix(cacheManagerClusterUUID)); - return objectName; - } - - private static String getBeanNameSuffix(String cacheManagerClusterUUID) { - String suffix = ""; - if (!isBlank(cacheManagerClusterUUID)) { - suffix = ",node=" + cacheManagerClusterUUID; - } - return suffix; - } - - private static boolean isBlank(String param) { - return param == null || "".equals(param.trim()); - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/distribution/ManualRMIPeerProviderIT.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/distribution/ManualRMIPeerProviderIT.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-core/src/test/java/net/sf/ehcache/distribution/ManualRMIPeerProviderIT.java (revision 0) @@ -1,89 +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.distribution; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - -import net.sf.ehcache.CacheManager; -import net.sf.ehcache.config.Configuration; -import net.sf.ehcache.config.FactoryConfiguration; - -import org.junit.Before; - -import static net.sf.ehcache.distribution.AbstractRMITest.createAsynchronousCache; - -/** - * @author Greg Luck - * @version $Id: ManualRMIPeerProviderIT.java 8870 2014-04-03 20:27:43Z cdennis $ - */ -public class ManualRMIPeerProviderIT extends MulticastRMIPeerProviderIT { - - /** - * {@inheritDoc} - */ - @Override - @Before - public void setUp() throws Exception { - List configurations = new ArrayList(); - configurations.add(new Configuration() - .cacheManagerPeerListenerFactory(new FactoryConfiguration() - .className("net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory") - .properties("hostName=localhost, port=5011, socketTimeoutMillis=2000")) - .cacheManagerPeerProviderFactory(new FactoryConfiguration() - .className("net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory") - .properties("peerDiscovery=manual,rmiUrls=//localhost:5012/asynchronousCache|//localhost:5013/asynchronousCache")) - .cache(createAsynchronousCache().name("asynchronousCache")) - .name("ManualRMIPeerProviderTest-1")); - - configurations.add(new Configuration() - .cacheManagerPeerListenerFactory(new FactoryConfiguration() - .className("net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory") - .properties("hostName=localhost, port=5012, socketTimeoutMillis=2000")) - .cacheManagerPeerProviderFactory(new FactoryConfiguration() - .className("net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory") - .properties("peerDiscovery=manual,rmiUrls=//localhost:5011/asynchronousCache|//localhost:5013/asynchronousCache")) - .cache(createAsynchronousCache().name("asynchronousCache")) - .name("ManualRMIPeerProviderTest-2")); - - configurations.add(new Configuration() - .cacheManagerPeerListenerFactory(new FactoryConfiguration() - .className("net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory") - .properties("hostName=localhost, port=5013, socketTimeoutMillis=2000")) - .cacheManagerPeerProviderFactory(new FactoryConfiguration() - .className("net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory") - .properties("peerDiscovery=manual")) - .cache(createAsynchronousCache().name("asynchronousCache")) - .name("ManualRMIPeerProviderTest-3")); - - List managers = startupManagers(configurations); - manager1 = managers.get(0); - manager2 = managers.get(1); - manager3 = managers.get(2); - - /* manager3 has an empty manual configuration, which is topped up by adding manual entries. - * The sampleCache1 from manager3 is added to the rmiUrls list for manager1 and manager2 - */ - CacheManagerPeerProvider peerProvider = manager3.getCacheManagerPeerProvider("RMI"); - peerProvider.registerPeer("//localhost:5011/asynchronousCache"); - peerProvider.registerPeer("//localhost:5012/asynchronousCache"); - - //Allow cluster setup - waitForClusterMembership(10, TimeUnit.SECONDS, manager1, manager2, manager3); - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/bulkops/BulkOpsGenericSanityTest.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/bulkops/BulkOpsGenericSanityTest.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/src/test/java/org/terracotta/modules/ehcache/bulkops/BulkOpsGenericSanityTest.java (revision 0) @@ -1,133 +0,0 @@ -/* - * All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved. - */ -package org.terracotta.modules.ehcache.bulkops; - -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.toolkit.Toolkit; -import org.terracotta.toolkit.concurrent.ToolkitBarrier; - -import com.tc.test.config.model.TestConfig; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.BrokenBarrierException; - -public class BulkOpsGenericSanityTest extends AbstractCacheTestBase { - private static final int NODE_COUNT = 2; - - public BulkOpsGenericSanityTest(TestConfig testConfig) { - super(testConfig, BulkOpsGenericSanityTestClient.class, BulkOpsGenericSanityTestClient.class); - } - - public static class BulkOpsGenericSanityTestClient extends ClientBase { - private ToolkitBarrier barrier; - - public BulkOpsGenericSanityTestClient(String[] args) { - super(args); - } - - public static void main(String[] args) { - new BulkOpsGenericSanityTestClient(args).run(); - } - - @Override - protected void runTest(Cache cache, Toolkit clusteringToolkit) throws Throwable { - this.barrier = clusteringToolkit.getBarrier("test-barrier", NODE_COUNT); - - Cache dcv2StrongIdentity = createCache("dcv2StrongIdentity", cacheManager, Consistency.STRONG); - testBulkOpsSanity(dcv2StrongIdentity); - } - - private void testBulkOpsSanity(Cache cache) throws InterruptedException, BrokenBarrierException { - int index = barrier.await(); - int numOfElements = 10; - Set elements = new HashSet(); - for (int i = 0; i < numOfElements; i++) { - elements.add(new Element("key" + i, "val" + i, i)); - } - if (index == 0) { - cache.putAll(elements); - } - - barrier.await(); - while (cache.getSize() != numOfElements) { - Thread.sleep(1000); - } - Assert.assertEquals(numOfElements, cache.getSize()); - - Map rv = cache.getAll(Arrays.asList("key0", "key1", "key2", "key3", "key4", "key5", "key6", - "key7", "key8", "key9")); - Assert.assertEquals(numOfElements, rv.size()); - - for (Element element : rv.values()) { - Assert.assertTrue(elements.contains(element)); - } - - Collection values = rv.values(); - for (Element element : elements) { - Assert.assertTrue(values.contains(element)); - } - - rv = cache.getAll(Arrays.asList("key0", "key2", "key4", "key6", "key8")); - Assert.assertEquals(5, rv.size()); - - for (Element element : rv.values()) { - Assert.assertTrue(elements.contains(element)); - } - - System.out.println("verified by client now waiting for others..."); - barrier.await(); - - if (index != 0) { - cache.removeAll(Arrays.asList("key0", "key2", "key4", "key6", "key8")); - System.out.println("removed 5 keys from " + cache.getName() + ". Now waiting for others..."); - } - barrier.await(); - while (cache.getSize() != numOfElements - 5) { - Thread.sleep(1000); - } - - Assert.assertEquals(numOfElements - 5, cache.getSize()); - System.out.println("now checking removed in " + cache.getName() + " by client"); - - for (int i = 0; i < numOfElements; i++) { - if (i % 2 == 0) { - Assert.assertNull(cache.get("key" + i)); - } else { - Assert.assertNotNull("key" + i); - } - } - System.out.println("client, I am done with " + cache.getName()); - } - - private Cache createCache(String cacheName, CacheManager cm, Consistency consistency) { - CacheConfiguration cacheConfiguration = new CacheConfiguration(); - cacheConfiguration.setName(cacheName); - cacheConfiguration.setMaxElementsInMemory(100000); - cacheConfiguration.setEternal(false); - cacheConfiguration.setTimeToLiveSeconds(100000); - cacheConfiguration.setTimeToIdleSeconds(200000); - - TerracottaConfiguration tcConfiguration = new TerracottaConfiguration(); - tcConfiguration.setConsistency(consistency); - cacheConfiguration.addTerracotta(tcConfiguration); - - Cache cache = new Cache(cacheConfiguration); - cm.addCache(cache); - return cache; - } - } -} Index: rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/src/main/java/net/sf/ehcache/constructs/scheduledrefresh/ScheduledRefreshRAMJobStoreFactory.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/src/main/java/net/sf/ehcache/constructs/scheduledrefresh/ScheduledRefreshRAMJobStoreFactory.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/ehcache-scheduled-refresh/src/main/java/net/sf/ehcache/constructs/scheduledrefresh/ScheduledRefreshRAMJobStoreFactory.java (revision 0) @@ -1,43 +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 java.util.Properties; - -import net.sf.ehcache.Ehcache; - -import org.quartz.impl.StdSchedulerFactory; -import org.quartz.simpl.RAMJobStore; - -/** - * A factory for creating RAM job stores. - * - * @author cschanck - */ -public class ScheduledRefreshRAMJobStoreFactory implements ScheduledRefreshJobStorePropertiesFactory { - - /** - * Return the necessary job store proprties to initialize a RAM job store in - * Quartz. - */ - @Override - public Properties jobStoreProperties(Ehcache underlyingCache, ScheduledRefreshConfiguration config) { - Properties p = new Properties(); - p.put(StdSchedulerFactory.PROP_JOB_STORE_CLASS, RAMJobStore.class.getName()); - return p; - } - -} Index: rctags/ehcache-2.10.9.0.373/management-ehcache-v1/src/main/java/net/sf/ehcache/management/resource/services/CacheStatisticSamplesResourceServiceImpl.java =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/management-ehcache-v1/src/main/java/net/sf/ehcache/management/resource/services/CacheStatisticSamplesResourceServiceImpl.java (revision 11344) +++ rctags/ehcache-2.10.9.0.373/management-ehcache-v1/src/main/java/net/sf/ehcache/management/resource/services/CacheStatisticSamplesResourceServiceImpl.java (revision 0) @@ -1,75 +0,0 @@ -/* - * All content copyright (c) 2003-2012 Terracotta, Inc., except as may otherwise be noted in a separate copyright - * notice. All rights reserved. - */ -package net.sf.ehcache.management.resource.services; - -import net.sf.ehcache.management.resource.CacheStatisticSampleEntity; -import net.sf.ehcache.management.service.EntityResourceFactory; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.terracotta.management.ServiceExecutionException; -import org.terracotta.management.ServiceLocator; -import org.terracotta.management.resource.exceptions.ResourceRuntimeException; -import org.terracotta.management.resource.services.validator.RequestValidator; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -/** - * @author brandony - */ -@Path("/agents/cacheManagers/caches/statistics/samples") -public final class CacheStatisticSamplesResourceServiceImpl { - private static final Logger LOG = LoggerFactory.getLogger(CacheStatisticSamplesResourceServiceImpl.class); - private final EntityResourceFactory entityResourceFactory; - - private final RequestValidator validator; - - public CacheStatisticSamplesResourceServiceImpl() { - this.entityResourceFactory = ServiceLocator.locate(EntityResourceFactory.class); - this.validator = ServiceLocator.locate(RequestValidator.class); - } - - /** - * - * @param info - * @return - */ - @GET - @Produces(MediaType.APPLICATION_JSON) - public Collection getCacheStatisticSamples(@Context UriInfo info) { - LOG.debug(String.format("Invoking CacheStatisticSamplesResourceServiceImpl.getCacheStatisticSamples: %s", - info.getRequestUri())); - - validator.validateSafe(info); - - String cacheManagerNames = info.getPathSegments().get(1).getMatrixParameters().getFirst("names"); - Set cmNames = cacheManagerNames == null ? null : new HashSet( - Arrays.asList(cacheManagerNames.split(","))); - - String cacheNames = info.getPathSegments().get(2).getMatrixParameters().getFirst("names"); - Set cNames = cacheNames == null ? null : new HashSet(Arrays.asList(cacheNames.split(","))); - - String sampleNames = info.getPathSegments().get(4).getMatrixParameters().getFirst("names"); - Set sNames = sampleNames == null ? null : new HashSet(Arrays.asList(sampleNames.split(","))); - - try { - return entityResourceFactory.createCacheStatisticSampleEntity(cmNames, cNames, sNames); - } catch (ServiceExecutionException e) { - throw new ResourceRuntimeException("Failed to get cache statistics sample", e, - Response.Status.BAD_REQUEST.getStatusCode()); - } - } -} Index: rctags/ehcache-2.10.9.0.373/system-tests/.settings/org.eclipse.jdt.ui.prefs =================================================================== diff -u -N --- rctags/ehcache-2.10.9.0.373/system-tests/.settings/org.eclipse.jdt.ui.prefs (revision 11344) +++ rctags/ehcache-2.10.9.0.373/system-tests/.settings/org.eclipse.jdt.ui.prefs (revision 0) @@ -1,72 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=false -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=