[jboss-svn-commits] JBL Code SVN: r14643 - in labs/shotoku/trunk/shotoku-cache: cache-admin/src/web/WEB-INF and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 27 09:35:16 EDT 2007


Author: adamw
Date: 2007-08-27 09:35:16 -0400 (Mon, 27 Aug 2007)
New Revision: 14643

Modified:
   labs/shotoku/trunk/shotoku-cache/TODO
   labs/shotoku/trunk/shotoku-cache/build.xml
   labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/WEB-INF/web.xml
   labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.css
   labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.jsp
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItem.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java
   labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/monitor/RenewableCacheMonitorServiceMBean.java
Log:
Final touches

Modified: labs/shotoku/trunk/shotoku-cache/TODO
===================================================================
--- labs/shotoku/trunk/shotoku-cache/TODO	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/TODO	2007-08-27 13:35:16 UTC (rev 14643)
@@ -4,7 +4,6 @@
 * refreshing cachitem_info after alerts reset
 * check form-sending for cache item configuration
 * migrate AdministratedServices
-* service unavailability when stopped; null get() when CI unregistered
 * split RenewableCacheService into independent parts
 * generalize UpdateThreadData
 * cleanup with Tools

Modified: labs/shotoku/trunk/shotoku-cache/build.xml
===================================================================
--- labs/shotoku/trunk/shotoku-cache/build.xml	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/build.xml	2007-08-27 13:35:16 UTC (rev 14643)
@@ -7,7 +7,7 @@
 	<property name="jboss.lib" value="${jboss.home}/server/${jboss.conf}/lib" />
 	<property name="jboss.deploy" value="${jboss.home}/server/${jboss.conf}/deploy" />
 	
-	<property name="modules.list" value="cache-base,cache-service,cache-test" />
+	<property name="modules.list" value="cache-base,cache-service,cache-test,cache-admin" />
 
 	<!-- Configuration of source/ target directories -->
 	<property name="src" value="src"/>

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-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/WEB-INF/web.xml	2007-08-27 13:35:16 UTC (rev 14643)
@@ -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,7 @@
         </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>
@@ -78,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-admin/src/web/pages/admin.css
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.css	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.css	2007-08-27 13:35:16 UTC (rev 14643)
@@ -86,4 +86,10 @@
 
 .alert_panel {
 	margin-top: 5px;
+}
+
+.plain_text {
+	font-weight: normal;
+	color: black;
+	font-size: x-small;
 }
\ No newline at end of file

Modified: labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.jsp
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.jsp	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/cache-admin/src/web/pages/admin.jsp	2007-08-27 13:35:16 UTC (rev 14643)
@@ -193,7 +193,9 @@
 									<rich:dataList rendered="#{cacheItem.alerts != null}" styleClass="alert"
 										value="#{cacheItem.alerts}" var="alert">
 										<h:outputText value="#{alert.timeFormatted} (#{alert.key}) #{alert.description}" />
-										<h:outputText rendered="#{alert.cause != null}" value="Show cause" />
+										<h:panelGrid columns="1" rendered="#{alert.cause != null}">
+											<h:outputText styleClass="plain_text" value="#{alert.cause}" />
+										</h:panelGrid>
 									</rich:dataList>					
 								</h:panelGrid>
 							</rich:simpleTogglePanel>

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItem.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItem.java	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItem.java	2007-08-27 13:35:16 UTC (rev 14643)
@@ -35,11 +35,17 @@
 import java.util.concurrent.ConcurrentMap;
 
 /**
- * Extend this class if you want to store objects in a cache that
+ * Use this class if you want to store objects in a cache that
  * will be updated on a regular intervals of time, by a service daemon
  * thread. All data is held in one node of a {@link org.jboss.cache.TreeCache}.
+ * 
+ * Instances of this class can be obtained using the {@link #create(CacheItemDataSource)}
+ * and {@link #create(CacheItemDataSource, Fqn, String, long)} methods, provided a
+ * {@link CacheItemDataSource}.
+ * 
  * If a key is requested for the first time, it is initialized with the
- * {@link #init(Object)} method. Later, the {@link #update(Object, Object)} method
+ * {@link CacheItemDataSource#init(Object)} method. Later, the
+ * {@link CacheItemDataSource#update(Object, Object)} method
  * is called to (possibly) update the currently held value.
  * 
  * The cache item will be auto-registered in the service upon construction 
@@ -117,9 +123,10 @@
     
     /**
      * Creates and registeres a new cache item, with default parameter values (see
-     * {@link #RenewableCacheItem(Fqn, String, long, long)}): the fqn will be auto-generated,
+     * {@link #create(CacheItemDataSource, Fqn, String, long)}): the fqn will be auto-generated,
      * a default cache mbean name will be used, update will happen on each service thread
      * update and there will be no limit on the length of a key update.
+     * @param dataSource Data source from which the resulting cache item will read.
      */
     public static <K,T> CacheItemUser<K,T> create(CacheItemDataSource<K,T> dataSource) {
     	return create(dataSource, null, null, 0);
@@ -127,6 +134,8 @@
     
     /**
      * Creates and registeres a new cache item.
+     * 
+     * @param dataSource Data source from which the resulting cache item will read.
      *
      * @param fqn An fqn of the node in TreeCache, where data should be held. If it is null,
      * a unique fqn will be auto-generated for this cache item.

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/CacheItemDataSource.java	2007-08-27 13:35:16 UTC (rev 14643)
@@ -32,7 +32,7 @@
  * using the {@link #update(Object, Object)} method. How often the updates happen,
  * depends on the settings of the {@link RenewableCacheServiceMBean} and on
  * settings passed when creating the cache item
- * ({@link CacheItem#create(RenewableCacheItemDataSource, org.jboss.cache.Fqn, String, long)}).
+ * ({@link CacheItem#create(CacheItemDataSource, org.jboss.cache.Fqn, String, long)}).
  * @param <K> Type of keys in the cache. The keys
  * should bahave well as map keys (most probably, the hashCode() and
  * equals() methods should be overriden).

Modified: labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/monitor/RenewableCacheMonitorServiceMBean.java
===================================================================
--- labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/monitor/RenewableCacheMonitorServiceMBean.java	2007-08-27 13:24:00 UTC (rev 14642)
+++ labs/shotoku/trunk/shotoku-cache/cache-base/src/java/org/jboss/shotoku/cache/service/monitor/RenewableCacheMonitorServiceMBean.java	2007-08-27 13:35:16 UTC (rev 14643)
@@ -25,7 +25,7 @@
 import java.util.List;
 import java.util.Set;
 
-import org.jboss.shotoku.cache.CacheItemOperations;
+import org.jboss.shotoku.cache.*;
 import org.jboss.shotoku.cache.service.RenewableCacheServiceMBean;
 
 /**
@@ -55,7 +55,7 @@
 	public int getMaximumNumberOfAlerts();
 	/**
 	 * 
-	 * @param Maximum number of alerts stored. After this number is exceeded, no new alerts
+	 * @param maximumNumberOfAlerts Maximum number of alerts stored. After this number is exceeded, no new alerts
 	 * are recorded.
 	 */
 	public void setMaximumNumberOfAlerts(int maximumNumberOfAlerts);
@@ -80,7 +80,7 @@
     
     /**
      * 
-     * @param rcid {@link CacheItem} for which to get alerts.
+     * @param rcid {@link CacheItem}} for which to get alerts.
      * @return A list of alerts for the given {@link CacheItem}, sorted from the
      * newest alert, or null is there are no alerts for the given cache item.
      */




More information about the jboss-svn-commits mailing list