You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by rm...@apache.org on 2014/05/01 21:39:53 UTC
svn commit: r1591754 [1/2] - in
/geronimo/specs/trunk/geronimo-jcache_1.0_spec: ./ src/ src/main/
src/main/java/ src/main/java/javax/ src/main/java/javax/cache/
src/main/java/javax/cache/annotation/
src/main/java/javax/cache/configuration/ src/main/jav...
Author: rmannibucau
Date: Thu May 1 19:39:52 2014
New Revision: 1591754
URL: http://svn.apache.org/r1591754
Log:
GERONIMO-6518 jcache api jar
Added:
geronimo/specs/trunk/geronimo-jcache_1.0_spec/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/LICENSE
geronimo/specs/trunk/geronimo-jcache_1.0_spec/NOTICE
geronimo/specs/trunk/geronimo-jcache_1.0_spec/pom.xml
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Cache.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheException.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheManager.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Caching.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheDefaults.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationContext.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationParameter.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKey.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyGenerator.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyInvocationContext.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheMethodDetails.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CachePut.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemove.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemoveAll.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolver.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolverFactory.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResult.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheValue.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/GeneratedCacheKey.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CacheEntryListenerConfiguration.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CompleteConfiguration.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Configuration.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Factory.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/FactoryBuilder.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableCacheEntryListenerConfiguration.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableConfiguration.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/OptionalFeature.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryCreatedListener.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEvent.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEventFilter.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryExpiredListener.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListener.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListenerException.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryRemovedListener.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryUpdatedListener.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/EventType.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/AccessedExpiryPolicy.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/CreatedExpiryPolicy.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/Duration.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/EternalExpiryPolicy.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ExpiryPolicy.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ModifiedExpiryPolicy.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/TouchedExpiryPolicy.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoader.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoaderException.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriter.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriterException.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListener.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListenerFuture.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheMXBean.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheStatisticsMXBean.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessor.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorException.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorResult.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/MutableEntry.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/spi/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/spi/CachingProvider.java
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/resources/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/test/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/test/java/
geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/test/resources/
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/LICENSE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/LICENSE?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/LICENSE (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/LICENSE Thu May 1 19:39:52 2014
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/NOTICE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/NOTICE?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/NOTICE (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/NOTICE Thu May 1 19:39:52 2014
@@ -0,0 +1,6 @@
+Apache Geronimo JSR-107 JCache Spec API
+Copyright 2009-2014 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/pom.xml?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/pom.xml (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/pom.xml Thu May 1 19:39:52 2014
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.geronimo.genesis</groupId>
+ <artifactId>genesis-java5-flava</artifactId>
+ <version>2.0</version>
+ <relativePath />
+ </parent>
+
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jcache_1.0_spec</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Geronimo JCache Spec 1.0</name>
+ <version>1.0-SNAPSHOT</version>
+
+ <description>Apache Geronimo implementation of the JSR-107</description>
+ <url>http://geronimo.apache.org/maven/${siteId}/${project.version}</url>
+
+ <distributionManagement>
+ <site>
+ <id>apache-website</id>
+ <url>${site.deploy.url}/maven/${siteId}/${project.version}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <siteId>specs/${project.artifactId}</siteId>
+ </properties>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-jcache_1.0_spec/</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-jcache_1.0_spec/
+ </developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/geronimo/specs/trunk/geronimo-jcache_1.0_spec/</url>
+ </scm>
+
+ <!-- added so the build can find staged depends -->
+ <repositories>
+ <repository>
+ <id>apache.nexus.staging</id>
+ <name>Apache Staging Repository</name>
+ <layout>default</layout>
+ <url>https://repository.apache.org/content/repositories/staging/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <target>1.6</target>
+ <source>1.6</source>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <configuration>
+ <instructions>
+ <Export-Package>
+ javax.cache*;version=1.0
+ </Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Cache.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Cache.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Cache.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Cache.java Thu May 1 19:39:52 2014
@@ -0,0 +1,141 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache;
+
+
+import javax.cache.configuration.CacheEntryListenerConfiguration;
+import javax.cache.configuration.Configuration;
+import javax.cache.integration.CompletionListener;
+import javax.cache.processor.EntryProcessor;
+import javax.cache.processor.EntryProcessorException;
+import javax.cache.processor.EntryProcessorResult;
+import java.io.Closeable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+
+public interface Cache<K, V> extends Iterable<Cache.Entry<K, V>>, Closeable {
+
+ V get(K key);
+
+
+ Map<K, V> getAll(Set<? extends K> keys);
+
+
+ boolean containsKey(K key);
+
+
+ void loadAll(Set<? extends K> keys, boolean replaceExistingValues,
+ CompletionListener completionListener);
+
+
+ void put(K key, V value);
+
+
+ V getAndPut(K key, V value);
+
+
+ void putAll(java.util.Map<? extends K, ? extends V> map);
+
+
+ boolean putIfAbsent(K key, V value);
+
+
+ boolean remove(K key);
+
+
+ boolean remove(K key, V oldValue);
+
+
+ V getAndRemove(K key);
+
+
+ boolean replace(K key, V oldValue, V newValue);
+
+
+ boolean replace(K key, V value);
+
+
+ V getAndReplace(K key, V value);
+
+
+ void removeAll(Set<? extends K> keys);
+
+
+ void removeAll();
+
+
+ void clear();
+
+
+ <C extends Configuration<K, V>> C getConfiguration(Class<C> clazz);
+
+
+ <T> T invoke(K key,
+ EntryProcessor<K, V, T> entryProcessor,
+ Object... arguments) throws EntryProcessorException;
+
+
+ <T> Map<K, EntryProcessorResult<T>> invokeAll(Set<? extends K> keys,
+ EntryProcessor<K, V, T>
+ entryProcessor,
+ Object... arguments);
+
+
+ String getName();
+
+
+ CacheManager getCacheManager();
+
+
+ void close();
+
+
+ boolean isClosed();
+
+
+ <T> T unwrap(java.lang.Class<T> clazz);
+
+
+ void registerCacheEntryListener(
+ CacheEntryListenerConfiguration<K, V> cacheEntryListenerConfiguration);
+
+
+ void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V>
+ cacheEntryListenerConfiguration);
+
+
+ Iterator<Cache.Entry<K, V>> iterator();
+
+
+ interface Entry<K, V> {
+
+
+ K getKey();
+
+
+ V getValue();
+
+
+ <T> T unwrap(Class<T> clazz);
+ }
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheException.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheException.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheException.java Thu May 1 19:39:52 2014
@@ -0,0 +1,41 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache;
+
+public class CacheException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ public CacheException() {
+ super();
+ }
+
+ public CacheException(String message) {
+ super(message);
+ }
+
+ public CacheException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public CacheException(Throwable cause) {
+ super(cause);
+ }
+
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheManager.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheManager.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheManager.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/CacheManager.java Thu May 1 19:39:52 2014
@@ -0,0 +1,72 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache;
+
+import javax.cache.configuration.Configuration;
+import javax.cache.spi.CachingProvider;
+import java.io.Closeable;
+import java.net.URI;
+import java.util.Properties;
+
+public interface CacheManager extends Closeable {
+ CachingProvider getCachingProvider();
+
+
+ URI getURI();
+
+
+ ClassLoader getClassLoader();
+
+
+ Properties getProperties();
+
+
+ <K, V, C extends Configuration<K, V>> Cache<K, V> createCache(String cacheName,
+ C configuration)
+ throws IllegalArgumentException;
+
+
+ <K, V> Cache<K, V> getCache(String cacheName, Class<K> keyType,
+ Class<V> valueType);
+
+
+ <K, V> Cache<K, V> getCache(String cacheName);
+
+
+ Iterable<String> getCacheNames();
+
+
+ void destroyCache(String cacheName);
+
+
+ void enableManagement(String cacheName, boolean enabled);
+
+
+ void enableStatistics(String cacheName, boolean enabled);
+
+
+ void close();
+
+
+ boolean isClosed();
+
+
+ <T> T unwrap(java.lang.Class<T> clazz);
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Caching.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Caching.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Caching.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/Caching.java Thu May 1 19:39:52 2014
@@ -0,0 +1,191 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache;
+
+import javax.cache.spi.CachingProvider;
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.ServiceLoader;
+import java.util.WeakHashMap;
+
+public final class Caching {
+ public static final String JAVAX_CACHE_CACHING_PROVIDER = "javax.cache.spi.CachingProvider";
+
+ private static final CachingProviderRegistry CACHING_PROVIDERS = new CachingProviderRegistry();
+
+ private Caching() {
+ // no-op
+ }
+
+ public static ClassLoader getDefaultClassLoader() {
+ return CACHING_PROVIDERS.getDefaultClassLoader();
+ }
+
+ public static void setDefaultClassLoader(ClassLoader classLoader) {
+ CACHING_PROVIDERS.setDefaultClassLoader(classLoader);
+ }
+
+ public static CachingProvider getCachingProvider() {
+ return CACHING_PROVIDERS.getCachingProvider();
+ }
+
+ public static CachingProvider getCachingProvider(ClassLoader classLoader) {
+ return CACHING_PROVIDERS.getCachingProvider(classLoader);
+ }
+
+ public static Iterable<CachingProvider> getCachingProviders() {
+ return CACHING_PROVIDERS.getCachingProviders();
+ }
+
+ public static Iterable<CachingProvider> getCachingProviders(ClassLoader classLoader) {
+ return CACHING_PROVIDERS.getCachingProviders(classLoader);
+ }
+
+ public static CachingProvider getCachingProvider(String fullyQualifiedClassName) {
+ return CACHING_PROVIDERS.getCachingProvider(fullyQualifiedClassName);
+ }
+
+ public static CachingProvider getCachingProvider(String fullyQualifiedClassName, ClassLoader classLoader) {
+ return CACHING_PROVIDERS.getCachingProvider(fullyQualifiedClassName, classLoader);
+ }
+
+ public static <K, V> Cache<K, V> getCache(String cacheName, Class<K> keyType, Class<V> valueType) {
+ return getCachingProvider().getCacheManager().getCache(cacheName, keyType, valueType);
+ }
+
+
+ // logic taken from RI API
+ private static class CachingProviderRegistry {
+ private WeakHashMap<ClassLoader, LinkedHashMap<String, CachingProvider>> cachingProviders;
+
+ private volatile ClassLoader classLoader;
+
+ public CachingProviderRegistry() {
+ this.cachingProviders = new WeakHashMap<ClassLoader, LinkedHashMap<String, CachingProvider>>();
+ this.classLoader = null;
+ }
+
+ public ClassLoader getDefaultClassLoader() {
+ ClassLoader loader = classLoader;
+ return loader == null ? Thread.currentThread().getContextClassLoader() : loader;
+ }
+
+ public void setDefaultClassLoader(ClassLoader classLoader) {
+ this.classLoader = classLoader;
+ }
+
+ public CachingProvider getCachingProvider() {
+ return getCachingProvider(getDefaultClassLoader());
+ }
+
+ public CachingProvider getCachingProvider(ClassLoader classLoader) {
+ Iterator<CachingProvider> iterator = getCachingProviders(classLoader).iterator();
+ if (iterator.hasNext()) {
+ CachingProvider provider = iterator.next();
+ if (iterator.hasNext()) {
+ throw new CacheException("Multiple CachingProviders have been configured when only a single CachingProvider is expected");
+ } else {
+ return provider;
+ }
+ }
+ throw new CacheException("No CachingProviders have been configured");
+ }
+
+ public Iterable<CachingProvider> getCachingProviders() {
+ return getCachingProviders(getDefaultClassLoader());
+ }
+
+ public synchronized Iterable<CachingProvider> getCachingProviders(ClassLoader classLoader) {
+ final ClassLoader serviceClassLoader = classLoader == null ? getDefaultClassLoader() : classLoader;
+ LinkedHashMap<String, CachingProvider> providers = cachingProviders.get(serviceClassLoader);
+ if (providers == null) {
+ if (System.getProperties().containsKey(JAVAX_CACHE_CACHING_PROVIDER)) {
+ final String className = System.getProperty(JAVAX_CACHE_CACHING_PROVIDER);
+ providers = new LinkedHashMap<String, CachingProvider>();
+ providers.put(className, loadCachingProvider(className, serviceClassLoader));
+
+ } else {
+ providers = AccessController.doPrivileged(new PrivilegedAction<LinkedHashMap<String, CachingProvider>>() {
+ public LinkedHashMap<String, CachingProvider> run() {
+ final LinkedHashMap<String, CachingProvider> result = new LinkedHashMap<String, CachingProvider>();
+ try {
+ final Class<?> clazz = Class.forName("org.apache.geronimo.osgi.locator.ProviderLocator");
+ final Method getServices = clazz.getDeclaredMethod("getServices", String.class, Class.class, ClassLoader.class);
+ for (final CachingProvider provider : (List<CachingProvider>) getServices.invoke(null, CachingProvider.class.getName(), CachingProvider.class, serviceClassLoader)) {
+ result.put(provider.getClass().getName(), provider);
+ }
+ } catch (final Throwable e) {
+ // locator not available, try normal mode
+ }
+ final ServiceLoader<CachingProvider> serviceLoader = ServiceLoader.load(CachingProvider.class, serviceClassLoader);
+ for (final CachingProvider provider : serviceLoader) {
+ result.put(provider.getClass().getName(), provider);
+ }
+ return result;
+ }
+ });
+
+ }
+ cachingProviders.put(serviceClassLoader, providers);
+ }
+ return providers.values();
+ }
+
+ public CachingProvider getCachingProvider(String fullyQualifiedClassName) {
+ return getCachingProvider(fullyQualifiedClassName, getDefaultClassLoader());
+ }
+
+ protected CachingProvider loadCachingProvider(String fullyQualifiedClassName, ClassLoader classLoader) throws CacheException {
+ synchronized (classLoader) {
+ try {
+ Class<?> clazz = classLoader.loadClass(fullyQualifiedClassName);
+ if (CachingProvider.class.isAssignableFrom(clazz)) {
+ return ((Class<CachingProvider>) clazz).newInstance();
+ } else {
+ throw new CacheException("The specified class [" + fullyQualifiedClassName + "] is not a CachingProvider");
+ }
+ } catch (Exception e) {
+ throw new CacheException("Failed to load the CachingProvider [" + fullyQualifiedClassName + "]", e);
+ }
+ }
+ }
+
+ public synchronized CachingProvider getCachingProvider(String fullyQualifiedClassName, ClassLoader classLoader) {
+ ClassLoader serviceClassLoader = classLoader == null ? getDefaultClassLoader() : classLoader;
+ LinkedHashMap<String, CachingProvider> providers = cachingProviders.get(serviceClassLoader);
+ if (providers == null) {
+ getCachingProviders(serviceClassLoader);
+ providers = cachingProviders.get(serviceClassLoader);
+ }
+
+ CachingProvider provider = providers.get(fullyQualifiedClassName);
+ if (provider == null) {
+ provider = loadCachingProvider(fullyQualifiedClassName, serviceClassLoader);
+ providers.put(fullyQualifiedClassName, provider);
+ }
+
+ return provider;
+ }
+ }
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheDefaults.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheDefaults.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheDefaults.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheDefaults.java Thu May 1 19:39:52 2014
@@ -0,0 +1,37 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CacheDefaults {
+ @Nonbinding String cacheName() default "";
+
+ @Nonbinding Class<? extends CacheResolverFactory> cacheResolverFactory() default CacheResolverFactory.class;
+
+ @Nonbinding Class<? extends CacheKeyGenerator> cacheKeyGenerator() default CacheKeyGenerator.class;
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationContext.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationContext.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationContext.java Thu May 1 19:39:52 2014
@@ -0,0 +1,32 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import java.lang.annotation.Annotation;
+
+public interface CacheInvocationContext<A extends Annotation> extends CacheMethodDetails<A> {
+
+ Object getTarget();
+
+ CacheInvocationParameter[] getAllParameters();
+
+ <T> T unwrap(java.lang.Class<T> cls);
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationParameter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationParameter.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationParameter.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheInvocationParameter.java Thu May 1 19:39:52 2014
@@ -0,0 +1,36 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+public interface CacheInvocationParameter {
+ Class<?> getRawType();
+
+ Object getValue();
+
+ Set<Annotation> getAnnotations();
+
+ int getParameterPosition();
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKey.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKey.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKey.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKey.java Thu May 1 19:39:52 2014
@@ -0,0 +1,33 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CacheKey {
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyGenerator.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyGenerator.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyGenerator.java Thu May 1 19:39:52 2014
@@ -0,0 +1,29 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import java.lang.annotation.Annotation;
+
+public interface CacheKeyGenerator {
+ GeneratedCacheKey generateCacheKey(CacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext);
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyInvocationContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyInvocationContext.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyInvocationContext.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheKeyInvocationContext.java Thu May 1 19:39:52 2014
@@ -0,0 +1,28 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import java.lang.annotation.Annotation;
+
+public interface CacheKeyInvocationContext<A extends Annotation> extends CacheInvocationContext<A> {
+ CacheInvocationParameter[] getKeyParameters();
+
+ CacheInvocationParameter getValueParameter();
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheMethodDetails.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheMethodDetails.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheMethodDetails.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheMethodDetails.java Thu May 1 19:39:52 2014
@@ -0,0 +1,36 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+public interface CacheMethodDetails<A extends Annotation> {
+ Method getMethod();
+
+ Set<Annotation> getAnnotations();
+
+ A getCacheAnnotation();
+
+ String getCacheName();
+}
+
+
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CachePut.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CachePut.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CachePut.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CachePut.java Thu May 1 19:39:52 2014
@@ -0,0 +1,42 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CachePut {
+ @Nonbinding String cacheName() default "";
+
+ @Nonbinding boolean afterInvocation() default true;
+
+ @Nonbinding Class<? extends CacheResolverFactory> cacheResolverFactory() default CacheResolverFactory.class;
+
+ @Nonbinding Class<? extends CacheKeyGenerator> cacheKeyGenerator() default CacheKeyGenerator.class;
+
+ @Nonbinding Class<? extends Throwable>[] cacheFor() default {};
+
+ @Nonbinding Class<? extends Throwable>[] noCacheFor() default {};
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemove.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemove.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemove.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemove.java Thu May 1 19:39:52 2014
@@ -0,0 +1,42 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CacheRemove {
+ @Nonbinding String cacheName() default "";
+
+ @Nonbinding boolean afterInvocation() default true;
+
+ @Nonbinding Class<? extends CacheResolverFactory> cacheResolverFactory() default CacheResolverFactory.class;
+
+ @Nonbinding Class<? extends CacheKeyGenerator> cacheKeyGenerator() default CacheKeyGenerator.class;
+
+ @Nonbinding Class<? extends Throwable>[] evictFor() default {};
+
+ @Nonbinding Class<? extends Throwable>[] noEvictFor() default {};
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemoveAll.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemoveAll.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemoveAll.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheRemoveAll.java Thu May 1 19:39:52 2014
@@ -0,0 +1,40 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CacheRemoveAll {
+ @Nonbinding String cacheName() default "";
+
+ @Nonbinding boolean afterInvocation() default true;
+
+ @Nonbinding Class<? extends CacheResolverFactory> cacheResolverFactory() default CacheResolverFactory.class;
+
+ @Nonbinding Class<? extends Throwable>[] evictFor() default {};
+
+ @Nonbinding Class<? extends Throwable>[] noEvictFor() default {};
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolver.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolver.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolver.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolver.java Thu May 1 19:39:52 2014
@@ -0,0 +1,27 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import javax.cache.Cache;
+import java.lang.annotation.Annotation;
+
+public interface CacheResolver {
+ <K, V> Cache<K, V> resolveCache(CacheInvocationContext<? extends Annotation> cacheInvocationContext);
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolverFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolverFactory.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolverFactory.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResolverFactory.java Thu May 1 19:39:52 2014
@@ -0,0 +1,28 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import java.lang.annotation.Annotation;
+
+public interface CacheResolverFactory {
+ CacheResolver getCacheResolver(CacheMethodDetails<? extends Annotation> cacheMethodDetails);
+
+ CacheResolver getExceptionCacheResolver(CacheMethodDetails<CacheResult> cacheMethodDetails);
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResult.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResult.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResult.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheResult.java Thu May 1 19:39:52 2014
@@ -0,0 +1,45 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import javax.enterprise.util.Nonbinding;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CacheResult {
+ @Nonbinding String cacheName() default "";
+
+ @Nonbinding boolean skipGet() default false;
+
+ @Nonbinding Class<? extends CacheResolverFactory> cacheResolverFactory() default CacheResolverFactory.class;
+
+ @Nonbinding Class<? extends CacheKeyGenerator> cacheKeyGenerator() default CacheKeyGenerator.class;
+
+ @Nonbinding String exceptionCacheName() default "";
+
+ @Nonbinding Class<? extends Throwable>[] cachedExceptions() default {};
+
+ @Nonbinding Class<? extends Throwable>[] nonCachedExceptions() default {};
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheValue.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheValue.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheValue.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/CacheValue.java Thu May 1 19:39:52 2014
@@ -0,0 +1,31 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CacheValue {
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/GeneratedCacheKey.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/GeneratedCacheKey.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/GeneratedCacheKey.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/annotation/GeneratedCacheKey.java Thu May 1 19:39:52 2014
@@ -0,0 +1,30 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.annotation;
+
+import java.io.Serializable;
+
+public interface GeneratedCacheKey extends Serializable {
+ @Override
+ int hashCode();
+
+ @Override
+ boolean equals(Object object);
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CacheEntryListenerConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CacheEntryListenerConfiguration.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CacheEntryListenerConfiguration.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CacheEntryListenerConfiguration.java Thu May 1 19:39:52 2014
@@ -0,0 +1,34 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.configuration;
+
+import javax.cache.event.CacheEntryEventFilter;
+import javax.cache.event.CacheEntryListener;
+import java.io.Serializable;
+
+public interface CacheEntryListenerConfiguration<K, V> extends Serializable {
+ Factory<CacheEntryListener<? super K, ? super V>> getCacheEntryListenerFactory();
+
+ boolean isOldValueRequired();
+
+ Factory<CacheEntryEventFilter<? super K, ? super V>> getCacheEntryEventFilterFactory();
+
+ boolean isSynchronous();
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CompleteConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CompleteConfiguration.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CompleteConfiguration.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/CompleteConfiguration.java Thu May 1 19:39:52 2014
@@ -0,0 +1,43 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.configuration;
+
+import javax.cache.expiry.ExpiryPolicy;
+import javax.cache.integration.CacheLoader;
+import javax.cache.integration.CacheWriter;
+import java.io.Serializable;
+
+public interface CompleteConfiguration<K, V> extends Configuration<K, V>, Serializable {
+ boolean isReadThrough();
+
+ boolean isWriteThrough();
+
+ boolean isStatisticsEnabled();
+
+ boolean isManagementEnabled();
+
+ Iterable<CacheEntryListenerConfiguration<K, V>> getCacheEntryListenerConfigurations();
+
+ Factory<CacheLoader<K, V>> getCacheLoaderFactory();
+
+ Factory<CacheWriter<? super K, ? super V>> getCacheWriterFactory();
+
+ Factory<ExpiryPolicy> getExpiryPolicyFactory();
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Configuration.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Configuration.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Configuration.java Thu May 1 19:39:52 2014
@@ -0,0 +1,30 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.configuration;
+
+import java.io.Serializable;
+
+public interface Configuration<K, V> extends Serializable {
+ Class<K> getKeyType();
+
+ Class<V> getValueType();
+
+ boolean isStoreByValue();
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Factory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Factory.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Factory.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/Factory.java Thu May 1 19:39:52 2014
@@ -0,0 +1,26 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.configuration;
+
+import java.io.Serializable;
+
+public interface Factory<T> extends Serializable {
+ T create();
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/FactoryBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/FactoryBuilder.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/FactoryBuilder.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/FactoryBuilder.java Thu May 1 19:39:52 2014
@@ -0,0 +1,111 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.configuration;
+
+import java.io.Serializable;
+
+public final class FactoryBuilder {
+ private FactoryBuilder() {
+ // no-op
+ }
+
+ public static <T> Factory<T> factoryOf(Class<T> clazz) {
+ return new ClassFactory<T>(clazz);
+ }
+
+ public static <T> Factory<T> factoryOf(String className) {
+ return new ClassFactory<T>(className);
+ }
+
+ public static <T extends Serializable> Factory<T> factoryOf(T instance) {
+ return new SingletonFactory<T>(instance);
+ }
+
+ public static class ClassFactory<T> implements Factory<T>, Serializable {
+ public static final long serialVersionUID = 201401L;
+
+ private String className;
+
+ public ClassFactory(Class<T> clazz) {
+ this.className = clazz.getName();
+ }
+
+ public ClassFactory(String className) {
+ this.className = className;
+ }
+
+
+ public T create() {
+ try {
+ final ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ return (T) loader.loadClass(className).newInstance();
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to create an instance of " + className, e);
+ }
+ }
+
+ @Override
+ public boolean equals(final Object other) {
+ if (this == other) return true;
+ if (other == null || getClass() != other.getClass()) return false;
+
+ final ClassFactory that = ClassFactory.class.cast(other);
+ return className.equals(that.className);
+
+ }
+
+ @Override
+ public int hashCode() {
+ return className.hashCode();
+ }
+ }
+
+ public static class SingletonFactory<T> implements Factory<T>, Serializable {
+
+ public static final long serialVersionUID = 201402;
+
+ private T instance;
+
+ public SingletonFactory(T instance) {
+ this.instance = instance;
+ }
+
+
+ public T create() {
+ return instance;
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ if (other == null || getClass() != other.getClass()) return false;
+
+ final SingletonFactory that = SingletonFactory.class.cast(other);
+
+ return instance.equals(that.instance);
+
+ }
+
+ @Override
+ public int hashCode() {
+ return instance.hashCode();
+ }
+ }
+}
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableCacheEntryListenerConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableCacheEntryListenerConfiguration.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableCacheEntryListenerConfiguration.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableCacheEntryListenerConfiguration.java Thu May 1 19:39:52 2014
@@ -0,0 +1,140 @@
+/*
+ *
+ * Apache Geronimo JCache Spec 1.0
+ *
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ *
+ * 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 javax.cache.configuration;
+
+import javax.cache.event.CacheEntryEventFilter;
+import javax.cache.event.CacheEntryListener;
+
+public class MutableCacheEntryListenerConfiguration<K, V> implements CacheEntryListenerConfiguration<K, V> {
+ public static final long serialVersionUID = 201403L;
+
+ private Factory<CacheEntryListener<? super K, ? super V>> listenerFactory;
+
+ private Factory<CacheEntryEventFilter<? super K, ? super V>> filterFactory;
+
+ private boolean isOldValueRequired;
+
+
+ private boolean isSynchronous;
+
+ public MutableCacheEntryListenerConfiguration(final CacheEntryListenerConfiguration<K, V> configuration) {
+ this.listenerFactory = configuration.getCacheEntryListenerFactory();
+ this.filterFactory = configuration.getCacheEntryEventFilterFactory();
+ this.isOldValueRequired = configuration.isOldValueRequired();
+ this.isSynchronous = configuration.isSynchronous();
+ }
+
+ public MutableCacheEntryListenerConfiguration(final Factory<? extends CacheEntryListener<? super K, ? super V>> listenerFactory,
+ final Factory<? extends CacheEntryEventFilter<? super K, ? super V>> filterFactory,
+ final boolean isOldValueRequired,
+ final boolean isSynchronous) {
+ this.listenerFactory = (Factory<CacheEntryListener<? super K, ? super V>>) listenerFactory;
+ this.filterFactory = (Factory<CacheEntryEventFilter<? super K, ? super V>>) filterFactory;
+ this.isOldValueRequired = isOldValueRequired;
+ this.isSynchronous = isSynchronous;
+ }
+
+
+ public Factory<CacheEntryListener<? super K, ? super V>> getCacheEntryListenerFactory() {
+ return listenerFactory;
+ }
+
+ public MutableCacheEntryListenerConfiguration<K, V> setCacheEntryListenerFactory(final Factory<? extends CacheEntryListener<? super K, ? super V>> listenerFactory) {
+ this.listenerFactory = (Factory<CacheEntryListener<? super K, ? super V>>) listenerFactory;
+ return this;
+ }
+
+
+ public Factory<CacheEntryEventFilter<? super K, ? super V>> getCacheEntryEventFilterFactory() {
+ return filterFactory;
+ }
+
+ public MutableCacheEntryListenerConfiguration<K, V> setCacheEntryEventFilterFactory(final Factory<? extends CacheEntryEventFilter<? super K, ? super V>> filterFactory) {
+ this.filterFactory = (Factory<CacheEntryEventFilter<? super K, ? super V>>) filterFactory;
+ return this;
+ }
+
+
+ public boolean isOldValueRequired() {
+ return isOldValueRequired;
+ }
+
+ public MutableCacheEntryListenerConfiguration<K, V> setOldValueRequired(final boolean isOldValueRequired) {
+ this.isOldValueRequired = isOldValueRequired;
+ return this;
+ }
+
+
+ public boolean isSynchronous() {
+ return isSynchronous;
+ }
+
+ public MutableCacheEntryListenerConfiguration<K, V> setSynchronous(final boolean isSynchronous) {
+ this.isSynchronous = isSynchronous;
+ return this;
+ }
+
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((filterFactory == null) ? 0 : filterFactory.hashCode());
+ result = prime * result + (isOldValueRequired ? 1231 : 1237);
+ result = prime * result + (isSynchronous ? 1231 : 1237);
+ result = prime * result + ((listenerFactory == null) ? 0 : listenerFactory.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(final Object object) {
+ if (this == object) {
+ return true;
+ }
+ if (object == null) {
+ return false;
+ }
+ if (!(object instanceof MutableCacheEntryListenerConfiguration)) {
+ return false;
+ }
+ final MutableCacheEntryListenerConfiguration<?, ?> other = (MutableCacheEntryListenerConfiguration<?, ?>) object;
+ if (filterFactory == null) {
+ if (other.filterFactory != null) {
+ return false;
+ }
+ } else if (!filterFactory.equals(other.filterFactory)) {
+ return false;
+ }
+ if (isOldValueRequired != other.isOldValueRequired) {
+ return false;
+ }
+ if (isSynchronous != other.isSynchronous) {
+ return false;
+ }
+ if (listenerFactory == null) {
+ if (other.listenerFactory != null) {
+ return false;
+ }
+ } else if (!listenerFactory.equals(other.listenerFactory)) {
+ return false;
+ }
+ return true;
+ }
+}