[jboss-cvs] JBossCache/src/org/jboss/cache/jmx ...

Brian Stansberry brian.stansberry at jboss.com
Wed May 9 14:28:55 EDT 2007


  User: bstansberry
  Date: 07/05/09 14:28:55

  Modified:    src/org/jboss/cache/jmx  CacheJmxWrapperMBean.java
  Log:
  [JBCACHE-1047] JMX wrappers allow explicit control of whether to control cache lifecycle
  
  Revision  Changes    Path
  1.4       +39 -1     JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapperMBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheJmxWrapperMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/jmx/CacheJmxWrapperMBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- CacheJmxWrapperMBean.java	4 Jan 2007 16:17:38 -0000	1.3
  +++ CacheJmxWrapperMBean.java	9 May 2007 18:28:55 -0000	1.4
  @@ -14,7 +14,7 @@
    * set of operations are exposed via JMX:
    * <p/>
    * <ol>
  - * <li> Lifecycle methods - create, start, stop, destroy</li>
  + * <li> {@link Lifecycle} methods - create, start, stop, destroy</li>
    * <li> Configuration (read-only) getter - which retrieves a String (or formatted HTML for web based JMX consoles) representation of the configuration</li>
    * <li> Setters for a specific subset of config elements which may be changed at runtime</li>
    * <li> Cache information methods (numNodes, numAttributes, lockInfo, printDetails) which print as Strings or as formatted HTML (for web based JMX consoles)</li>
  @@ -88,4 +88,42 @@
       * Default is <code>true</code>.
       */
      void setRegisterInterceptors(boolean register);
  +   
  +   /**
  +    * Gets whether this object should call through to the underlying
  +    * {@link Cache} when any of the {@link Lifecycle} methods are invoked.
  +    * <p>
  +    * The value returned from this method will be determined as follows:
  +    * 
  +    * <ol>
  +    * <li>If {@link #setManageCacheLifecycle(boolean)} has been called, the
  +    * provided value will be returned.</li>
  +    * <li>If a <code>Cache</code> has been injected into the object implementing
  +    * this interface, this method will return <code>false</code> (i.e. assume
  +    * whatever code injected the <code>Cache</code> will manage its lifecycle.)</li>
  +    * <li>If the object implementing this interface itself constructed the
  +    * <code>Cache</code> (using an injected <code>Configuration</code>), this 
  +    * method will return <code>true</code> (i.e. assume since we created
  +    * the <code>Cache</code> we will manage its lifecycle.)</li>
  +    * </ol>
  +    * </p>
  +    * 
  +    * @return   <code>true</code> if calls to the lifecycle methods will be 
  +    *           passed through to the underlying cache, <code>false</code>
  +    *           otherwise
  +    */
  +   boolean getManageCacheLifecycle();
  +   
  +   /**
  +    * Sets whether this object should call through to the underlying
  +    * {@link Cache} when any of the {@link Lifecycle} methods are invoked.
  +    * <p>
  +    * See {@link #getManageCacheLifecycle()} for an explanation of the
  +    * default values of this property.
  +    * 
  +    * @param manage <code>true</code> if calls to the lifecycle methods should
  +    *               be passed through to the underlying cache, <code>false</code>
  +    *               otherwise
  +    */
  +   void setManageCacheLifecycle(boolean manage);
   }
  
  
  



More information about the jboss-cvs-commits mailing list