geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1591754 [2/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...
Date Thu, 01 May 2014 19:39:53 GMT
Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableConfiguration.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableConfiguration.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/MutableConfiguration.java Thu May  1 19:39:52 2014
@@ -0,0 +1,300 @@
+/*
+ *
+ * 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.EternalExpiryPolicy;
+import javax.cache.expiry.ExpiryPolicy;
+import javax.cache.integration.CacheLoader;
+import javax.cache.integration.CacheWriter;
+import java.util.HashSet;
+
+public class MutableConfiguration<K, V> implements CompleteConfiguration<K, V> {
+    public static final long serialVersionUID = 201405L;
+
+    protected Class<K> keyType;
+    protected Class<V> valueType;
+    protected HashSet<CacheEntryListenerConfiguration<K, V>> listenerConfigurations;
+    protected Factory<CacheLoader<K, V>> cacheLoaderFactory;
+    protected Factory<CacheWriter<? super K, ? super V>> cacheWriterFactory;
+    protected Factory<ExpiryPolicy> expiryPolicyFactory;
+    protected boolean isReadThrough;
+    protected boolean isWriteThrough;
+    protected boolean isStatisticsEnabled;
+    protected boolean isStoreByValue;
+    protected boolean isManagementEnabled;
+
+    public MutableConfiguration() {
+        this.keyType = (Class<K>) Object.class;
+        this.valueType = (Class<V>) Object.class;
+        this.listenerConfigurations = new HashSet<CacheEntryListenerConfiguration<K, V>>();
+        this.cacheLoaderFactory = null;
+        this.cacheWriterFactory = null;
+        this.expiryPolicyFactory = EternalExpiryPolicy.factoryOf();
+        this.isReadThrough = false;
+        this.isWriteThrough = false;
+        this.isStatisticsEnabled = false;
+        this.isStoreByValue = true;
+        this.isManagementEnabled = false;
+    }
+
+    public MutableConfiguration(CompleteConfiguration<K, V> configuration) {
+
+        this.keyType = configuration.getKeyType();
+        this.valueType = configuration.getValueType();
+
+        listenerConfigurations = new HashSet<CacheEntryListenerConfiguration<K, V>>();
+        for (final CacheEntryListenerConfiguration<K, V> definition : configuration.getCacheEntryListenerConfigurations()) {
+            addCacheEntryListenerConfiguration(definition);
+        }
+
+        this.cacheLoaderFactory = configuration.getCacheLoaderFactory();
+        this.cacheWriterFactory = configuration.getCacheWriterFactory();
+
+        if (configuration.getExpiryPolicyFactory() == null) {
+            this.expiryPolicyFactory = EternalExpiryPolicy.factoryOf();
+        } else {
+            this.expiryPolicyFactory = configuration.getExpiryPolicyFactory();
+        }
+
+        this.isReadThrough = configuration.isReadThrough();
+        this.isWriteThrough = configuration.isWriteThrough();
+
+        this.isStatisticsEnabled = configuration.isStatisticsEnabled();
+
+        this.isStoreByValue = configuration.isStoreByValue();
+
+        this.isManagementEnabled = configuration.isManagementEnabled();
+    }
+
+    @Override
+    public Class<K> getKeyType() {
+        return keyType;
+    }
+
+    @Override
+    public Class<V> getValueType() {
+        return valueType;
+    }
+
+    public MutableConfiguration<K, V> setTypes(final Class<K> keyType, final Class<V> valueType) {
+        if (keyType == null || valueType == null) {
+            throw new NullPointerException("keyType and/or valueType can't be null");
+        } else {
+            this.keyType = keyType;
+            this.valueType = valueType;
+            return this;
+        }
+    }
+
+    @Override
+    public Iterable<CacheEntryListenerConfiguration<K, V>> getCacheEntryListenerConfigurations() {
+        return listenerConfigurations;
+    }
+
+    public MutableConfiguration<K, V> addCacheEntryListenerConfiguration(final CacheEntryListenerConfiguration<K, V> cacheEntryListenerConfiguration) {
+        if (cacheEntryListenerConfiguration == null) {
+            throw new NullPointerException("CacheEntryListenerConfiguration can't be null");
+        }
+
+        boolean alreadyExists = false;
+        for (final CacheEntryListenerConfiguration<? super K, ? super V> c : listenerConfigurations) {
+            if (c.equals(cacheEntryListenerConfiguration)) {
+                alreadyExists = true;
+            }
+        }
+
+        if (!alreadyExists) {
+            this.listenerConfigurations.add(cacheEntryListenerConfiguration);
+        } else {
+            throw new IllegalArgumentException("A CacheEntryListenerConfiguration can " +
+                    "be registered only once");
+        }
+        return this;
+    }
+
+
+    public MutableConfiguration<K, V> removeCacheEntryListenerConfiguration(final CacheEntryListenerConfiguration<K, V> cacheEntryListenerConfiguration) {
+        if (cacheEntryListenerConfiguration == null) {
+            throw new NullPointerException("CacheEntryListenerConfiguration can't be null");
+        }
+        listenerConfigurations.remove(cacheEntryListenerConfiguration);
+        return this;
+    }
+
+    @Override
+    public Factory<CacheLoader<K, V>> getCacheLoaderFactory() {
+        return this.cacheLoaderFactory;
+    }
+
+    public MutableConfiguration<K, V> setCacheLoaderFactory(final Factory<? extends CacheLoader<K, V>> factory) {
+        this.cacheLoaderFactory = (Factory<CacheLoader<K, V>>) factory;
+        return this;
+    }
+
+    @Override
+    public Factory<CacheWriter<? super K, ? super V>> getCacheWriterFactory() {
+        return this.cacheWriterFactory;
+    }
+
+    public MutableConfiguration<K, V> setCacheWriterFactory(final Factory<? extends
+            CacheWriter<? super K, ? super V>> factory) {
+        this.cacheWriterFactory = (Factory<CacheWriter<? super K, ? super V>>) factory;
+        return this;
+    }
+
+    public Factory<ExpiryPolicy> getExpiryPolicyFactory() {
+        return this.expiryPolicyFactory;
+    }
+
+    public MutableConfiguration<K, V> setExpiryPolicyFactory(final Factory<? extends ExpiryPolicy> factory) {
+        if (factory == null) {
+            this.expiryPolicyFactory = EternalExpiryPolicy.factoryOf();
+        } else {
+            this.expiryPolicyFactory = (Factory<ExpiryPolicy>) factory;
+        }
+        return this;
+    }
+
+    @Override
+    public boolean isReadThrough() {
+        return this.isReadThrough;
+    }
+
+    public MutableConfiguration<K, V> setReadThrough(final boolean isReadThrough) {
+        this.isReadThrough = isReadThrough;
+        return this;
+    }
+
+    @Override
+    public boolean isWriteThrough() {
+        return this.isWriteThrough;
+    }
+
+    public MutableConfiguration<K, V> setWriteThrough(final boolean isWriteThrough) {
+        this.isWriteThrough = isWriteThrough;
+        return this;
+    }
+
+    @Override
+    public boolean isStoreByValue() {
+        return this.isStoreByValue;
+    }
+
+    public MutableConfiguration<K, V> setStoreByValue(final boolean isStoreByValue) {
+        this.isStoreByValue = isStoreByValue;
+        return this;
+    }
+
+    @Override
+    public boolean isStatisticsEnabled() {
+        return this.isStatisticsEnabled;
+    }
+
+
+    public MutableConfiguration<K, V> setStatisticsEnabled(final boolean enabled) {
+        this.isStatisticsEnabled = enabled;
+        return this;
+    }
+
+    @Override
+    public boolean isManagementEnabled() {
+        return this.isManagementEnabled;
+    }
+
+    public MutableConfiguration<K, V> setManagementEnabled(final boolean enabled) {
+        this.isManagementEnabled = enabled;
+        return this;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + keyType.hashCode();
+        result = prime * result + valueType.hashCode();
+        result = prime * result + ((listenerConfigurations == null) ? 0 : listenerConfigurations.hashCode());
+        result = prime * result + ((cacheLoaderFactory == null) ? 0 : cacheLoaderFactory.hashCode());
+        result = prime * result + ((cacheWriterFactory == null) ? 0 : cacheWriterFactory.hashCode());
+        result = prime * result + ((expiryPolicyFactory == null) ? 0 : expiryPolicyFactory.hashCode());
+        result = prime * result + (isReadThrough ? 1231 : 1237);
+        result = prime * result + (isStatisticsEnabled ? 1231 : 1237);
+        result = prime * result + (isStoreByValue ? 1231 : 1237);
+        result = prime * result + (isWriteThrough ? 1231 : 1237);
+        return result;
+    }
+
+
+    @Override
+    public boolean equals(final Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null) {
+            return false;
+        }
+        if (!(object instanceof MutableConfiguration)) {
+            return false;
+        }
+        final MutableConfiguration<?, ?> other = (MutableConfiguration<?, ?>) object;
+        if (!keyType.equals(other.keyType)) {
+            return false;
+        }
+        if (!valueType.equals(other.valueType)) {
+            return false;
+        }
+        if (!listenerConfigurations.equals(other.listenerConfigurations)) {
+            return false;
+        }
+        if (cacheLoaderFactory == null) {
+            if (other.cacheLoaderFactory != null) {
+                return false;
+            }
+        } else if (!cacheLoaderFactory.equals(other.cacheLoaderFactory)) {
+            return false;
+        }
+        if (cacheWriterFactory == null) {
+            if (other.cacheWriterFactory != null) {
+                return false;
+            }
+        } else if (!cacheWriterFactory.equals(other.cacheWriterFactory)) {
+            return false;
+        }
+        if (expiryPolicyFactory == null) {
+            if (other.expiryPolicyFactory != null) {
+                return false;
+            }
+        } else if (!expiryPolicyFactory.equals(other.expiryPolicyFactory)) {
+            return false;
+        }
+        if (isReadThrough != other.isReadThrough) {
+            return false;
+        }
+        if (isStatisticsEnabled != other.isStatisticsEnabled) {
+            return false;
+        }
+        if (isStoreByValue != other.isStoreByValue) {
+            return false;
+        }
+        if (isWriteThrough != other.isWriteThrough) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/OptionalFeature.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/OptionalFeature.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/OptionalFeature.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/configuration/OptionalFeature.java Thu May  1 19:39:52 2014
@@ -0,0 +1,24 @@
+/*
+ *
+ * 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;
+
+public enum OptionalFeature {
+    STORE_BY_REFERENCE
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryCreatedListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryCreatedListener.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryCreatedListener.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryCreatedListener.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.event;
+
+
+public interface CacheEntryCreatedListener<K, V> extends CacheEntryListener<K, V> {
+
+
+    void onCreated(Iterable<CacheEntryEvent<? extends K, ? extends V>> events)
+            throws CacheEntryListenerException;
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEvent.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEvent.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEvent.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEvent.java Thu May  1 19:39:52 2014
@@ -0,0 +1,56 @@
+/*
+ *
+ * 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.event;
+
+
+import javax.cache.Cache;
+import java.util.EventObject;
+
+
+public abstract class CacheEntryEvent<K, V> extends EventObject
+        implements Cache.Entry<K, V> {
+
+    private EventType eventType;
+
+
+    public CacheEntryEvent(Cache source, EventType eventType) {
+        super(source);
+        this.eventType = eventType;
+    }
+
+
+    @Override
+    public final Cache getSource() {
+        return (Cache) super.getSource();
+    }
+
+
+    public abstract V getOldValue();
+
+
+    public abstract boolean isOldValueAvailable();
+
+
+    public final EventType getEventType() {
+        return eventType;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEventFilter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEventFilter.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEventFilter.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryEventFilter.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.event;
+
+
+public interface CacheEntryEventFilter<K, V> {
+
+
+    boolean evaluate(CacheEntryEvent<? extends K, ? extends V> event)
+            throws CacheEntryListenerException;
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryExpiredListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryExpiredListener.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryExpiredListener.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryExpiredListener.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.event;
+
+
+public interface CacheEntryExpiredListener<K, V> extends CacheEntryListener<K, V> {
+
+
+    void onExpired(Iterable<CacheEntryEvent<? extends K, ? extends V>> events)
+            throws CacheEntryListenerException;
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListener.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListener.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListener.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.event;
+
+
+import java.util.EventListener;
+
+
+public interface CacheEntryListener<K, V> extends EventListener {
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListenerException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListenerException.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListenerException.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryListenerException.java Thu May  1 19:39:52 2014
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.event;
+
+
+import javax.cache.CacheException;
+
+
+public class CacheEntryListenerException extends CacheException {
+
+    private static final long serialVersionUID = 20130621110150L;
+
+
+    public CacheEntryListenerException() {
+        super();
+    }
+
+
+    public CacheEntryListenerException(String message) {
+        super(message);
+    }
+
+
+    public CacheEntryListenerException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+
+    public CacheEntryListenerException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryRemovedListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryRemovedListener.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryRemovedListener.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryRemovedListener.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.event;
+
+
+public interface CacheEntryRemovedListener<K, V> extends CacheEntryListener<K, V> {
+
+
+    void onRemoved(Iterable<CacheEntryEvent<? extends K, ? extends V>> events)
+            throws CacheEntryListenerException;
+
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryUpdatedListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryUpdatedListener.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryUpdatedListener.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/CacheEntryUpdatedListener.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.event;
+
+
+public interface CacheEntryUpdatedListener<K, V> extends CacheEntryListener<K, V> {
+
+
+    void onUpdated(Iterable<CacheEntryEvent<? extends K, ? extends V>> events)
+            throws CacheEntryListenerException;
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/EventType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/EventType.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/EventType.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/event/EventType.java Thu May  1 19:39:52 2014
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.event;
+
+
+public enum EventType {
+
+
+    CREATED,
+
+
+    UPDATED,
+
+
+    REMOVED,
+
+
+    EXPIRED
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/AccessedExpiryPolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/AccessedExpiryPolicy.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/AccessedExpiryPolicy.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/AccessedExpiryPolicy.java Thu May  1 19:39:52 2014
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.expiry;
+
+
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
+import java.io.Serializable;
+
+
+public final class AccessedExpiryPolicy implements ExpiryPolicy, Serializable {
+    public static final long serialVersionUID = 201305101601L;
+
+    private Duration expiryDuration;
+
+    public AccessedExpiryPolicy(final Duration expiryDuration) {
+        this.expiryDuration = expiryDuration;
+    }
+
+    public static Factory<ExpiryPolicy> factoryOf(final Duration duration) {
+        return new FactoryBuilder.SingletonFactory<ExpiryPolicy>(new AccessedExpiryPolicy(duration));
+    }
+
+    @Override
+    public Duration getExpiryForCreation() {
+        return expiryDuration;
+    }
+
+    @Override
+    public Duration getExpiryForAccess() {
+        return expiryDuration;
+    }
+
+    @Override
+    public Duration getExpiryForUpdate() {
+        return null;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((expiryDuration == null) ? 0 : expiryDuration.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(final Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null) {
+            return false;
+        }
+        if (!(object instanceof AccessedExpiryPolicy)) {
+            return false;
+        }
+        AccessedExpiryPolicy other = (AccessedExpiryPolicy) object;
+        if (expiryDuration == null) {
+            if (other.expiryDuration != null) {
+                return false;
+            }
+        } else if (!expiryDuration.equals(other.expiryDuration)) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/CreatedExpiryPolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/CreatedExpiryPolicy.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/CreatedExpiryPolicy.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/CreatedExpiryPolicy.java Thu May  1 19:39:52 2014
@@ -0,0 +1,87 @@
+/*
+ *
+ * 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.expiry;
+
+
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
+import java.io.Serializable;
+
+
+public final class CreatedExpiryPolicy implements ExpiryPolicy, Serializable {
+    public static final long serialVersionUID = 201305291023L;
+
+    private Duration expiryDuration;
+
+    public CreatedExpiryPolicy(final Duration expiryDuration) {
+        this.expiryDuration = expiryDuration;
+    }
+
+    public static Factory<ExpiryPolicy> factoryOf(final Duration duration) {
+        return new FactoryBuilder.SingletonFactory<ExpiryPolicy>(new CreatedExpiryPolicy(duration));
+    }
+
+    @Override
+    public Duration getExpiryForCreation() {
+        return expiryDuration;
+    }
+
+    @Override
+    public Duration getExpiryForAccess() {
+        return null;
+    }
+
+    @Override
+    public Duration getExpiryForUpdate() {
+        return null;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((expiryDuration == null) ? 0 : expiryDuration.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null) {
+            return false;
+        }
+        if (!(object instanceof CreatedExpiryPolicy)) {
+            return false;
+        }
+        CreatedExpiryPolicy other = (CreatedExpiryPolicy) object;
+        if (expiryDuration == null) {
+            if (other.expiryDuration != null) {
+                return false;
+            }
+        } else if (!expiryDuration.equals(other.expiryDuration)) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/Duration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/Duration.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/Duration.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/Duration.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.expiry;
+
+
+import java.io.Serializable;
+import java.util.concurrent.TimeUnit;
+
+import static java.util.concurrent.TimeUnit.DAYS;
+import static java.util.concurrent.TimeUnit.HOURS;
+import static java.util.concurrent.TimeUnit.MINUTES;
+import static java.util.concurrent.TimeUnit.SECONDS;
+
+
+public class Duration implements Serializable {
+    public static final long serialVersionUID = 201305101442L;
+
+    public static final Duration ETERNAL = new Duration();
+    public static final Duration ONE_DAY = new Duration(DAYS, 1);
+    public static final Duration ONE_HOUR = new Duration(HOURS, 1);
+    public static final Duration THIRTY_MINUTES = new Duration(MINUTES, 30);
+    public static final Duration TWENTY_MINUTES = new Duration(MINUTES, 20);
+    public static final Duration TEN_MINUTES = new Duration(MINUTES, 10);
+    public static final Duration FIVE_MINUTES = new Duration(MINUTES, 5);
+    public static final Duration ONE_MINUTE = new Duration(MINUTES, 1);
+    public static final Duration ZERO = new Duration(SECONDS, 0);
+
+    private final TimeUnit timeUnit;
+    private final long durationAmount;
+
+    public Duration() {
+        this.timeUnit = null;
+        this.durationAmount = 0;
+    }
+
+    public Duration(final TimeUnit timeUnit, final long durationAmount) {
+        if (timeUnit == null) {
+            if (durationAmount == 0) {
+                this.timeUnit = null;
+                this.durationAmount = 0;
+            } else {
+                throw new NullPointerException();
+            }
+        } else {
+            switch (timeUnit) {
+                case NANOSECONDS:
+                case MICROSECONDS:
+                    throw new IllegalArgumentException("Must specify a TimeUnit of milliseconds or higher.");
+                default:
+                    this.timeUnit = timeUnit;
+                    break;
+            }
+            if (durationAmount < 0) {
+                throw new IllegalArgumentException("Cannot specify a negative durationAmount.");
+            }
+            this.durationAmount = durationAmount;
+        }
+    }
+
+    public Duration(final long startTime, final long endTime) {
+        if (startTime == Long.MAX_VALUE || endTime == Long.MAX_VALUE) {
+            timeUnit = null;
+            durationAmount = 0;
+        } else if (startTime < 0) {
+            throw new IllegalArgumentException("Cannot specify a negative startTime.");
+        } else if (endTime < 0) {
+            throw new IllegalArgumentException("Cannot specify a negative endTime.");
+        } else {
+            timeUnit = TimeUnit.MILLISECONDS;
+            durationAmount = Math.max(startTime, endTime) - Math.min(startTime, endTime);
+        }
+    }
+
+    public TimeUnit getTimeUnit() {
+        return timeUnit;
+    }
+
+    public long getDurationAmount() {
+        return durationAmount;
+    }
+
+    public boolean isEternal() {
+        return timeUnit == null && durationAmount == 0;
+    }
+
+    public boolean isZero() {
+        return timeUnit != null && durationAmount == 0;
+    }
+
+    public long getAdjustedTime(final long time) {
+        if (isEternal()) {
+            return Long.MAX_VALUE;
+        }
+        return time + timeUnit.toMillis(durationAmount);
+    }
+
+    @Override
+    public boolean equals(final Object other) {
+        if (this == other) {
+            return true;
+        } else if (other == null || getClass() != other.getClass()) {
+            return false;
+        } else {
+            final Duration duration = (Duration) other;
+            if (this.timeUnit == null && duration.timeUnit == null &&
+                    this.durationAmount == duration.durationAmount) {
+                return true;
+            } else if (this.timeUnit != null && duration.timeUnit != null) {
+                long time1 = timeUnit.toMillis(durationAmount);
+                long time2 = duration.timeUnit.toMillis(duration.durationAmount);
+                return time1 == time2;
+            }
+            return false;
+        }
+    }
+
+    @Override
+    public int hashCode() {
+        return timeUnit == null ? -1 : (int) timeUnit.toMillis(durationAmount);
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/EternalExpiryPolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/EternalExpiryPolicy.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/EternalExpiryPolicy.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/EternalExpiryPolicy.java Thu May  1 19:39:52 2014
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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.expiry;
+
+
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
+import java.io.Serializable;
+
+import static javax.cache.expiry.Duration.ETERNAL;
+
+
+public final class EternalExpiryPolicy implements ExpiryPolicy, Serializable {
+    public static final long serialVersionUID = 201305101603L;
+
+    public static Factory<ExpiryPolicy> factoryOf() {
+        return new FactoryBuilder.SingletonFactory<ExpiryPolicy>(new EternalExpiryPolicy());
+    }
+
+    @Override
+    public Duration getExpiryForCreation() {
+        return ETERNAL;
+    }
+
+    @Override
+    public Duration getExpiryForAccess() {
+        return null;
+    }
+
+    @Override
+    public Duration getExpiryForUpdate() {
+        return null;
+    }
+
+    @Override
+    public int hashCode() {
+        return EternalExpiryPolicy.class.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        return other instanceof EternalExpiryPolicy;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ExpiryPolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ExpiryPolicy.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ExpiryPolicy.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ExpiryPolicy.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.expiry;
+
+public interface ExpiryPolicy {
+    Duration getExpiryForCreation();
+
+    Duration getExpiryForAccess();
+
+    Duration getExpiryForUpdate();
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ModifiedExpiryPolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ModifiedExpiryPolicy.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ModifiedExpiryPolicy.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/ModifiedExpiryPolicy.java Thu May  1 19:39:52 2014
@@ -0,0 +1,86 @@
+/*
+ *
+ * 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.expiry;
+
+
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
+import java.io.Serializable;
+
+
+public final class ModifiedExpiryPolicy implements ExpiryPolicy, Serializable {
+    public static final long serialVersionUID = 201305101602L;
+
+    private final Duration expiryDuration;
+
+    public ModifiedExpiryPolicy(Duration expiryDuration) {
+        this.expiryDuration = expiryDuration;
+    }
+
+    public static Factory<ExpiryPolicy> factoryOf(Duration duration) {
+        return new FactoryBuilder.SingletonFactory<ExpiryPolicy>(new ModifiedExpiryPolicy(duration));
+    }
+
+    @Override
+    public Duration getExpiryForCreation() {
+        return expiryDuration;
+    }
+
+    @Override
+    public Duration getExpiryForAccess() {
+        return null;
+    }
+
+    @Override
+    public Duration getExpiryForUpdate() {
+        return expiryDuration;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((expiryDuration == null) ? 0 : expiryDuration.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null) {
+            return false;
+        }
+        if (!(object instanceof ModifiedExpiryPolicy)) {
+            return false;
+        }
+        ModifiedExpiryPolicy other = (ModifiedExpiryPolicy) object;
+        if (expiryDuration == null) {
+            if (other.expiryDuration != null) {
+                return false;
+            }
+        } else if (!expiryDuration.equals(other.expiryDuration)) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/TouchedExpiryPolicy.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/TouchedExpiryPolicy.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/TouchedExpiryPolicy.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/expiry/TouchedExpiryPolicy.java Thu May  1 19:39:52 2014
@@ -0,0 +1,83 @@
+/*
+ *
+ * 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.expiry;
+
+import javax.cache.configuration.Factory;
+import javax.cache.configuration.FactoryBuilder;
+import java.io.Serializable;
+
+public final class TouchedExpiryPolicy implements ExpiryPolicy, Serializable {
+    public static final long serialVersionUID = 201305291023L;
+
+    private final Duration expiryDuration;
+
+    public TouchedExpiryPolicy(final Duration expiryDuration) {
+        this.expiryDuration = expiryDuration;
+    }
+
+    public static Factory<ExpiryPolicy> factoryOf(Duration duration) {
+        return new FactoryBuilder.SingletonFactory<ExpiryPolicy>(new TouchedExpiryPolicy(duration));
+    }
+
+    @Override
+    public Duration getExpiryForCreation() {
+        return expiryDuration;
+    }
+
+    @Override
+    public Duration getExpiryForAccess() {
+        return expiryDuration;
+    }
+
+    @Override
+    public Duration getExpiryForUpdate() {
+        return expiryDuration;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((expiryDuration == null) ? 0 : expiryDuration.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object) {
+            return true;
+        }
+        if (object == null) {
+            return false;
+        }
+        if (!(object instanceof TouchedExpiryPolicy)) {
+            return false;
+        }
+        TouchedExpiryPolicy other = (TouchedExpiryPolicy) object;
+        if (expiryDuration == null) {
+            if (other.expiryDuration != null) {
+                return false;
+            }
+        } else if (!expiryDuration.equals(other.expiryDuration)) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoader.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoader.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoader.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoader.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.integration;
+
+import java.util.Map;
+
+public interface CacheLoader<K, V> {
+    V load(K key) throws CacheLoaderException;
+
+    Map<K, V> loadAll(Iterable<? extends K> keys) throws CacheLoaderException;
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoaderException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoaderException.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoaderException.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheLoaderException.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.integration;
+
+import javax.cache.CacheException;
+
+public class CacheLoaderException extends CacheException {
+    private static final long serialVersionUID = 20130822163231L;
+
+    public CacheLoaderException() {
+        super();
+    }
+
+    public CacheLoaderException(String message) {
+        super(message);
+    }
+
+    public CacheLoaderException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public CacheLoaderException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriter.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriter.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriter.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.integration;
+
+import javax.cache.Cache;
+import java.util.Collection;
+
+public interface CacheWriter<K, V> {
+    void write(Cache.Entry<? extends K, ? extends V> entry) throws CacheWriterException;
+
+    void writeAll(Collection<Cache.Entry<? extends K, ? extends V>> entries) throws CacheWriterException;
+
+    void delete(Object key) throws CacheWriterException;
+
+    void deleteAll(Collection<?> keys) throws CacheWriterException;
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriterException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriterException.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriterException.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CacheWriterException.java Thu May  1 19:39:52 2014
@@ -0,0 +1,52 @@
+/*
+ *
+ * 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.integration;
+
+
+import javax.cache.CacheException;
+
+
+public class CacheWriterException extends CacheException {
+
+    private static final long serialVersionUID = 20130822161612L;
+
+
+    public CacheWriterException() {
+        super();
+    }
+
+
+    public CacheWriterException(String message) {
+        super(message);
+    }
+
+
+    public CacheWriterException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+
+    public CacheWriterException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListener.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListener.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListener.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.integration;
+
+public interface CompletionListener {
+    void onCompletion();
+
+    void onException(Exception e);
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListenerFuture.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListenerFuture.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListenerFuture.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/integration/CompletionListenerFuture.java Thu May  1 19:39:52 2014
@@ -0,0 +1,121 @@
+/*
+ *
+ * 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.integration;
+
+
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+
+public class CompletionListenerFuture implements CompletionListener, Future<Void> {
+
+    private boolean isCompleted;
+    private Exception exception;
+
+
+    public CompletionListenerFuture() {
+        this.isCompleted = false;
+        this.exception = null;
+    }
+
+
+    @Override
+    public void onCompletion() throws IllegalStateException {
+        synchronized (this) {
+            if (isCompleted) {
+                throw new IllegalStateException("Attempted to use a CompletionListenerFuture instance more than once");
+            } else {
+                isCompleted = true;
+                notify();
+            }
+        }
+    }
+
+
+    @Override
+    public void onException(Exception e) throws IllegalStateException {
+        synchronized (this) {
+            if (isCompleted) {
+                throw new IllegalStateException("Attempted to use a CompletionListenerFuture instance more than once");
+            } else {
+                isCompleted = true;
+                exception = e;
+                notify();
+            }
+        }
+    }
+
+    @Override
+    public boolean cancel(boolean b) {
+        throw new UnsupportedOperationException("CompletionListenerFutures can't be cancelled");
+    }
+
+    @Override
+    public boolean isCancelled() {
+        return false;
+    }
+
+    @Override
+    public boolean isDone() {
+        synchronized (this) {
+            return isCompleted;
+        }
+    }
+
+
+    @Override
+    public Void get() throws InterruptedException, ExecutionException {
+        synchronized (this) {
+            while (!isCompleted) {
+                wait();
+            }
+
+            if (exception == null) {
+                return null;
+            } else {
+                throw new ExecutionException(exception);
+            }
+        }
+    }
+
+
+    @Override
+    public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
+        synchronized (this) {
+            if (!isCompleted) {
+                unit.timedWait(this, timeout);
+            }
+
+            if (isCompleted) {
+                if (exception == null) {
+                    return null;
+                } else {
+                    throw new ExecutionException(exception);
+                }
+            } else {
+                throw new TimeoutException();
+            }
+        }
+    }
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheMXBean.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheMXBean.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheMXBean.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheMXBean.java Thu May  1 19:39:52 2014
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.management;
+
+import javax.management.MXBean;
+
+@MXBean
+public interface CacheMXBean {
+    String getKeyType();
+
+
+    String getValueType();
+
+
+    boolean isReadThrough();
+
+
+    boolean isWriteThrough();
+
+
+    boolean isStoreByValue();
+
+
+    boolean isStatisticsEnabled();
+
+
+    boolean isManagementEnabled();
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheStatisticsMXBean.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheStatisticsMXBean.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheStatisticsMXBean.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/management/CacheStatisticsMXBean.java Thu May  1 19:39:52 2014
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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.management;
+
+import javax.management.MXBean;
+
+@MXBean
+public interface CacheStatisticsMXBean {
+    void clear();
+
+
+    long getCacheHits();
+
+
+    float getCacheHitPercentage();
+
+
+    long getCacheMisses();
+
+
+    float getCacheMissPercentage();
+
+
+    long getCacheGets();
+
+
+    long getCachePuts();
+
+
+    long getCacheRemovals();
+
+
+    long getCacheEvictions();
+
+
+    float getAverageGetTime();
+
+
+    float getAveragePutTime();
+
+
+    float getAverageRemoveTime();
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessor.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessor.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessor.java Thu May  1 19:39:52 2014
@@ -0,0 +1,24 @@
+/*
+ *
+ * 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.processor;
+
+public interface EntryProcessor<K, V, T> {
+    T process(MutableEntry<K, V> entry, Object... arguments) throws EntryProcessorException;
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorException.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorException.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorException.java Thu May  1 19:39:52 2014
@@ -0,0 +1,47 @@
+/*
+ *
+ * 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.processor;
+
+import javax.cache.CacheException;
+
+public class EntryProcessorException extends CacheException {
+    private static final long serialVersionUID = 20130822110920L;
+
+
+    public EntryProcessorException() {
+        super();
+    }
+
+
+    public EntryProcessorException(String message) {
+        super(message);
+    }
+
+
+    public EntryProcessorException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+
+    public EntryProcessorException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorResult.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorResult.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorResult.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/EntryProcessorResult.java Thu May  1 19:39:52 2014
@@ -0,0 +1,24 @@
+/*
+ *
+ * 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.processor;
+
+public interface EntryProcessorResult<T> {
+    T get() throws EntryProcessorException;
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/MutableEntry.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/MutableEntry.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/MutableEntry.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/processor/MutableEntry.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.processor;
+
+import javax.cache.Cache;
+
+public interface MutableEntry<K, V> extends Cache.Entry<K, V> {
+    boolean exists();
+
+    void remove();
+
+    void setValue(V value);
+}

Added: geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/spi/CachingProvider.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/spi/CachingProvider.java?rev=1591754&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/spi/CachingProvider.java (added)
+++ geronimo/specs/trunk/geronimo-jcache_1.0_spec/src/main/java/javax/cache/spi/CachingProvider.java Thu May  1 19:39:52 2014
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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.spi;
+
+
+import javax.cache.CacheManager;
+import javax.cache.configuration.OptionalFeature;
+import java.io.Closeable;
+import java.net.URI;
+import java.util.Properties;
+
+
+public interface CachingProvider extends Closeable {
+    CacheManager getCacheManager(URI uri, ClassLoader classLoader, Properties properties);
+
+
+    ClassLoader getDefaultClassLoader();
+
+
+    URI getDefaultURI();
+
+
+    Properties getDefaultProperties();
+
+
+    CacheManager getCacheManager(URI uri, ClassLoader classLoader);
+
+
+    CacheManager getCacheManager();
+
+
+    void close();
+
+
+    void close(ClassLoader classLoader);
+
+
+    void close(URI uri, ClassLoader classLoader);
+
+
+    boolean isSupported(OptionalFeature optionalFeature);
+}



Mime
View raw message