[jboss-svn-commits] JBL Code SVN: r14408 - in labs/shotoku/trunk/shotoku-cache: cache-admin/src/java/org/jboss/shotoku/cache/admin and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Aug 21 02:39:45 EDT 2007


Author: adamw
Date: 2007-08-21 02:39:45 -0400 (Tue, 21 Aug 2007)
New Revision: 14408

Modified:
   labs/shotoku/trunk/shotoku-cache/build.xml
   labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/AdminBean.java
   labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/CacheItemBean.java
   labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/WEB-INF/web.xml
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/DummyRenewableCacheService.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/RenewableCacheServiceMBean.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/KeyValue.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Pair.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Triple.java
   labs/shotoku/trunk/shotoku-cache/cache-service/src/java/org/jboss/shotoku/cache/service/RenewableCacheService.java
Log:
Fixing build

Modified: labs/shotoku/trunk/shotoku-cache/build.xml
===================================================================
--- labs/shotoku/trunk/shotoku-cache/build.xml	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/build.xml	2007-08-21 06:39:45 UTC (rev 14408)
@@ -2,7 +2,7 @@
 
 <project name="Shotoku Cache" default="build" basedir=".">
 	<!-- Configuration of deployment -->
-	<property name="jboss.home" value="/home/adamw/jboss/jboss-cache" />
+	<property name="jboss.home" value="/Users/adamwarski/jboss/jboss-cache" />
 	<property name="jboss.conf" value="default" />
 	<property name="jboss.lib" value="${jboss.home}/server/${jboss.conf}/lib" />
 	<property name="jboss.deploy" value="${jboss.home}/server/${jboss.conf}/deploy" />
@@ -34,7 +34,7 @@
 	<!-- Helper tasks -->
 	<taskdef resource="net/sf/antcontrib/antlib.xml">
 	  <classpath>
-	    <pathelement location="/home/adamw/shotoku/shotoku-cache/lib/ant-contrib/ant-contrib-1.0b3.jar"/>
+	    <pathelement location="${basedir}/lib/ant-contrib/ant-contrib-1.0b3.jar"/>
 	  </classpath>
 	</taskdef>
 	

Modified: labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/AdminBean.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/AdminBean.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/AdminBean.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -45,7 +45,7 @@
 	public List<CacheItemBean> getCacheItems() {
 		if (cacheItems == null) {
 			cacheItems = new ArrayList<CacheItemBean>();
-			for (RenewableCacheItemData cacheItemData : getService().getCacheItemsData()) {
+			for (RenewableCacheItemData<?> cacheItemData : getService().getCacheItemsData()) {
 				cacheItems.add(new CacheItemBean(cacheItemData, getService()));
 			}
 		}

Modified: labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/CacheItemBean.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/CacheItemBean.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-admin/src/java/org/jboss/shotoku/cache/admin/CacheItemBean.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -10,20 +10,19 @@
 import org.jboss.shotoku.cache.service.RenewableCacheServiceMBean;
 
 public class CacheItemBean {
-	private RenewableCacheItemData cacheItem;
+	private RenewableCacheItemData<?> cacheItem;
 	private List<? extends Object> keysDuringUpdate;
 	private List<? extends Object> keysNotDuringUpdate;
 	private Map<Object, Long> keysUpdatesAgo;
 	private RenewableCacheServiceMBean service;
 	
-	@SuppressWarnings("unchecked")
-	public CacheItemBean(RenewableCacheItemData cacheItem, RenewableCacheServiceMBean service) {
+	public CacheItemBean(RenewableCacheItemData<?> cacheItem, RenewableCacheServiceMBean service) {
 		this.cacheItem = cacheItem;
 		this.service = service;
 
 		keysDuringUpdate = new ArrayList<Object>(cacheItem.getKeysDuringUpdate());
 		
-		Map<Object, Long> keysUpdates = cacheItem.getKeysUpdates();		
+		Map<?, Long> keysUpdates = cacheItem.getKeysUpdates();		
 		long now = System.currentTimeMillis();
 		keysUpdatesAgo = new HashMap<Object, Long>();
 		for (Object key : keysUpdates.keySet()) {

Modified: labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/WEB-INF/web.xml
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/WEB-INF/web.xml	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/WEB-INF/web.xml	2007-08-21 06:39:45 UTC (rev 14408)
@@ -57,7 +57,7 @@
         <dispatcher>INCLUDE</dispatcher>
     </filter-mapping>
     
-    <!-- Filter for development 
+    <!-- Filter for development -->
     <filter>
         <filter-name>filesFromRepoFilter</filter-name>
         <filter-class>org.jboss.shotoku.cache.admin.WebFilesystemFilter</filter-class>
@@ -67,7 +67,8 @@
         </init-param>
         <init-param>
             <param-name>realDir</param-name>
-            <param-value>/home/adamw/shotoku/shotoku-cache/cache-admin/src/web/pages</param-value>
+            <!-- <param-value>/home/adamw/shotoku/shotoku-cache/cache-admin/src/web/pages</param-value> -->
+            <param-value>/Users/adamwarski/shotoku/shotoku-cache/cache-admin/src/web/pages</param-value>
         </init-param>
     </filter>
 
@@ -77,7 +78,7 @@
         <dispatcher>INCLUDE</dispatcher>
         <dispatcher>FORWARD</dispatcher>
         <dispatcher>REQUEST</dispatcher>
-    </filter-mapping>-->
+    </filter-mapping>
 
 	<!-- Listener, that does all the startup work (configuration, init). -->
 	<listener>

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/DummyRenewableCacheService.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/DummyRenewableCacheService.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/DummyRenewableCacheService.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -58,7 +58,7 @@
 	public void put(Fqn fqn, Object key, Object o) throws CacheException {
 	}
 
-	public void register(RenewableCacheItem cacheItem) {
+	public void register(RenewableCacheItem<?,?> cacheItem) {
 	}
 
 	public void remove(Fqn fqn, Object key) throws CacheException {
@@ -82,13 +82,13 @@
 	public void stop() {
 	}
 
-	public void unregister(RenewableCacheItem cacheItem) throws CacheException {
+	public void unregister(RenewableCacheItem<?,?> cacheItem) throws CacheException {
 	}
 
 	public void update() {
 	}
 
-	public Set<? extends RenewableCacheItemData> getCacheItemsData() {
+	public Set<? extends RenewableCacheItemData<?>> getCacheItemsData() {
 		return null;
 	}
 

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/RenewableCacheServiceMBean.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/RenewableCacheServiceMBean.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/RenewableCacheServiceMBean.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -40,8 +40,8 @@
     public void put(Fqn fqn, Object key, Object o) throws CacheException;
     public void remove(Fqn fqn, Object key) throws CacheException;
     
-    public void register(RenewableCacheItem cacheItem);
-    public void unregister(RenewableCacheItem cacheItem) throws CacheException;
+    public void register(RenewableCacheItem<?,?> cacheItem);
+    public void unregister(RenewableCacheItem<?,?> cacheItem) throws CacheException;
 
     public Fqn generateNextFqn();
 
@@ -62,7 +62,7 @@
 	public int getUpdateThreadCount();
     public void setUpdateThreadCount(int n);
     
-    public Set<? extends RenewableCacheItemData> getCacheItemsData();
+    public Set<? extends RenewableCacheItemData<?>> getCacheItemsData();
     
     public void update();
     

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/KeyValue.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/KeyValue.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/KeyValue.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -48,7 +48,7 @@
 
     public boolean equals(Object o) {
         if (o instanceof KeyValue) {
-            KeyValue p = (KeyValue) o;
+            KeyValue<?,?> p = (KeyValue) o;
             return p.getFirst().equals(obj1);
         }
 

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Pair.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Pair.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Pair.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -47,7 +47,7 @@
 
     public boolean equals(Object o) {
         if (o instanceof Pair) {
-            Pair p = (Pair) o;
+            Pair<?,?> p = (Pair) o;
             return p.getFirst().equals(obj1) && p.getSecond().equals(obj2);
         }
 

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Triple.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Triple.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/tools/Triple.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -54,7 +54,7 @@
 
     public boolean equals(Object o) {
         if (o instanceof Triple) {
-            Triple t = (Triple) o;
+            Triple<?,?,?> t = (Triple) o;
             return t.getFirst().equals(obj1) && t.getSecond().equals(obj2)
                     && t.getThird().equals(obj3);
         }

Modified: labs/shotoku/trunk/shotoku-cache/cache-service/src/java/org/jboss/shotoku/cache/service/RenewableCacheService.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-service/src/java/org/jboss/shotoku/cache/service/RenewableCacheService.java	2007-08-21 05:53:48 UTC (rev 14407)
+++ labs/shotoku/trunk/shotoku-cache/cache-service/src/java/org/jboss/shotoku/cache/service/RenewableCacheService.java	2007-08-21 06:39:45 UTC (rev 14408)
@@ -150,8 +150,8 @@
      * Cache handling
      */
 
-    private final ConcurrentSet<RenewableCacheItem> cacheItems =
-            new ConcurrentHashSet<RenewableCacheItem>();
+    private final ConcurrentSet<RenewableCacheItem<?,?>> cacheItems =
+            new ConcurrentHashSet<RenewableCacheItem<?,?>>();
 
 	public Object get(Fqn fqn, Object key) throws CacheException {
 		return treeCache.get(fqn, key);
@@ -165,11 +165,11 @@
 		treeCache.remove(fqn, key);
 	}
 
-    public void register(RenewableCacheItem cacheItem) {
+    public void register(RenewableCacheItem<?,?> cacheItem) {
         cacheItems.add(cacheItem);
     }
     
-    public void unregister(RenewableCacheItem cacheItem) throws CacheException {
+    public void unregister(RenewableCacheItem<?,?> cacheItem) throws CacheException {
     	cacheItems.remove(cacheItem);
     	
     	for (Object key : cacheItem.getKeysUpdates().keySet()) {
@@ -177,7 +177,7 @@
     	}
     }
    
-    public Set<? extends RenewableCacheItemData> getCacheItemsData() {
+    public Set<? extends RenewableCacheItemData<?>> getCacheItemsData() {
 		return cacheItems;
 	}
 
@@ -233,7 +233,7 @@
 	 */
 
     public void update() {
-        for (RenewableCacheItem sci : cacheItems) {
+        for (RenewableCacheItem<?,?> sci : cacheItems) {
             try {
                 sci.update();
             } catch (Throwable t) {




More information about the jboss-svn-commits mailing list