cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r462961 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/cache/CacheObjectFactory.java
Date Wed, 11 Oct 2006 21:28:56 GMT
Author: aadamchik
Date: Wed Oct 11 14:28:56 2006
New Revision: 462961

URL: http://svn.apache.org/viewvc?view=rev&rev=462961
Log:
CAY-685 OSQueryCache concurrency improvements
added a method to the QueryCache interface to perform a read-through cache access, thus letting
the cache implementor 
to define synchronization policy. By default the MapQueryCache does updates asynchronously,
while OSQueryCache
can be configured to do it as "blocking" or "non-blocking"

Added:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/cache/CacheObjectFactory.java

Added: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/cache/CacheObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/cache/CacheObjectFactory.java?view=auto&rev=462961
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/cache/CacheObjectFactory.java
(added)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/cache/CacheObjectFactory.java
Wed Oct 11 14:28:56 2006
@@ -0,0 +1,34 @@
+/*****************************************************************
+ *   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.
+ ****************************************************************/
+package org.apache.cayenne.cache;
+
+/**
+ * A factory that is used by the cache to rebuild expired entries.
+ * 
+ * @since 3.0
+ * @author Andrus Adamchik
+ */
+public interface CacheObjectFactory {
+
+    /**
+     * Provides a fresh value of the cache entry. Normally this operation would perform a
+     * database query. This operation must not return null.
+     */
+    Object createObject();
+}



Mime
View raw message