You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by tv...@apache.org on 2007/05/10 18:04:27 UTC
svn commit: r536904 [5/38] - in /jakarta/jcs/trunk: ./
auxiliary-builds/javagroups/
auxiliary-builds/javagroups/src/java/org/apache/jcs/auxiliary/javagroups/
auxiliary-builds/javagroups/src/test/org/apache/jcs/auxiliary/javagroups/
auxiliary-builds/jdk...
Modified: jakarta/jcs/trunk/project-b4.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/project-b4.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/project-b4.xml (original)
+++ jakarta/jcs/trunk/project-b4.xml Thu May 10 09:03:42 2007
@@ -1,4 +1,22 @@
<?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.
+-->
<!-- For use with maven b4 -->
Modified: jakarta/jcs/trunk/project.properties
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/project.properties?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/project.properties (original)
+++ jakarta/jcs/trunk/project.properties Thu May 10 09:03:42 2007
@@ -1,3 +1,19 @@
+# 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.
# -------------------------------------------------------------------
# REPOS
# -------------------------------------------------------------------
@@ -38,7 +54,7 @@
# -------------------------------------------------------------------
maven.junit.fork = true
# I'm setting this for jcoverage.
-#maven.test.failure.ignore=true
+# maven.test.failure.ignore=true
maven.jcoverage.junit.fork = true
maven.junit.sysproperties=java.security.policy
java.security.policy=${basedir}/src/conf/cache.policy
Modified: jakarta/jcs/trunk/project.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/project.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/project.xml (original)
+++ jakarta/jcs/trunk/project.xml Thu May 10 09:03:42 2007
@@ -1,4 +1,22 @@
<?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>
Modified: jakarta/jcs/trunk/sandbox/yajcache/build-backup.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/build-backup.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/build-backup.xml (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/build-backup.xml Thu May 10 09:03:42 2007
@@ -1,4 +1,22 @@
<?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.
+-->
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
@@ -7,9 +25,9 @@
<import file="nbproject/build-impl.xml"/>
<!--
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
@@ -35,12 +53,12 @@
</obfuscate>
</target>
- For list of available properties check the imported
- nbproject/build-impl.xml file.
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
+ The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
@@ -48,7 +66,7 @@
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
+ run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
@@ -60,10 +78,10 @@
</exec>
</target>
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
+ nbproject/build-impl.xml file.
-->
</project>
Modified: jakarta/jcs/trunk/sandbox/yajcache/build.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/build.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/build.xml (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/build.xml Thu May 10 09:03:42 2007
@@ -1,4 +1,22 @@
<?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.
+-->
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
@@ -7,9 +25,9 @@
<import file="nbproject/build-impl.xml"/>
<!--
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
@@ -35,12 +53,12 @@
</obfuscate>
</target>
- For list of available properties check the imported
- nbproject/build-impl.xml file.
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
+ The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
@@ -48,7 +66,7 @@
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
+ run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
@@ -60,10 +78,10 @@
</exec>
</target>
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
+ nbproject/build-impl.xml file.
-->
</project>
Modified: jakarta/jcs/trunk/sandbox/yajcache/nbproject/build-impl.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/nbproject/build-impl.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/nbproject/build-impl.xml (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/nbproject/build-impl.xml Thu May 10 09:03:42 2007
@@ -1,5 +1,23 @@
<?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.
+-->
+<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
@@ -21,9 +39,9 @@
-->
<project name="yajcache-impl" default="build" basedir="..">
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
- <!--
+ <!--
======================
- INITIALIZATION SECTION
+ INITIALIZATION SECTION
======================
-->
<target name="-pre-init">
Modified: jakarta/jcs/trunk/sandbox/yajcache/nbproject/genfiles.properties
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/nbproject/genfiles.properties?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/nbproject/genfiles.properties (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/nbproject/genfiles.properties Thu May 10 09:03:42 2007
@@ -1,3 +1,19 @@
+# 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.
build.xml.data.CRC32=2bb1d1e9
build.xml.script.CRC32=6630f1f4
build.xml.stylesheet.CRC32=ba5d3624
Modified: jakarta/jcs/trunk/sandbox/yajcache/nbproject/profiler-build-impl.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/nbproject/profiler-build-impl.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/nbproject/profiler-build-impl.xml (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/nbproject/profiler-build-impl.xml Thu May 10 09:03:42 2007
@@ -1,5 +1,23 @@
<?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.
+-->
+<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
@@ -13,9 +31,9 @@
-->
<project name="cache-profiler-impl" default="profile" basedir="..">
<target name="default" depends="profile" description="Build and profile the project."/>
- <!--
+ <!--
======================
- INITIALIZATION SECTION
+ INITIALIZATION SECTION
======================
-->
<target name="-profile-pre-init">
Modified: jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.properties
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.properties?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.properties (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.properties Thu May 10 09:03:42 2007
@@ -1,3 +1,19 @@
+# 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.
application.args=
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
Modified: jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.xml
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.xml?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.xml (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/nbproject/project.xml Thu May 10 09:03:42 2007
@@ -1,4 +1,22 @@
<?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://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeEvent.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
-
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
/**
@@ -32,7 +35,7 @@
protected @NonNullable ICache<V> getCache() {
return (ICache<V>)super.getSource();
}
- /**
+ /**
* Dispatches the beans handling to the specific method invokation of the
* given handler.
*/
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeSupport.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeSupport.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeSupport.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheChangeSupport.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 The Apache Software Foundation.
+ * 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
*
- * 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
*
- * 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.
+ * 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.jcs.yajcache.beans;
-
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
@@ -32,11 +35,11 @@
*/
@CopyRightApache
public class CacheChangeSupport<V> {
- private final @NonNullable List<ICacheChangeListener<V>> listeners
+ private final @NonNullable List<ICacheChangeListener<V>> listeners
= new CopyOnWriteArrayList<ICacheChangeListener<V>>();
-
+
private ICache<V> cache;
-
+
public CacheChangeSupport(@NonNullable ICache<V> cache) {
this.cache = cache;
}
@@ -44,29 +47,29 @@
{
listeners.add(listener);
}
- public void removeCacheChangeListener(@NonNullable ICacheChangeListener<V> listener)
+ public void removeCacheChangeListener(@NonNullable ICacheChangeListener<V> listener)
{
listeners.remove(listener);
}
- public @NonNullable Iterable<ICacheChangeListener<V>> getCacheChangeListeners()
+ public @NonNullable Iterable<ICacheChangeListener<V>> getCacheChangeListeners()
{
return listeners;
}
- public void fireCacheChange(@NonNullable CacheChangeEvent<V> evt)
+ public void fireCacheChange(@NonNullable CacheChangeEvent<V> evt)
{
for (ICacheChangeListener<V> listener : this.listeners) {
listener.cacheChange(evt);
}
}
- public void fireCachePut(@NonNullable String key, @NonNullable V value)
+ public void fireCachePut(@NonNullable String key, @NonNullable V value)
{
this.fireCacheChange(new CachePutEvent<V>(this.cache, key, value));
}
- public void fireCacheRemove(@NonNullable String key)
+ public void fireCacheRemove(@NonNullable String key)
{
this.fireCacheChange(new CacheRemoveEvent<V>(this.cache, key));
}
- public void fireCacheClear()
+ public void fireCacheClear()
{
this.fireCacheChange(new CacheClearEvent<V>(this.cache));
}
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheClearEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheClearEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheClearEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheClearEvent.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
-
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
/**
@@ -28,7 +31,7 @@
{
super(cache);
}
- @Override
+ @Override
public boolean dispatch(@NonNullable ICacheChangeHandler<V> handler) {
return handler.handleClear(super.getCache().getName());
}
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCloneEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCloneEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCloneEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCloneEvent.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
-
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
/**
@@ -24,7 +27,7 @@
*/
@CopyRightApache
public class CachePutBeanCloneEvent<V> extends CachePutEvent<V> {
- protected CachePutBeanCloneEvent(@NonNullable ICache<V> cache,
+ protected CachePutBeanCloneEvent(@NonNullable ICache<V> cache,
@NonNullable String key, @NonNullable V val)
{
super(cache, key, val);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCopyEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCopyEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCopyEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutBeanCopyEvent.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
-
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
/**
@@ -24,7 +27,7 @@
*/
@CopyRightApache
public class CachePutBeanCopyEvent<V> extends CachePutEvent<V> {
- public CachePutBeanCopyEvent(@NonNullable ICache<V> cache,
+ public CachePutBeanCopyEvent(@NonNullable ICache<V> cache,
@NonNullable String key, @NonNullable V val)
{
super(cache, key, val);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutCopyEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutCopyEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutCopyEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutCopyEvent.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
-
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
/**
@@ -24,7 +27,7 @@
*/
@CopyRightApache
public class CachePutCopyEvent<V> extends CachePutEvent<V> {
- public CachePutCopyEvent(@NonNullable ICache<V> cache,
+ public CachePutCopyEvent(@NonNullable ICache<V> cache,
@NonNullable String key, @NonNullable V val)
{
super(cache, key, val);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CachePutEvent.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
-
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
/**
@@ -27,7 +30,7 @@
private final @NonNullable String key;
private final @NonNullable V value;
- public CachePutEvent(@NonNullable ICache<V> cache,
+ public CachePutEvent(@NonNullable ICache<V> cache,
@NonNullable String key, @NonNullable V value)
{
super(cache);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheRemoveEvent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheRemoveEvent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheRemoveEvent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/CacheRemoveEvent.java Thu May 10 09:03:42 2007
@@ -1,20 +1,23 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
import org.apache.jcs.yajcache.lang.annotation.*;
import org.apache.jcs.yajcache.core.ICache;
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeHandler.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeHandler.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeHandler.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeHandler.java Thu May 10 09:03:42 2007
@@ -1,19 +1,23 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 The Apache Software Foundation.
+ * 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
*
- * 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
*
- * 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.
+ * 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.jcs.yajcache.beans;
import org.apache.jcs.yajcache.lang.annotation.*;
@@ -24,13 +28,13 @@
*/
@CopyRightApache
public interface ICacheChangeHandler<V> {
- public boolean handlePut(@NonNullable String cacheName,
+ public boolean handlePut(@NonNullable String cacheName,
@NonNullable String key, @NonNullable V value);
- public boolean handlePutCopy(@NonNullable String cacheName,
+ public boolean handlePutCopy(@NonNullable String cacheName,
@NonNullable String key, @NonNullable V value);
- public boolean handlePutBeanCopy(@NonNullable String cacheName,
+ public boolean handlePutBeanCopy(@NonNullable String cacheName,
@NonNullable String key, @NonNullable V value);
- public boolean handlePutBeanClone(@NonNullable String cacheName,
+ public boolean handlePutBeanClone(@NonNullable String cacheName,
@NonNullable String key, @NonNullable V value);
public boolean handleRemove(
@NonNullable String cacheName, @NonNullable String key);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeListener.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeListener.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeListener.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/beans/ICacheChangeListener.java Thu May 10 09:03:42 2007
@@ -1,19 +1,23 @@
+package org.apache.jcs.yajcache.beans;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.beans;
import org.apache.jcs.yajcache.beans.CacheChangeEvent;
import org.apache.jcs.yajcache.lang.annotation.*;
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/PerCacheConfig.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/PerCacheConfig.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/PerCacheConfig.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/PerCacheConfig.java Thu May 10 09:03:42 2007
@@ -1,22 +1,24 @@
+package org.apache.jcs.yajcache.config;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.config;
-
import java.io.File;
import org.apache.jcs.yajcache.lang.annotation.*;
@@ -29,13 +31,13 @@
@TODO("configuration via XML file")
public class PerCacheConfig {
private boolean isCacheFileEnabled = true;
-
+
public boolean setCacheFileEnabled(boolean isCacheFileEnabled) {
boolean ret = this.isCacheFileEnabled;
this.isCacheFileEnabled = isCacheFileEnabled;
return ret;
}
-
+
public boolean isCacheFileEnabled() {
return this.isCacheFileEnabled;
}
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/YajCacheConfig.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/YajCacheConfig.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/YajCacheConfig.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/config/YajCacheConfig.java Thu May 10 09:03:42 2007
@@ -1,22 +1,24 @@
+package org.apache.jcs.yajcache.config;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.config;
-
import java.io.File;
import org.apache.jcs.yajcache.lang.annotation.*;
@@ -29,10 +31,10 @@
// http://www.netbeans.org/issues/show_bug.cgi?id=53704
public enum YajCacheConfig {
inst;
-
+
/** Root directory for cache overflow to file. */
private @NonNullable File cacheDir = new File("/tmp/yajcache");
-
+
YajCacheConfig() {
this.cacheDir.mkdirs();
}
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheEntry.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheEntry.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheEntry.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheEntry.java Thu May 10 09:03:42 2007
@@ -1,20 +1,23 @@
+package org.apache.jcs.yajcache.core;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.core;
import java.util.Map;
import org.apache.commons.lang.builder.HashCodeBuilder;
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheManager.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheManager.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheManager.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheManager.java Thu May 10 09:03:42 2007
@@ -1,20 +1,23 @@
+package org.apache.jcs.yajcache.core;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.core;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -37,10 +40,10 @@
// http://www.netbeans.org/issues/show_bug.cgi?id=53704
public enum CacheManager {
inst;
-
+
private static final boolean debug = true;
private AtomicInteger countGetCache = new AtomicInteger(0);
-
+
private AtomicInteger countCreateCache = new AtomicInteger(0);
private AtomicInteger countCreateCacheRace = new AtomicInteger(0);
private AtomicInteger countCreateFileCache = new AtomicInteger(0);
@@ -48,36 +51,36 @@
private AtomicInteger countRemoveCache = new AtomicInteger(0);
private AtomicInteger countRemoveFileCache = new AtomicInteger(0);
-
+
// Cache name to Cache mapping.
- private final ConcurrentMap<String,ICache<?>> map =
+ private final ConcurrentMap<String,ICache<?>> map =
new ConcurrentHashMap<String, ICache<?>>();
- /**
+ /**
* Used for entire cache with external IO,
* so cache create/removal won't conflict with normal get/put operations.
*/
- private final IKeyedReadWriteLock<String> keyedRWLock =
+ private final IKeyedReadWriteLock<String> keyedRWLock =
new KeyedReadWriteLock<String>();
- /**
- * Returns an existing cache for the specified name;
+ /**
+ * Returns an existing cache for the specified name;
* or null if not found.
*/
public ICache getCache(@NonNullable String name) {
return this.map.get(name);
}
- /**
- * Returns an existing safe cache for the specified name;
+ /**
+ * Returns an existing safe cache for the specified name;
* or null if such a safe cache cannot not found.
*/
public ICacheSafe getSafeCache(@NonNullable String name) {
ICache c = this.getCache(name);
-
+
if (c == null || !(c instanceof ICacheSafe))
return null;
return (ICacheSafe)c;
}
- /**
- * Returns an existing cache for the specified name and value type;
+ /**
+ * Returns an existing cache for the specified name and value type;
* or null if not found.
*/
// @SuppressWarnings({"unchecked"})
@@ -90,8 +93,8 @@
ICache c = this.map.get(name);
return c != null && this.checkValueType(c, valueType) ? c : null;
}
- /**
- * Returns an existing safe cache for the specified name and value type;
+ /**
+ * Returns an existing safe cache for the specified name and value type;
* or null if such a safe cache cannot be found.
*/
public <V> ICacheSafe<V> getSafeCache(
@@ -104,7 +107,7 @@
return null;
return this.checkValueType(c, valueType) ? (ICacheSafe<V>)c : null;
}
- /**
+ /**
* Returns a cache for the specified name, value type and cache type.
* Creates the cache if necessary.
*
@@ -117,7 +120,7 @@
@NonNullable CacheType cacheType)
{
ICache c = this.map.get(name);
-
+
if (c == null) {
switch(cacheType) {
case SOFT_REFERENCE:
@@ -137,7 +140,7 @@
}
return c;
}
- /**
+ /**
* Returns a safe cache for the specified name, value type and cache type.
* Creates the cache if necessary.
*
@@ -167,10 +170,10 @@
if (debug)
this.countRemoveCache.incrementAndGet();
ICache c = this.map.remove(name);
-
+
if (c != null) {
CacheType cacheType = c.getCacheType();
-
+
switch(cacheType) {
case SOFT_REFERENCE:
case SOFT_REFERENCE_SAFE:
@@ -197,9 +200,9 @@
}
return c;
}
- /**
+ /**
* Creates the specified cache if not already created.
- *
+ *
* @return either the cache created by the current thread, or
* an existing cache created by another thread due to data race.
*
@@ -208,7 +211,7 @@
*/
// @SuppressWarnings({"unchecked"})
private @NonNullable <V> ICache<V> tryCreateCache(
- @NonNullable String name,
+ @NonNullable String name,
@NonNullable Class<V> valueType,
@NonNullable CacheType cacheType)
{
@@ -228,9 +231,9 @@
}
return newCache;
}
- /**
+ /**
* Creates the specified file cache if not already created.
- *
+ *
* @return either the file cache created by the current thread, or
* an existing file cache created by another thread due to data race.
*
@@ -238,7 +241,7 @@
* incompatible value type or incompatible cache type.
*/
private @NonNullable <V> ICache<V> tryCreateFileCache(
- @NonNullable String name,
+ @NonNullable String name,
@NonNullable Class<V> valueType,
@NonNullable CacheType cacheType)
{
@@ -267,13 +270,13 @@
@TestOnly("Used solely to simluate a race condition during cache creation ")
@NonNullable <V> ICache<V> testCreateCacheRaceCondition(
- @NonNullable String name, @NonNullable Class<V> valueType, @NonNullable CacheType cacheType)
+ @NonNullable String name, @NonNullable Class<V> valueType, @NonNullable CacheType cacheType)
{
return this.tryCreateCache(name, valueType, cacheType);
}
@TestOnly("Used solely to simluate a race condition during cache creation ")
@NonNullable <V> ICache<V> testCreateFileCacheRaceCondition(
- @NonNullable String name, @NonNullable Class<V> valueType, @NonNullable CacheType cacheType)
+ @NonNullable String name, @NonNullable Class<V> valueType, @NonNullable CacheType cacheType)
{
return this.tryCreateCache(name, valueType, cacheType);
}
@@ -284,18 +287,18 @@
* @throws ClassCastException if the cache already exists for an
* incompatible value type or incompatible cache type.
*/
- private <V> void checkTypes(ICache c,
- @NonNullable CacheType cacheType, @NonNullable Class<V> valueType)
+ private <V> void checkTypes(ICache c,
+ @NonNullable CacheType cacheType, @NonNullable Class<V> valueType)
{
if (c == null)
return;
if (!c.getCacheType().isAsssignableFrom(cacheType))
throw new ClassCastException("Cache " + c.getName()
- + " of type " + c.getCacheType()
+ + " of type " + c.getCacheType()
+ " already exists and cannot be used for cache type " + cacheType);
if (!this.checkValueType(c, valueType))
throw new ClassCastException("Cache " + c.getName()
- + " of value type " + c.getValueType()
+ + " of value type " + c.getValueType()
+ " already exists and cannot be used for value type " + valueType);
return;
}
@@ -306,7 +309,7 @@
* @return true if the valueType is compatible with the cache;
* false otherwise.
*/
- private boolean checkValueType(@NonNullable ICache c, @NonNullable Class<?> valueType)
+ private boolean checkValueType(@NonNullable ICache c, @NonNullable Class<?> valueType)
{
Class<?> cacheValueType = c.getValueType();
return cacheValueType.isAssignableFrom(valueType);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheType.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheType.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheType.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/CacheType.java Thu May 10 09:03:42 2007
@@ -1,21 +1,24 @@
+package org.apache.jcs.yajcache.core;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.core;
-
import org.apache.jcs.yajcache.soft.SoftRefCache;
import org.apache.jcs.yajcache.soft.SoftRefFileCache;
@@ -60,7 +63,7 @@
}
throw new UnsupportedOperationException("");
}
- /**
+ /**
* Returns true if cache of the given cache type can be used as
* cache of the current cache type;
* false otherwise.
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICache.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICache.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICache.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICache.java Thu May 10 09:03:42 2007
@@ -1,20 +1,23 @@
+package org.apache.jcs.yajcache.core;
+
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.core;
import java.util.Map;
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICacheSafe.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICacheSafe.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICacheSafe.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/ICacheSafe.java Thu May 10 09:03:42 2007
@@ -1,20 +1,23 @@
+package org.apache.jcs.yajcache.core;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.core;
import java.util.Map;
import org.apache.jcs.yajcache.lang.annotation.*;
@@ -83,7 +86,7 @@
*/
@ThreadSafety(
value=ThreadSafetyType.SAFE,
- caveat="The thread-safetyness of the given map cannot be guaranteed"
+ caveat="The thread-safetyness of the given map cannot be guaranteed"
+ " by this interface.",
note="The given values in the map is guaranteed to be thread-safe"
+ " only if the values are Java Beans."
@@ -119,7 +122,7 @@
*/
@ThreadSafety(
value=ThreadSafetyType.SAFE,
- caveat="The thread-safetyness of the given map cannot be guaranteed"
+ caveat="The thread-safetyness of the given map cannot be guaranteed"
+ " by this interface."
+ " Also, the thread-safetyness of the members of each value"
+ " in the map cannot be garanteed.",
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/SafeCacheWrapper.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/SafeCacheWrapper.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/SafeCacheWrapper.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/core/SafeCacheWrapper.java Thu May 10 09:03:42 2007
@@ -1,20 +1,23 @@
+package org.apache.jcs.yajcache.core;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.core;
import java.io.Serializable;
import java.util.Collection;
@@ -32,21 +35,21 @@
* @author Hanson Char
*/
@CopyRightApache
-public class SafeCacheWrapper<V> implements ICacheSafe<V>
+public class SafeCacheWrapper<V> implements ICacheSafe<V>
{
/** Underlying cache. */
private final @NonNullable ICache<V> cache;
-
+
private final CacheType cacheType;
-
- /**
- * Constructs a safe cache by wrapping an underlying cache.
+
+ /**
+ * Constructs a safe cache by wrapping an underlying cache.
* @param cache underlying cache.
*/
public SafeCacheWrapper(@NonNullable ICache<V> cache)
{
this.cache = cache;
-
+
switch(cache.getCacheType()) {
case SOFT_REFERENCE:
this.cacheType = CacheType.SOFT_REFERENCE_SAFE;
@@ -58,23 +61,23 @@
throw new AssertionError(this);
}
}
-
+
// ICache implementation by delegating to the underlying cache.
-
- public String getName() {
- return this.cache.getName();
+
+ public String getName() {
+ return this.cache.getName();
}
- public Class<V> getValueType() {
- return this.cache.getValueType();
+ public Class<V> getValueType() {
+ return this.cache.getValueType();
}
- public V get(String key) {
- return this.cache.get(key);
+ public V get(String key) {
+ return this.cache.get(key);
}
- public int size() {
- return this.cache.size();
+ public int size() {
+ return this.cache.size();
}
public boolean isEmpty() {
- return this.cache.isEmpty();
+ return this.cache.isEmpty();
}
public boolean containsKey(Object key) {
return this.cache.containsKey(key);
@@ -103,9 +106,9 @@
public Set<Map.Entry<String, V>> entrySet() {
return this.cache.entrySet();
}
-
+
// ICacheSafe implementation
-
+
public V getCopy(@NonNullable String key) {
V val = this.cache.get(key);
return this.dup(val);
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContent.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContent.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContent.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContent.java Thu May 10 09:03:42 2007
@@ -1,22 +1,24 @@
+package org.apache.jcs.yajcache.file;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.file;
-
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Arrays;
@@ -24,7 +26,7 @@
import org.apache.jcs.yajcache.lang.annotation.*;
/**
- * Cache File Content which represents the file persistence format
+ * Cache File Content which represents the file persistence format
* of a cache item.
*
*<pre>
@@ -48,18 +50,18 @@
private byte contentType;
private int contentLength;
private int contentHashCode;
-
+
private byte[] content;
-
+
protected CacheFileContent() {}
-
+
/**
* Constructs an instance of CacheFileContent from the given content type
* and content.
*/
private CacheFileContent(
@NonNullable CacheFileContentType contentType,
- @NonNullable byte[] content)
+ @NonNullable byte[] content)
{
this.contentType = contentType.toByte();
this.content = content;
@@ -107,12 +109,12 @@
public int getContentHashCode() {
return contentHashCode;
}
-
+
void setContentHashCode(int contentHashCode) {
this.contentHashCode = contentHashCode;
}
/**
- * Returns true iff the current hash code is consistent with
+ * Returns true iff the current hash code is consistent with
* the content.
*/
public boolean isValid() {
@@ -125,9 +127,9 @@
*/
@NonNullable
static CacheFileContent getInstance(
- @NonNullable CacheFileContentType contentType,
- @NonNullable byte[] content)
- throws IOException
+ @NonNullable CacheFileContentType contentType,
+ @NonNullable byte[] content)
+ throws IOException
{
return new CacheFileContent(contentType, content);
}
@@ -135,7 +137,7 @@
* Returns an instance of CacheFileContent from the given random access file;
*/
@NonNullable
- static CacheFileContent getInstance(@NonNullable RandomAccessFile raf)
+ static CacheFileContent getInstance(@NonNullable RandomAccessFile raf)
throws IOException
{
CacheFileContent cfc = new CacheFileContent();
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentCorrupted.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentCorrupted.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentCorrupted.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentCorrupted.java Thu May 10 09:03:42 2007
@@ -1,22 +1,24 @@
+package org.apache.jcs.yajcache.file;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.file;
-
import java.io.IOException;
import java.io.RandomAccessFile;
@@ -32,8 +34,8 @@
static CacheFileContentCorrupted inst = new CacheFileContentCorrupted();
private CacheFileContentCorrupted() {}
-
- @Override void write(@NonNullable RandomAccessFile raf) throws IOException
+
+ @Override void write(@NonNullable RandomAccessFile raf) throws IOException
{
}
@@ -61,7 +63,7 @@
@Override public int getContentHashCode() {
return 0;
}
-
+
@Override void setContentHashCode(int contentHashCode) {
}
@Override public boolean isValid() {
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentType.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentType.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentType.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileContentType.java Thu May 10 09:03:42 2007
@@ -1,22 +1,24 @@
+package org.apache.jcs.yajcache.file;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.file;
-
import java.io.Serializable;
import org.apache.commons.lang.SerializationUtils;
import org.apache.jcs.yajcache.lang.annotation.*;
@@ -46,11 +48,11 @@
throw new AssertionError(this);
}
}
- /**
- * Returns the corresponding CacheFileContentType enum instance
- * from the given byte value.
+ /**
+ * Returns the corresponding CacheFileContentType enum instance
+ * from the given byte value.
*/
-
+
public static @NonNullable CacheFileContentType fromByte(byte b) {
switch(b) {
case 0:
Modified: jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileDAO.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileDAO.java?view=diff&rev=536904&r1=536903&r2=536904
==============================================================================
--- jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileDAO.java (original)
+++ jakarta/jcs/trunk/sandbox/yajcache/src/org/apache/jcs/yajcache/file/CacheFileDAO.java Thu May 10 09:03:42 2007
@@ -1,22 +1,24 @@
+package org.apache.jcs.yajcache.file;
/*
- * Copyright 2005 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
+ * 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
+ * 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.
+ * 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.jcs.yajcache.file;
-
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
@@ -44,16 +46,16 @@
private AtomicInteger countCorruptMinLength = new AtomicInteger(0);
private AtomicInteger countCorruptLength = new AtomicInteger(0);
private AtomicInteger countCorruptInvalid = new AtomicInteger(0);
-
+
private Log log = LogFactory.getLog(this.getClass());
-
+
/**
* Writes the specified cache item into the file system.
*
* @return true if successful; false otherwise.
*/
public boolean writeCacheItem(
- @NonNullable String cacheName, @NonNullable CacheFileContentType type,
+ @NonNullable String cacheName, @NonNullable CacheFileContentType type,
@NonNullable String key, @NonNullable byte[] val)
{
File file = CacheFileUtils.inst.getCacheFile(cacheName, key);
@@ -81,22 +83,22 @@
}
/**
* Reads the byte array of a specified cache item from the file system.
- *
+ *
* @return the byte array of a specified cache item from the file system;
* or null if it doesn't exist;
* or CacheFileContent.CORRUPTED if file is corrupted.
*/
- public CacheFileContent readCacheItem(@NonNullable String cacheName, @NonNullable String key)
+ public CacheFileContent readCacheItem(@NonNullable String cacheName, @NonNullable String key)
{
File file = CacheFileUtils.inst.getCacheFile(cacheName, key);
-
+
if (!file.exists())
return null;
final long fileSize = file.length();
-
+
if (fileSize <= CacheFileContent.MIN_FILE_LENGTH) {
countCorruptMinLength.incrementAndGet();
- log.warn("Corrupted file which failed the minimum length condition for cacheName="
+ log.warn("Corrupted file which failed the minimum length condition for cacheName="
+ cacheName + " key=" + key);
return CacheFileContent.CORRUPTED;
}
@@ -104,13 +106,13 @@
try {
raf = new RandomAccessFile(file, "r");
CacheFileContent cfc = CacheFileContent.getInstance(raf);
-
+
if (cfc.isValid()) {
final int contentLength = (int)fileSize - CacheFileContent.MIN_FILE_LENGTH;
-
+
if (contentLength != cfc.getContentLength()) {
countCorruptLength.incrementAndGet();
- log.warn("Corrupted file with unexpected content length for cacheName="
+ log.warn("Corrupted file with unexpected content length for cacheName="
+ cacheName + " key=" + key);
return CacheFileContent.CORRUPTED;
}
@@ -118,7 +120,7 @@
else
{
countCorruptInvalid.incrementAndGet();
- log.warn("Corrupted file for cacheName=" + cacheName
+ log.warn("Corrupted file for cacheName=" + cacheName
+ " key=" + key);
return CacheFileContent.CORRUPTED;
}
@@ -152,7 +154,7 @@
return file.delete();
}
- @Override
+ @Override
public @NonNullable String toString() {
return ToStringBuilder.reflectionToString(this);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org