Modified: 
river/jtsk/modules/modularize/apache-river/river-destroy/src/main/java/org/apache/river/start/destroy/DestroySharedGroup.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-destroy/src/main/java/org/apache/river/start/destroy/DestroySharedGroup.java?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- 
river/jtsk/modules/modularize/apache-river/river-destroy/src/main/java/org/apache/river/start/destroy/DestroySharedGroup.java
 (original)
+++ 
river/jtsk/modules/modularize/apache-river/river-destroy/src/main/java/org/apache/river/start/destroy/DestroySharedGroup.java
 Sun Jul  5 11:41:39 2020
@@ -1,323 +1,329 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.river.start;
-
-import org.apache.river.start.SharedActivatableServiceDescriptor.Created;
-import net.jini.config.Configuration;
-import net.jini.config.ConfigurationProvider;
-import net.jini.config.ConfigurationException;
-
-import java.io.File;
-import java.rmi.activation.ActivationSystem;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Arrays;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.Subject;
-
-import org.apache.river.system.FileSystem;
-
-/**
- * This class contains the command-line interface for
- * destroying an instance of a shared activation group.
- *
- * The following items are discussed below:
- * <ul>
- * <li><a href="#configEntries">Configuring DestroySharedGroup</a>
- * <li><a href="#logging">Logging</a>
- * </ul>
- *
- * <a name="configEntries">
- * <h3>Configuring DestroySharedGroup</h3>
- * </a>
- *
- * This implementation of <code>DestroySharedGroup</code> supports the
- * following configuration entries, with component
- * <code>org.apache.river.start</code>:
- *
- *   <table summary="Describes the activationSystemPreparer configuration
- *          entry"
- *          border="0" cellpadding="2">
- *     <tr valign="top">
- *       <th scope="col" summary="layout"> <font size="+1">&#X2022;</font>
- *       <th scope="col" align="left" colspan="2"> <font size="+1"><code>
- *       activationSystemPreparer</code></font>
- *     <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *       Type: <td> {@link net.jini.security.ProxyPreparer}
- *     <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *       Default: <td> <code>
- *         new {@link net.jini.security.BasicProxyPreparer}()</code>
- *     <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *       Description: <td> The proxy preparer for the proxy for the
- *       activation system. The value should not be <code>null</code>. This
- *       entry is obtained at service start and restart. This entry is only
- *       used by the activatable implementation. <p>
- * 
- *       The service calls the {@link
- *       java.rmi.activation.ActivationSystem#unregisterObject
- *       unregisterObject} method on the {@link
- *       java.rmi.activation.ActivationSystem} when there is a problem
- *       creating a service.
- *   </table>
- *
- *   <table summary="Describes the loginContext configuration entry"
- *     border="0" cellpadding="2">
- *   <tr valign="top">
- *     <th scope="col" summary="layout"> <font size="+1">&#X2022;</font>
- *     <th scope="col" align="left" colspan="2"> <font size="+1"><code>
- *   loginContext</code></font>
- *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *     Type: <td> {@link javax.security.auth.login.LoginContext}
- *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *     Default: <td> <code>null</code>
- *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *     Description: <td> If not <code>null</code>, specifies the JAAS
- *     login context to use for performing a JAAS login and supplying the
- *     {@link javax.security.auth.Subject} to use when running the
- *     services starter. If <code>null</code>, no JAAS login is performed. 
- *   </table>
- *
- * <table summary="Describes the serviceDestructors configuration entry"
- *       border="0" cellpadding="2">
- *   <tr valign="top">
- *     <th scope="col" summary="layout"> <font size="+1">&#X2022;</font>
- *     <th scope="col" align="left" colspan="2"> <font size="+1"><code>
- *      serviceDestructors</code></font>
- *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *     Type: <td> {@link ServiceDescriptor}[]
- *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *     Default: no default
- *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
- *     Description: <td> Array of service descriptors to start.
- * </table>
- *
- *
- *<a name="logging">
- *<h3>Loggers and Logging Levels</h3>
- *</a>
- *
- *The DestroySharedGroup service implementation uses the {@link
- *java.util.logging.Logger}, named 
- * <code>org.apache.river.start.service.starter</code>. 
- *The following table describes the
- *type of information logged as well as the levels of information logged.
- *<p>
- *
- *  <table border="1" cellpadding="5"
- *      summary="Describes logging performed by service.starter at different
- *      logging levels">
- *
- *  <caption halign="center" valign="top"><b><code>
- *        org.apache.river.start.service.starter</code></b></caption>
- *
- *  <tr> <th scope="col"> Level <th scope="col"> Description
- *
- *  <tr> <td> {@link java.util.logging.Level#SEVERE SEVERE} <td> 
- *    for problems that prevent service destruction from proceeding
- *  <tr> <td> {@link java.util.logging.Level#WARNING WARNING} <td> 
- *    for problems with service destruction that don't prevent further
- *    processing
- *  <tr> <td> {@link java.util.logging.Level#FINER FINER} <td> 
- *    for high level
- *    service destruction operation tracing
- *  <tr> <td> {@link java.util.logging.Level#FINEST FINEST} <td> 
- *    for low level
- *    service destruction operation tracing
- *
- *  </table> <p>
- * 
- * @author Sun Microsystems, Inc.
- *
- * @see org.apache.river.start.ServiceStarter
- *
- * @since 1.2 
- */
-public class DestroySharedGroup {
-
-    /** Configure logger. */
-    private static final Logger logger = ServiceStarter.logger;
-
-    // Private constructor to prevent instantiation
-    private DestroySharedGroup() { }
-
-    /**
-     * The main method for the <code>DestroySharedGroup</code> application.
-     * The <code>args</code> parameter is passed directly to 
-     * <code>ConfigurationProvider.getInstance()</code> in order to 
-     * obtain a <code>Configuration</code> object. This configuration 
-     * object is then queried for a 
-     * <code>org.apache.river.start.serviceDestructors</code> entry, which
-     * is assumed to be a <code>SharedActivatableServiceDescriptor[]</code>
-     * configured to run {@link org.apache.river.start.SharedGroup} 
implementations.
-     * The {@link org.apache.river.start.SharedGroup#destroyVM() destroyVM()} 
-     * method is then called on each of the array elements. An attempt is
-     * made to also delete shared group <code>log</code> directory associated
-     * with each array element.
-     * @param args <code>String[]</code> passed to 
-     *             <code>ConfigurationProvider.getInstance()</code> in order
-     *             to obtain a <code>Configuration</code> object.
-     *
-     * @see ServiceDescriptor
-     * @see SharedActivatableServiceDescriptor
-     * @see net.jini.config.Configuration
-     * @see net.jini.config.ConfigurationProvider
-     *
-     */
-    public static void main(String[] args) { 
-       ServiceStarter.ensureSecurityManager();
-        logger.entering(DestroySharedGroup.class.getName(), "main", 
-           ((Object[])args));
-       try {
-            Configuration config = ConfigurationProvider.getInstance(args);
-            ServiceDescriptor[] srvArray =
-                (ServiceDescriptor[])config.getEntry(
-                    ServiceStarter.START_PACKAGE, "serviceDestructors",
-                    ServiceDescriptor[].class, null);
-            if (srvArray == null || srvArray.length == 0) {
-                logger.log(Level.WARNING, "service.config.empty");
-                return;
-            }
-            LoginContext loginContext =  (LoginContext)
-                config.getEntry(ServiceStarter.START_PACKAGE, "loginContext",
-                    LoginContext.class, null);
-            if (loginContext != null)
-                destroyWithLogin(srvArray, config, loginContext);
-            else
-                destroy(srvArray, config);
-       } catch (ConfigurationException ce) {
-           logger.log(Level.SEVERE, "destroy.config.exception", ce);
-       } catch (Exception e) {
-           logger.log(Level.SEVERE, "destroy.unexpected.exception", e);
-       }
-        logger.exiting(DestroySharedGroup.class.getName(), "main");
-    }
-    
-    /**
-     * Method that attempts to destroy any available <code>SharedGroup</code>
-     * objects in the provided <code>ServiceDescriptor[]</code>. 
-     */
-    private static void destroy(ServiceDescriptor[] srvArray, 
-        Configuration config) throws Exception
-    {
-        logger.entering(DestroySharedGroup.class.getName(), "destroy", 
-           new Object[] {Arrays.asList(srvArray), config} );
-       Created created = null;
-        SharedActivatableServiceDescriptor desc = null;
-       ActivationSystem activationSystem = null;
-           
-        for (int i=0; i < srvArray.length; i++) {
-           if (srvArray[i] instanceof SharedActivatableServiceDescriptor) {
-                desc = (SharedActivatableServiceDescriptor)srvArray[i];
-               activationSystem = 
-                   ServiceStarter.getActivationSystem(
-                       desc.getActivationSystemHost(), 
-                       desc.getActivationSystemPort(), 
-                       config);
-               try {
-                    created = (Created)desc.create(config);
-                   if (created != null &&
-                       created.proxy instanceof SharedGroup) {
-                       // service proxy from create() is already prepared
-                       SharedGroup sg = (SharedGroup)created.proxy;
-                       try {
-                           sg.destroyVM();
-                           try { 
-                               File log = new File(desc.getSharedGroupLog());
-                                FileSystem.destroy(log, true); 
-                           } catch (Exception e) {
-                                logger.log(Level.WARNING, 
-                                   "destroy.group.deletion", e);
-                           }
-                       } catch (Exception e ) {
-                            logger.log(Level.SEVERE, 
-                               "destroy.group.exception", e);
-//TODO - Add configurable retry logic or just unregister                       
        
-                       }
-                   } else {
-                        logger.log(Level.WARNING, "destroy.unexpected.proxy",
-                          (created==null)?null:created.proxy);
-                       if (created != null && created.aid != null) {
-                           try { 
-                               activationSystem.unregisterObject(created.aid);
-                           } catch (Exception e) {
-                                logger.log(Level.WARNING, 
-                                   "destroy.unregister.exception", e) ;
-                           }
-                       }
-                   }
-               } catch (Exception ee) {
-                    logger.log(Level.SEVERE, "destroy.creation.exception", ee);
-                   if (created != null && created.aid != null) {
-                       try { 
-                           activationSystem.unregisterObject(created.aid);
-                       } catch (Exception e) {
-                            logger.log(Level.WARNING, 
-                               "destroy.unregister.exception", ee) ;
-                       }
-                   }
-                }
-           } else {
-                logger.log(Level.WARNING, "destroy.unexpected.type", 
srvArray[i]);
-           }
-        }
-        logger.exiting(DestroySharedGroup.class.getName(), "destroy");
-    }
-    
-    /**
-     * Method that attempts to login via the provided 
-     * <code>LoginContext</code> and then calls <code>destroy</code>.
-     */
-    private static void destroyWithLogin(
-        final ServiceDescriptor[] descs, final Configuration config,
-       final LoginContext loginContext) throws Exception
-    {
-        logger.entering(DestroySharedGroup.class.getName(),
-            "destroyWithLogin", new Object[] {descs, config, loginContext});
-       loginContext.login();
-       try {
-           Subject.doAsPrivileged(
-               loginContext.getSubject(),
-                new PrivilegedExceptionAction() {
-                    public Object run() throws Exception
-                    {
-                        destroy(descs, config);
-                       return null;
-                    }
-                 },
-                 null);
-        } catch (PrivilegedActionException e) {
-           throw e.getException();
-       } finally {
-            try {
-                loginContext.logout();
-           } catch (LoginException le) {
-               logger.log(Level.FINE, "service.logout.exception", le);
-           }
-        }
-        logger.exiting(DestroySharedGroup.class.getName(),
-            "destroyWithLogin");
-        return;
-    }   
-}
-
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.river.start.destroy;
+
+import org.apache.river.start.SharedActivatableServiceDescriptor;
+import org.apache.river.start.SharedActivatableServiceDescriptor.Created;
+import org.apache.river.start.group.SharedGroup;
+
+import net.jini.config.Configuration;
+import net.jini.config.ConfigurationProvider;
+import net.jini.config.ConfigurationException;
+
+import java.io.File;
+import java.rmi.activation.ActivationSystem;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Arrays;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.Subject;
+
+import org.apache.river.system.FileSystem;
+import org.apache.river.start.ServiceStarter;
+import org.apache.river.start.ServiceDescriptor;
+
+
+/**
+ * This class contains the command-line interface for
+ * destroying an instance of a shared activation group.
+ *
+ * The following items are discussed below:
+ * <ul>
+ * <li><a href="#configEntries">Configuring DestroySharedGroup</a>
+ * <li><a href="#logging">Logging</a>
+ * </ul>
+ *
+ * <a name="configEntries">
+ * <h3>Configuring DestroySharedGroup</h3>
+ * </a>
+ *
+ * This implementation of <code>DestroySharedGroup</code> supports the
+ * following configuration entries, with component
+ * <code>org.apache.river.start</code>:
+ *
+ *   <table summary="Describes the activationSystemPreparer configuration
+ *          entry"
+ *          border="0" cellpadding="2">
+ *     <tr valign="top">
+ *       <th scope="col" summary="layout"> <font size="+1">&#X2022;</font>
+ *       <th scope="col" align="left" colspan="2"> <font size="+1"><code>
+ *       activationSystemPreparer</code></font>
+ *     <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *       Type: <td> {@link net.jini.security.ProxyPreparer}
+ *     <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *       Default: <td> <code>
+ *         new {@link net.jini.security.BasicProxyPreparer}()</code>
+ *     <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *       Description: <td> The proxy preparer for the proxy for the
+ *       activation system. The value should not be <code>null</code>. This
+ *       entry is obtained at service start and restart. This entry is only
+ *       used by the activatable implementation. <p>
+ * 
+ *       The service calls the {@link
+ *       java.rmi.activation.ActivationSystem#unregisterObject
+ *       unregisterObject} method on the {@link
+ *       java.rmi.activation.ActivationSystem} when there is a problem
+ *       creating a service.
+ *   </table>
+ *
+ *   <table summary="Describes the loginContext configuration entry"
+ *     border="0" cellpadding="2">
+ *   <tr valign="top">
+ *     <th scope="col" summary="layout"> <font size="+1">&#X2022;</font>
+ *     <th scope="col" align="left" colspan="2"> <font size="+1"><code>
+ *   loginContext</code></font>
+ *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *     Type: <td> {@link javax.security.auth.login.LoginContext}
+ *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *     Default: <td> <code>null</code>
+ *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *     Description: <td> If not <code>null</code>, specifies the JAAS
+ *     login context to use for performing a JAAS login and supplying the
+ *     {@link javax.security.auth.Subject} to use when running the
+ *     services starter. If <code>null</code>, no JAAS login is performed. 
+ *   </table>
+ *
+ * <table summary="Describes the serviceDestructors configuration entry"
+ *       border="0" cellpadding="2">
+ *   <tr valign="top">
+ *     <th scope="col" summary="layout"> <font size="+1">&#X2022;</font>
+ *     <th scope="col" align="left" colspan="2"> <font size="+1"><code>
+ *      serviceDestructors</code></font>
+ *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *     Type: <td> {@link ServiceDescriptor}[]
+ *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *     Default: no default
+ *   <tr valign="top"> <td> &nbsp <th scope="row" align="right">
+ *     Description: <td> Array of service descriptors to start.
+ * </table>
+ *
+ *
+ *<a name="logging">
+ *<h3>Loggers and Logging Levels</h3>
+ *</a>
+ *
+ *The DestroySharedGroup service implementation uses the {@link
+ *java.util.logging.Logger}, named 
+ * <code>org.apache.river.start.service.starter</code>. 
+ *The following table describes the
+ *type of information logged as well as the levels of information logged.
+ *<p>
+ *
+ *  <table border="1" cellpadding="5"
+ *      summary="Describes logging performed by service.starter at different
+ *      logging levels">
+ *
+ *  <caption halign="center" valign="top"><b><code>
+ *        org.apache.river.start.service.starter</code></b></caption>
+ *
+ *  <tr> <th scope="col"> Level <th scope="col"> Description
+ *
+ *  <tr> <td> {@link java.util.logging.Level#SEVERE SEVERE} <td> 
+ *    for problems that prevent service destruction from proceeding
+ *  <tr> <td> {@link java.util.logging.Level#WARNING WARNING} <td> 
+ *    for problems with service destruction that don't prevent further
+ *    processing
+ *  <tr> <td> {@link java.util.logging.Level#FINER FINER} <td> 
+ *    for high level
+ *    service destruction operation tracing
+ *  <tr> <td> {@link java.util.logging.Level#FINEST FINEST} <td> 
+ *    for low level
+ *    service destruction operation tracing
+ *
+ *  </table> <p>
+ * 
+ * @author Sun Microsystems, Inc.
+ *
+ * @see org.apache.river.start.ServiceStarter
+ *
+ * @since 1.2 
+ */
+public class DestroySharedGroup {
+
+    /** Configure logger. */
+    private static final Logger logger = ServiceStarter.logger;
+
+    // Private constructor to prevent instantiation
+    private DestroySharedGroup() { }
+
+    /**
+     * The main method for the <code>DestroySharedGroup</code> application.
+     * The <code>args</code> parameter is passed directly to 
+     * <code>ConfigurationProvider.getInstance()</code> in order to 
+     * obtain a <code>Configuration</code> object. This configuration 
+     * object is then queried for a 
+     * <code>org.apache.river.start.serviceDestructors</code> entry, which
+     * is assumed to be a <code>SharedActivatableServiceDescriptor[]</code>
+     * configured to run {@link org.apache.river.start.SharedGroup} 
implementations.
+     * The {@link org.apache.river.start.SharedGroup#destroyVM() destroyVM()} 
+     * method is then called on each of the array elements. An attempt is
+     * made to also delete shared group <code>log</code> directory associated
+     * with each array element.
+     * @param args <code>String[]</code> passed to 
+     *             <code>ConfigurationProvider.getInstance()</code> in order
+     *             to obtain a <code>Configuration</code> object.
+     *
+     * @see ServiceDescriptor
+     * @see SharedActivatableServiceDescriptor
+     * @see net.jini.config.Configuration
+     * @see net.jini.config.ConfigurationProvider
+     *
+     */
+    public static void main(String[] args) { 
+       ServiceStarter.ensureSecurityManager();
+        logger.entering(DestroySharedGroup.class.getName(), "main", 
+           ((Object[])args));
+       try {
+            Configuration config = ConfigurationProvider.getInstance(args);
+            ServiceDescriptor[] srvArray =
+                (ServiceDescriptor[])config.getEntry(
+                    ServiceStarter.START_PACKAGE, "serviceDestructors",
+                    ServiceDescriptor[].class, null);
+            if (srvArray == null || srvArray.length == 0) {
+                logger.log(Level.WARNING, "service.config.empty");
+                return;
+            }
+            LoginContext loginContext =  (LoginContext)
+                config.getEntry(ServiceStarter.START_PACKAGE, "loginContext",
+                    LoginContext.class, null);
+            if (loginContext != null)
+                destroyWithLogin(srvArray, config, loginContext);
+            else
+                destroy(srvArray, config);
+       } catch (ConfigurationException ce) {
+           logger.log(Level.SEVERE, "destroy.config.exception", ce);
+       } catch (Exception e) {
+           logger.log(Level.SEVERE, "destroy.unexpected.exception", e);
+       }
+        logger.exiting(DestroySharedGroup.class.getName(), "main");
+    }
+    
+    /**
+     * Method that attempts to destroy any available <code>SharedGroup</code>
+     * objects in the provided <code>ServiceDescriptor[]</code>. 
+     */
+    private static void destroy(ServiceDescriptor[] srvArray, 
+        Configuration config) throws Exception
+    {
+        logger.entering(DestroySharedGroup.class.getName(), "destroy", 
+           new Object[] {Arrays.asList(srvArray), config} );
+       Created created = null;
+        SharedActivatableServiceDescriptor desc = null;
+       ActivationSystem activationSystem = null;
+           
+        for (int i=0; i < srvArray.length; i++) {
+           if (srvArray[i] instanceof SharedActivatableServiceDescriptor) {
+                desc = (SharedActivatableServiceDescriptor)srvArray[i];
+               activationSystem = 
+                   ServiceStarter.getActivationSystem(
+                       desc.getActivationSystemHost(), 
+                       desc.getActivationSystemPort(), 
+                       config);
+               try {
+                    created = (Created)desc.create(config);
+                   if (created != null &&
+                       created.proxy instanceof SharedGroup) {
+                       // service proxy from create() is already prepared
+                       SharedGroup sg = (SharedGroup)created.proxy;
+                       try {
+                           sg.destroyVM();
+                           try { 
+                               File log = new File(desc.getSharedGroupLog());
+                                FileSystem.destroy(log, true); 
+                           } catch (Exception e) {
+                                logger.log(Level.WARNING, 
+                                   "destroy.group.deletion", e);
+                           }
+                       } catch (Exception e ) {
+                            logger.log(Level.SEVERE, 
+                               "destroy.group.exception", e);
+//TODO - Add configurable retry logic or just unregister                       
        
+                       }
+                   } else {
+                        logger.log(Level.WARNING, "destroy.unexpected.proxy",
+                          (created==null)?null:created.proxy);
+                       if (created != null && created.aid != null) {
+                           try { 
+                               activationSystem.unregisterObject(created.aid);
+                           } catch (Exception e) {
+                                logger.log(Level.WARNING, 
+                                   "destroy.unregister.exception", e) ;
+                           }
+                       }
+                   }
+               } catch (Exception ee) {
+                    logger.log(Level.SEVERE, "destroy.creation.exception", ee);
+                   if (created != null && created.aid != null) {
+                       try { 
+                           activationSystem.unregisterObject(created.aid);
+                       } catch (Exception e) {
+                            logger.log(Level.WARNING, 
+                               "destroy.unregister.exception", ee) ;
+                       }
+                   }
+                }
+           } else {
+                logger.log(Level.WARNING, "destroy.unexpected.type", 
srvArray[i]);
+           }
+        }
+        logger.exiting(DestroySharedGroup.class.getName(), "destroy");
+    }
+    
+    /**
+     * Method that attempts to login via the provided 
+     * <code>LoginContext</code> and then calls <code>destroy</code>.
+     */
+    private static void destroyWithLogin(
+        final ServiceDescriptor[] descs, final Configuration config,
+       final LoginContext loginContext) throws Exception
+    {
+        logger.entering(DestroySharedGroup.class.getName(),
+            "destroyWithLogin", new Object[] {descs, config, loginContext});
+       loginContext.login();
+       try {
+           Subject.doAsPrivileged(
+               loginContext.getSubject(),
+                new PrivilegedExceptionAction() {
+                    public Object run() throws Exception
+                    {
+                        destroy(descs, config);
+                       return null;
+                    }
+                 },
+                 null);
+        } catch (PrivilegedActionException e) {
+           throw e.getException();
+       } finally {
+            try {
+                loginContext.logout();
+           } catch (LoginException le) {
+               logger.log(Level.FINE, "service.logout.exception", le);
+           }
+        }
+        logger.exiting(DestroySharedGroup.class.getName(),
+            "destroyWithLogin");
+        return;
+    }   
+}
+
+

Modified: 
river/jtsk/modules/modularize/apache-river/river-discovery-providers/pom.xml
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-discovery-providers/pom.xml?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- 
river/jtsk/modules/modularize/apache-river/river-discovery-providers/pom.xml 
(original)
+++ 
river/jtsk/modules/modularize/apache-river/river-discovery-providers/pom.xml 
Sun Jul  5 11:41:39 2020
@@ -1,224 +1,216 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-~ Copyright (C) 2014 the original author or authors.
-~
-~ 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
-~
-~ 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://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache</groupId>
-        <artifactId>river</artifactId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
-
-    <groupId>org.apache.river</groupId>
-    <artifactId>river-discovery-providers</artifactId>
-    <packaging>jar</packaging>
-
-    <name>Module :: River Lookup Discovery Providers</name>
-    <description>Apache River Lookup Discovery Providers
-    </description>
-
-    <properties>
-        <high.scale.lib.version>1.0.3</high.scale.lib.version>
-    </properties>
-
-    <dependencies>  
-         <dependency>
-            <groupId>org.apache.river</groupId>
-            <artifactId>river-platform</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.river</groupId>
-            <artifactId>river-lib-dl</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.river</groupId>
-            <artifactId>river-jeri</artifactId>
-            <version>3.0-SNAPSHOT</version>
-            <type>jar</type>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.river</groupId>
-            <artifactId>river-url-integrity</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-         <dependency>
-             <groupId>${project.groupId}</groupId>
-             <artifactId>river-resources</artifactId>
-             <version>${project.version}</version>
-         </dependency>  
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.6</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>biz.aQute.bnd</groupId>
-            <artifactId>biz.aQute.bnd.annotation</artifactId>
-            <version>3.3.0</version>
-            <scope>compile</scope>
-        </dependency>
-     </dependencies>
-
-    <build>
-        <plugins>  
-            <plugin>
-              <groupId>biz.aQute.bnd</groupId>
-              <artifactId>bnd-maven-plugin</artifactId>
-              <executions>
-                    <execution>
-                        <goals>
-                            <goal>bnd-process</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>   
-            <plugin>
-                <groupId>org.owasp</groupId>
-                <artifactId>dependency-check-maven</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>        
-            <!--<plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <version>2.2</version>
-                <configuration>
-                    <archive>                
-                        <manifestEntries>
-                                
<Implementation-Version>${project.version}</Implementation-Version>
-                            <Class-Path>river-resources-${project.version}.jar 
high-scale-lib-${high.scale.lib.version}.jar</Class-Path>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>-->
-
-            <!--<plugin>
-               <groupId>org.codehaus.gmaven</groupId>
-               <artifactId>gmaven-plugin</artifactId>
-               <configuration>
-                    
<providerSelection>${gmavenProviderSelection}</providerSelection>
-                    <source/>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>generateStubs</goal>
-                            <goal>compile</goal>
-                            <goal>generateTestStubs</goal>
-                            <goal>testCompile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.codehaus.groovy</groupId>
-                        <artifactId>groovy-all</artifactId>
-                        <version>${groovy.version}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>-->                                               
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.1</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                        <source>1.5</source>
-                        <profile>compact1</profile>
-                        <target>1.5</target>
-                        <debug>true</debug>
-                        <optimize>true</optimize>
-                        <encoding>UTF-8</encoding>
-                        <meminitial>128m</meminitial>
-                        <maxmem>1024m</maxmem>
-                    </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>retrotranslator-maven-plugin</artifactId>
-                <version>1.0-alpha-4</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>translate-project</goal>
-                        </goals>
-                        <configuration>
-                            <classifier>jdk14</classifier>
-                            <attach>true</attach>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <configuration>
-<!--
-                    <additionalDependencies>
-                        <additionalDependency>
-                          <groupId>org.apache.river</groupId>
-                          <artifactId>river-lib</artifactId>
-                          <version>${project.version}</version>
-                        </additionalDependency>
-                        <additionalDependency>
-                          <groupId>org.apache.river</groupId>
-                          <artifactId>river-lib-dl</artifactId>
-                          <version>${project.version}</version>
-                        </additionalDependency>
-                    </additionalDependencies>
--->
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>findbugs-maven-plugin</artifactId>
-                <configuration>
-                    <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
-                </configuration>
-            </plugin>
-        </plugins>
-    </reporting>
-</project>
+<?xml version="1.0" encoding="utf-8"?>
+<!-- ~ Copyright (C) 2014 the original author or authors. ~ ~ 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 ~ ~ 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://maven.apache.org/POM/4.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+       <modelVersion>4.0.0</modelVersion>
+
+       <parent>
+               <groupId>org.apache</groupId>
+               <artifactId>river</artifactId>
+               <version>3.0-SNAPSHOT</version>
+       </parent>
+
+       <groupId>org.apache.river</groupId>
+       <artifactId>river-discovery-providers</artifactId>
+       <packaging>jar</packaging>
+
+       <name>Module :: River Lookup Discovery Providers</name>
+       <description>Apache River Lookup Discovery Providers
+    </description>
+
+       <properties>
+               <high.scale.lib.version>1.0.3</high.scale.lib.version>
+       </properties>
+
+       <dependencies>
+
+               <dependency>
+                       <groupId>org.apache.river</groupId>
+                       <artifactId>river-lib</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+               
+               <dependency>
+                       <groupId>org.apache.river</groupId>
+                       <artifactId>river-jeri</artifactId>
+                       <version>3.0-SNAPSHOT</version>
+                       <type>jar</type>
+               </dependency>
+
+                               
+               <dependency>
+                       <groupId>org.apache.river</groupId>
+                       <artifactId>river-url-integrity</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               
+               <dependency>
+                       <groupId>${project.groupId}</groupId>
+                       <artifactId>river-logging</artifactId>
+                       <version>${project.version}</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.6</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>biz.aQute.bnd</groupId>
+                       <artifactId>biz.aQute.bnd.annotation</artifactId>
+                       <version>3.3.0</version>
+                       <scope>compile</scope>
+               </dependency>
+       </dependencies>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>biz.aQute.bnd</groupId>
+                               <artifactId>bnd-maven-plugin</artifactId>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>bnd-process</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.owasp</groupId>
+                               <artifactId>dependency-check-maven</artifactId>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>check</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <!--<plugin> 
<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-jar-plugin</artifactId> 
+                               <version>2.2</version> <configuration> 
<archive> <manifestEntries> 
<Implementation-Version>${project.version}</Implementation-Version> 
+                               
<Class-Path>river-resources-${project.version}.jar 
high-scale-lib-${high.scale.lib.version}.jar</Class-Path> 
+                               </manifestEntries> </archive> </configuration> 
</plugin> -->
+
+                       <!--<plugin> <groupId>org.codehaus.gmaven</groupId> 
<artifactId>gmaven-plugin</artifactId> 
+                               <configuration> 
<providerSelection>${gmavenProviderSelection}</providerSelection> 
+                               <source/> </configuration> <executions> 
<execution> <goals> <goal>generateStubs</goal> 
+                               <goal>compile</goal> 
<goal>generateTestStubs</goal> <goal>testCompile</goal> 
+                               </goals> </execution> </executions> 
<dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> 
+                               <artifactId>groovy-all</artifactId> 
<version>${groovy.version}</version> 
+                               </dependency> </dependencies> </plugin> -->
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-source-plugin</artifactId>
+                               <version>2.1.1</version>
+                               <executions>
+                                       <execution>
+                                               <id>attach-sources</id>
+                                               <phase>verify</phase>
+                                               <goals>
+                                                       <goal>jar-no-fork</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>2.3.2</version>
+                               <configuration>
+                                       <source>1.8</source>
+                                       <profile>compact1</profile>
+                                       <target>1.8</target>
+                                       <debug>true</debug>
+                                       <optimize>true</optimize>
+                                       <encoding>UTF-8</encoding>
+                                       <meminitial>128m</meminitial>
+                                       <maxmem>1024m</maxmem>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               
<artifactId>retrotranslator-maven-plugin</artifactId>
+                               <version>1.0-alpha-4</version>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       
<goal>translate-project</goal>
+                                               </goals>
+                                               <configuration>
+                                                       
<classifier>jdk14</classifier>
+                                                       <attach>true</attach>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                       </plugin>
+               </plugins>
+
+               <pluginManagement>
+                       <plugins>
+                               <plugin>
+                                       <groupId>org.eclipse.m2e</groupId>
+                                       
<artifactId>lifecycle-mapping</artifactId>
+                                       <version>1.0.0</version>
+                                       <configuration>
+                                               <lifecycleMappingMetadata>
+                                                       <pluginExecutions>
+                                                               
<pluginExecution>
+                                                                       
<pluginExecutionFilter>
+                                                                               
<groupId>biz.aQute.bnd</groupId>
+                                                                               
<artifactId>bnd-maven-plugin</artifactId>
+                                                                               
<versionRange>[1.0.0,)</versionRange>
+                                                                               
<goals>
+                                                                               
        <goal>bnd-process</goal>
+                                                                               
</goals>
+                                                                       
</pluginExecutionFilter>
+                                                                       <action>
+                                                                               
<ignore />
+                                                                       
</action>
+                                                               
</pluginExecution>
+                                                       </pluginExecutions>
+                                               </lifecycleMappingMetadata>
+                                       </configuration>
+                               </plugin>
+                       </plugins>
+               </pluginManagement>
+
+
+       </build>
+
+       <reporting>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <configuration>
+                                       <!-- <additionalDependencies> 
<additionalDependency> <groupId>org.apache.river</groupId> 
+                                               
<artifactId>river-lib</artifactId> <version>${project.version}</version> 
+                                               </additionalDependency> 
<additionalDependency> <groupId>org.apache.river</groupId> 
+                                               
<artifactId>river-lib-dl</artifactId> <version>${project.version}</version> 
+                                               </additionalDependency> 
</additionalDependencies> -->
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>findbugs-maven-plugin</artifactId>
+                               <configuration>
+                                       
<excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </reporting>
+</project>

Modified: river/jtsk/modules/modularize/apache-river/river-dl/pom.xml
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-dl/pom.xml?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- river/jtsk/modules/modularize/apache-river/river-dl/pom.xml (original)
+++ river/jtsk/modules/modularize/apache-river/river-dl/pom.xml Sun Jul  5 
11:41:39 2020
@@ -1,63 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-~ Copyright (C) 2014 the original author or authors.
-~
-~ 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
-~
-~ 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";     
-         xmlns="http://maven.apache.org/POM/4.0.0";
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>river</artifactId>
-        <groupId>org.apache</groupId>
-        <version>3.0-SNAPSHOT</version>
-               <relativePath>../pom.xml</relativePath>
-    </parent>
-    <groupId>org.apache.river</groupId>
-    <artifactId>river-dl</artifactId>
-    <url>http://river.apache.org</url>
-    <name>Module :: River Service DL Library</name>
-
-    <dependencies>       
-
-        <dependency>
-            <groupId>org.apache.river</groupId>
-            <artifactId>river-platform</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-           <plugins>
-                        <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1.1</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>jar-no-fork</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-           </plugins>
-    </build>
-
-    
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+~ Copyright (C) 2014 the original author or authors.
+~
+~ 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
+~
+~ 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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";     
+         xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>river</artifactId>
+        <groupId>org.apache</groupId>
+        <version>3.0-SNAPSHOT</version>
+               <relativePath>../pom.xml</relativePath>
+    </parent>
+    <groupId>org.apache.river</groupId>
+    <artifactId>river-dl</artifactId>
+    <url>http://river.apache.org</url>
+    <name>Module :: River Service DL Library</name>
+
+    <dependencies>       
+
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>river-platform</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>river-collections</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.river</groupId>
+            <artifactId>river-jeri</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+           <plugins>
+                        <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>2.1.1</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+           </plugins>
+    </build>
+
+    
+</project>

Modified: 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/net/jini/lookup/JoinManager.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/net/jini/lookup/JoinManager.java?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/net/jini/lookup/JoinManager.java
 (original)
+++ 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/net/jini/lookup/JoinManager.java
 Sun Jul  5 11:41:39 2020
@@ -19,8 +19,8 @@ package net.jini.lookup;
 
 import org.apache.river.constants.ThrowableConstants;
 import org.apache.river.lookup.entry.LookupAttributes;
-import org.apache.river.thread.RetryTask;
-import org.apache.river.thread.WakeupManager;
+import org.apache.river.thread.wakeup.RetryTask;
+import org.apache.river.thread.wakeup.WakeupManager;
 import org.apache.river.logging.LogUtil;
 
 import net.jini.config.Configuration;

Modified: 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/activation/ActivationAdmin.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/activation/ActivationAdmin.java?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/activation/ActivationAdmin.java
 (original)
+++ 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/activation/ActivationAdmin.java
 Sun Jul  5 11:41:39 2020
@@ -1,69 +1,69 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.river.phoenix;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-import java.rmi.activation.ActivationGroupID;
-import java.rmi.activation.UnknownGroupException;
-import java.util.Map;
-
-/**
- * An administrative interface for the activation system daemon. This
- * interface is implemented directly by the same proxy that implements
- * {@link java.rmi.activation.ActivationSystem}.
- *
- * @author Sun Microsystems, Inc.
- * 
- * @since 2.0
- */
-public interface ActivationAdmin extends Remote {
-    /**
-     * Returns a map from {@link ActivationGroupID} to
-     * {@link java.rmi.activation.ActivationGroupDesc} for all registered
-     * activation groups. The map contains a snapshot of the state at
-     * the time of the call; subsequent state changes are not reflected
-     * in the map, nor do changes in the map cause changes in the state
-     * of the activation system daemon.
-     *
-     * @return a map from <code>ActivationGroupID</code> to
-     * <code>ActivationGroupDesc</code> for all registered activation groups
-     * @throws RemoteException if a communication-related exception occurs
-     */
-    Map getActivationGroups() throws RemoteException;
-
-    /**
-     * Returns a map from {@link java.rmi.activation.ActivationID} to
-     * {@link java.rmi.activation.ActivationDesc} for all activatable objects
-     * registered in the group registered under the specified activation
-     * group identifier. The map contains a snapshot of the state at
-     * the time of the call; subsequent state changes are not reflected
-     * in the map, nor do changes in the map cause changes in the state
-     * of the activation system daemon.
-     *
-     * @param id activation group identifier
-     * @return a map from <code>ActivationID</code> to
-     * <code>ActivationDesc</code> for all activatable objects registered in
-     * the group registered under the specified activation group identifier
-     * @throws UnknownGroupException if no group is registered under the
-     * specified activation group identifier
-     * @throws RemoteException if a communication-related exception occurs
-     */
-    Map getActivatableObjects(ActivationGroupID id)
-       throws UnknownGroupException, RemoteException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.river.activation;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.activation.ActivationGroupID;
+import java.rmi.activation.UnknownGroupException;
+import java.util.Map;
+
+/**
+ * An administrative interface for the activation system daemon. This
+ * interface is implemented directly by the same proxy that implements
+ * {@link java.rmi.activation.ActivationSystem}.
+ *
+ * @author Sun Microsystems, Inc.
+ * 
+ * @since 2.0
+ */
+public interface ActivationAdmin extends Remote {
+    /**
+     * Returns a map from {@link ActivationGroupID} to
+     * {@link java.rmi.activation.ActivationGroupDesc} for all registered
+     * activation groups. The map contains a snapshot of the state at
+     * the time of the call; subsequent state changes are not reflected
+     * in the map, nor do changes in the map cause changes in the state
+     * of the activation system daemon.
+     *
+     * @return a map from <code>ActivationGroupID</code> to
+     * <code>ActivationGroupDesc</code> for all registered activation groups
+     * @throws RemoteException if a communication-related exception occurs
+     */
+    Map getActivationGroups() throws RemoteException;
+
+    /**
+     * Returns a map from {@link java.rmi.activation.ActivationID} to
+     * {@link java.rmi.activation.ActivationDesc} for all activatable objects
+     * registered in the group registered under the specified activation
+     * group identifier. The map contains a snapshot of the state at
+     * the time of the call; subsequent state changes are not reflected
+     * in the map, nor do changes in the map cause changes in the state
+     * of the activation system daemon.
+     *
+     * @param id activation group identifier
+     * @return a map from <code>ActivationID</code> to
+     * <code>ActivationDesc</code> for all activatable objects registered in
+     * the group registered under the specified activation group identifier
+     * @throws UnknownGroupException if no group is registered under the
+     * specified activation group identifier
+     * @throws RemoteException if a communication-related exception occurs
+     */
+    Map getActivatableObjects(ActivationGroupID id)
+       throws UnknownGroupException, RemoteException;
+}

Modified: 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/AdminIterator.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/AdminIterator.java?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/AdminIterator.java
 (original)
+++ 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/AdminIterator.java
 Sun Jul  5 11:41:39 2020
@@ -1,93 +1,93 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.river.outrigger;
-
-import java.rmi.RemoteException;
-
-import net.jini.core.entry.Entry;
-import net.jini.core.entry.UnusableEntryException;
-
-import net.jini.space.JavaSpace05;
-import net.jini.space.MatchSet;
-
-/**
- * Interface for the iterators returned by the <code>contents()</code>
- * method of <code>JavaSpaceAdmin</code>.  Note
- * <code>AdminIterator</code>s do not survive restarts of the
- * underlying space.
- * <p>
- *
- * @deprecated Use {@link MatchSet} instead. <code>MatchSet</code>s
- *             can be obtained using the 
- *             {@link JavaSpace05#contents JavaSpace05.contents}
- *             method.
- *
- * @author Sun Microsystems, Inc.
- *
- * @see JavaSpaceAdmin 
- */
-public interface AdminIterator {
-    /**
-     * Return the next entry in the sequence.  Returns <code>null</code>
-     * if there are no more matching entries in the space.
-     * <p>
-     * This method is idempotent in the face of <code>RemoteException</code>s.
-     *
-     * @throws UnusableEntryException if the field of next entry in
-     * sequence can't be deserialized (usually this is because the class
-     * in question could not be loaded).
-     */
-    public Entry next()        throws UnusableEntryException, RemoteException;
-
-    /**
-     * The effect of this call depends on the most recent call to
-     * <code>next()</code>:
-     * <ul>
-     * <li> If the last call to <code>next()</code> returned an
-     * <code>Entry</code> that entry will be removed from the space.
-     * <p>
-     * <li> If the last call to <code>next()</code> threw a
-     * <code>UnusableEntryException</code> the <code>Entry</code> that
-     * could not be deserialized will be removed from the space.
-     * <p>
-     * <li> If the last call to <code>next()</code> returned
-     * <code>null</code>, threw a <code>RemoteException</code>, or
-     * <code>next()</code> has not yet been called on this iterator a
-     * <code>IllegalStateException</code> will be thrown and no entry will
-     * be removed.
-     * <p>
-     * </ul>
-     * This method is idempotent in the face of
-     * <code>RemoteException</code>.
-     * <p>
-     * @throws IllegalStateException if <code>next()</code> has not be
-     * called on this iterator, or the last invocation of
-     * <code>next()</code> returned <code>null</code> or threw
-     * <code>RemoteException</code>.     
-     */
-    public void delete() throws RemoteException;
-
-    /**
-     * Tell the server that this iterator is no longer in use.  All
-     * operations on a closed iterator  have undefined results, except  
-     * the <code>close()</code> method.
-     * <p> 
-     * This method is idempotent in the face of <code>RemoteException</code>.
-     */
-    public void close() throws RemoteException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.river.admin;
+
+import java.rmi.RemoteException;
+
+import net.jini.core.entry.Entry;
+import net.jini.core.entry.UnusableEntryException;
+
+import net.jini.space.JavaSpace05;
+import net.jini.space.MatchSet;
+
+/**
+ * Interface for the iterators returned by the <code>contents()</code>
+ * method of <code>JavaSpaceAdmin</code>.  Note
+ * <code>AdminIterator</code>s do not survive restarts of the
+ * underlying space.
+ * <p>
+ *
+ * @deprecated Use {@link MatchSet} instead. <code>MatchSet</code>s
+ *             can be obtained using the 
+ *             {@link JavaSpace05#contents JavaSpace05.contents}
+ *             method.
+ *
+ * @author Sun Microsystems, Inc.
+ *
+ * @see JavaSpaceAdmin 
+ */
+public interface AdminIterator {
+    /**
+     * Return the next entry in the sequence.  Returns <code>null</code>
+     * if there are no more matching entries in the space.
+     * <p>
+     * This method is idempotent in the face of <code>RemoteException</code>s.
+     *
+     * @throws UnusableEntryException if the field of next entry in
+     * sequence can't be deserialized (usually this is because the class
+     * in question could not be loaded).
+     */
+    public Entry next()        throws UnusableEntryException, RemoteException;
+
+    /**
+     * The effect of this call depends on the most recent call to
+     * <code>next()</code>:
+     * <ul>
+     * <li> If the last call to <code>next()</code> returned an
+     * <code>Entry</code> that entry will be removed from the space.
+     * <p>
+     * <li> If the last call to <code>next()</code> threw a
+     * <code>UnusableEntryException</code> the <code>Entry</code> that
+     * could not be deserialized will be removed from the space.
+     * <p>
+     * <li> If the last call to <code>next()</code> returned
+     * <code>null</code>, threw a <code>RemoteException</code>, or
+     * <code>next()</code> has not yet been called on this iterator a
+     * <code>IllegalStateException</code> will be thrown and no entry will
+     * be removed.
+     * <p>
+     * </ul>
+     * This method is idempotent in the face of
+     * <code>RemoteException</code>.
+     * <p>
+     * @throws IllegalStateException if <code>next()</code> has not be
+     * called on this iterator, or the last invocation of
+     * <code>next()</code> returned <code>null</code> or threw
+     * <code>RemoteException</code>.     
+     */
+    public void delete() throws RemoteException;
+
+    /**
+     * Tell the server that this iterator is no longer in use.  All
+     * operations on a closed iterator  have undefined results, except  
+     * the <code>close()</code> method.
+     * <p> 
+     * This method is idempotent in the face of <code>RemoteException</code>.
+     */
+    public void close() throws RemoteException;
+}

Modified: 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/FiddlerAdmin.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/FiddlerAdmin.java?rev=1879521&r1=1879520&r2=1879521&view=diff
==============================================================================
--- 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/FiddlerAdmin.java
 (original)
+++ 
river/jtsk/modules/modularize/apache-river/river-dl/src/main/java/org/apache/river/admin/FiddlerAdmin.java
 Sun Jul  5 11:41:39 2020
@@ -1,229 +1,229 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.river.fiddler;
-
-import net.jini.admin.JoinAdmin;
-import org.apache.river.admin.DestroyAdmin;
-
-import java.rmi.RemoteException;
-
-/**
- * An administrative interface for the Fiddler implementation of the
- * lookup discovery service (see {@linkplain org.apache.river.fiddler 
Fiddler}).
- * The comments that follow describe Fiddler with respect to the following
- * methods:
- * <ul><li> setLeaseBound
- *     <li> getLeaseBound
- *     <li> setPersistenceSnapshotWeight
- *     <li> getPersistenceSnapshotWeight
- *     <li> setPersistenceSnapshotThreshold
- *     <li> getPersistenceSnapshotThreshold
- * </ul>
- * The intent of the information contained in this note is to clarify the
- * use of these methods and the effect that use will have on the configuration
- * of Fiddler. Note that the phrase <i>lookup discovery service</i> as used
- * throughout this note refers to the Fiddler implementation of that
- * service. While such a lookup discovery service is running, the following
- * sort of state changes can occur:
- * <ul><li> Clients register and un-register (cancel their lease) with the
- *          lookup discovery service
- *     <li> Leases on the registrations created for a client by the lookup
- *          discovery service are granted, renewed, cancelled and expired
- *     <li> Managed sets of groups, locators and lookup services associated
- *          with the client registrations are added, modified, and removed
- *          from the lookup discovery service
- * </ul>
- * In order to make the lookup discovery service's state persistent across
- * system crashes or network outages, each of the state changes described
- * above are written to a file referred to as the service's <i>log file</i>.
- * The service's log file records, over time, the incremental changes -- or
- * <i>deltas</i> -- made to the lookup discovery service's state.
- * <p>
- * To prevent the log file from growing indefinitely, the lookup
- * discovery service's complete state is intermittently written to another
- * file referred to as the service's <i>snapshot file</i>. When a 
- * <i>snapshot</i> of the service's state is logged to the service's 
- * snapshot file, the service's log file is cleared, and the incremental
- * logging of deltas begins anew. When the service is started for the 
- * first time, the initial period prior to the creation of the first
- * snapshot is referred to as the system <i>ramp-up</i> period. This ramp-up
- * period is the only time where a log file exists without a corresponding
- * snapshot file. 
- * <p>
- * When recovering the system's state after a crash or network outage
- * (or after the lookup discovery service or its ActivationGroup has been 
- * un-registered and then re-registered through the Activation daemon),
- * a "base state" is first recovered by retrieving and applying the
- * contents of the snapshot file (if it exists). Then, if the log
- * file has length greater than zero, its contents are retrieved
- * and applied in order to incrementally recover the state 
- * changes that occurred from the point of the base state.
- * <p>
- * The criteria used by the lookup discovery service to determine
- * exactly when to "take a snapshot" depends on the current size of
- * the log file relative to the size that the snapshot file will be.
- * Note that whereas, the size of the log file depends on the total number 
- * of changes to the lookup discovery service's state, the size of the
- * snapshot file depends on the number of registrations that are 
- * currently active; that is, the more registrations that have been 
- * created and which have valid leases, the larger the snapshot.
- * For example, if only 10 registrations are active, the snapshot 
- * file will be relatively small; but lease renewals may be regularly
- * requested on some of those registrations. The regular lease renewals
- * will result in a very large log file.
- * <p>
- * A balance must be maintained between how large the log file is
- * allowed to get and how often a snapshot is taken; taking snapshots
- * too often can slow down processing significantly. The lookup 
- * discovery service is initially configured with a threshold value
- * and a weighting factor that are employed in a computation that 
- * determines when to take a snapshot. The methods specified by this
- * interface provide ways to access and modify those values. Thus, based
- * on a particular lookup discovery service's makeup, these methods can
- * be used by that service's administrative client to "tune" performance
- * with respect to logging the service's persistent state.
- * <pre>
- * The following comparison is made to determine when to take a snapshot:
- * 
- *   if (logSize >= W*snapshotSize) && (snapshotSize >= T) {
- *       take a snapshot;
- *   }
- *       where W = persistenceSnapshotWeight
- *             T = persistenceSnapshotThreshold
- * </pre>
- * The first comparison is used to ensure that the log file does not
- * grow too large. The second comparison ensures that snapshots are
- * not taken too often.
- * <p>
- * Administrative clients of Fiddler should consider these
- * relationships when using the methods specified by this interface
- * to tune that service's persistence mechanism.
- *
- * @author Sun Microsystems, Inc.
- *
- */
-public interface FiddlerAdmin extends JoinAdmin, DestroyAdmin {
-    /**
-     * Changes the least upper bound applied to all lease durations granted
-     * by the lookup discovery service.
-     * <p>
-     * When a client registers with the lookup discovery service, it
-     * requests a desired duration for the lease that the lookup discovery
-     * service grants on the registration. As stated in the lookup discovery
-     * service specification, the actual duration granted is guaranteed
-     * to never be greater than the requested duration. But the Fiddler
-     * implementation of the lookup discovery service applies an additional
-     * restriction on the duration of the lease that is ultimately granted
-     * to the client: when determining the actual duration to grant,
-     * Fiddler applies a bound to the duration request. That is, whenever
-     * a client requests a lease duration that is greater than the value of
-     * this bound, the value of the <em>actual</em> duration assigned by
-     * Fiddler will not only be less than the <em>requested</em> value,
-     * it will also be less than or equal to the value of the bound.
-     * <p>
-     * The bound satisfies the definition of a <em>least upper bound</em>
-     * on the set of all possible <em>granted</em> durations because the
-     * durations granted by Fiddler can be arbitrarily close to the bound,
-     * but will never be greater than the bound.
-     * <p>
-     * Thus, this method is a mechanism for an entity with the appropriate
-     * privileges to administratively change the value of the least upper
-     * bound that will be applied by the Fiddler implementation of the lookup
-     * discovery service when determining the duration to assign to the lease
-     * on a requested registration.
-     *
-     * @param newBound <code>long</code> value representing the new least
-     *        upper bound (in milliseconds) on the set of all possible
-     *        lease durations that may be granted
-     * 
-     * @throws java.rmi.RemoteException typically, this exception occurs when
-     *         there is a communication failure between the client and the
-     *         lookup discovery service. When this exception does occur, the
-     *         bound value may or may not have been changed successfully.
-     */
-    void setLeaseBound(long newBound) throws RemoteException;
-
-    /**
-     * Retrieves the least upper bound applied to all lease durations granted
-     * by the lookup discovery service.
-     *
-     * @return <code>long</code> value representing the current least
-     *         upper bound (in milliseconds) on the set of all possible
-     *         lease durations that may be granted
-     * 
-     * @throws java.rmi.RemoteException typically, this exception occurs when
-     *         there is a communication failure between the client and the
-     *         lookup discovery service.
-     */
-    long getLeaseBound() throws RemoteException;
-
-    /**
-     * Change the weight factor applied by the lookup discovery service
-     * to the snapshot size during the test to determine whether or not
-     * to take a "snapshot" of the system state.
-     *
-     * @param weight weight factor for snapshot size
-     * 
-     * @throws java.rmi.RemoteException typically, this exception occurs when
-     *         there is a communication failure between the client and the
-     *         lookup discovery service. When this exception does occur, the
-     *         weight factor may or may not have been changed successfully.
-     */
-    void setPersistenceSnapshotWeight(float weight) throws RemoteException;
-
-    /**
-     * Retrieve the weight factor applied by the lookup discovery service
-     * to the snapshot size during the test to determine whether or not to
-     * take a "snapshot" of the system state.
-     * 
-     * @return float value corresponding to the weight factor for snapshot
-     *         size
-     * 
-     * @throws java.rmi.RemoteException typically, this exception occurs when
-     *         there is a communication failure between the client and the
-     *         lookup discovery service.
-     */
-    float getPersistenceSnapshotWeight() throws RemoteException;
-
-    /**
-     * Change the value of the size threshold of the snapshot; which is
-     * employed by the lookup discovery service in the test to determine
-     * whether or not to take a "snapshot" of the system state.
-     *
-     * @param threshold size threshold for taking a snapshot
-     * 
-     * @throws java.rmi.RemoteException typically, this exception occurs when
-     *         there is a communication failure between the client and the
-     *         lookup discovery service. When this exception does occur, the
-     *         threshold may or may not have been changed successfully.
-     */
-    void setPersistenceSnapshotThreshold(int threshold) throws RemoteException;
-
-    /**
-     * Retrieve the value of the size threshold of the snapshot; which is
-     * employed by the lookup discovery service in the test to determine
-     * whether or not to take a "snapshot" of the system state.
-     * 
-     * @return int value corresponding to the size threshold of the snapshot
-     * 
-     * @throws java.rmi.RemoteException typically, this exception occurs when
-     *         there is a communication failure between the client and the
-     *         lookup discovery service.
-     */
-    int getPersistenceSnapshotThreshold() throws RemoteException;
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.river.admin;
+
+import net.jini.admin.JoinAdmin;
+import org.apache.river.admin.DestroyAdmin;
+
+import java.rmi.RemoteException;
+
+/**
+ * An administrative interface for the Fiddler implementation of the
+ * lookup discovery service (see {@linkplain org.apache.river.fiddler 
Fiddler}).
+ * The comments that follow describe Fiddler with respect to the following
+ * methods:
+ * <ul><li> setLeaseBound
+ *     <li> getLeaseBound
+ *     <li> setPersistenceSnapshotWeight
+ *     <li> getPersistenceSnapshotWeight
+ *     <li> setPersistenceSnapshotThreshold
+ *     <li> getPersistenceSnapshotThreshold
+ * </ul>
+ * The intent of the information contained in this note is to clarify the
+ * use of these methods and the effect that use will have on the configuration
+ * of Fiddler. Note that the phrase <i>lookup discovery service</i> as used
+ * throughout this note refers to the Fiddler implementation of that
+ * service. While such a lookup discovery service is running, the following
+ * sort of state changes can occur:
+ * <ul><li> Clients register and un-register (cancel their lease) with the
+ *          lookup discovery service
+ *     <li> Leases on the registrations created for a client by the lookup
+ *          discovery service are granted, renewed, cancelled and expired
+ *     <li> Managed sets of groups, locators and lookup services associated
+ *          with the client registrations are added, modified, and removed
+ *          from the lookup discovery service
+ * </ul>
+ * In order to make the lookup discovery service's state persistent across
+ * system crashes or network outages, each of the state changes described
+ * above are written to a file referred to as the service's <i>log file</i>.
+ * The service's log file records, over time, the incremental changes -- or
+ * <i>deltas</i> -- made to the lookup discovery service's state.
+ * <p>
+ * To prevent the log file from growing indefinitely, the lookup
+ * discovery service's complete state is intermittently written to another
+ * file referred to as the service's <i>snapshot file</i>. When a 
+ * <i>snapshot</i> of the service's state is logged to the service's 
+ * snapshot file, the service's log file is cleared, and the incremental
+ * logging of deltas begins anew. When the service is started for the 
+ * first time, the initial period prior to the creation of the first
+ * snapshot is referred to as the system <i>ramp-up</i> period. This ramp-up
+ * period is the only time where a log file exists without a corresponding
+ * snapshot file. 
+ * <p>
+ * When recovering the system's state after a crash or network outage
+ * (or after the lookup discovery service or its ActivationGroup has been 
+ * un-registered and then re-registered through the Activation daemon),
+ * a "base state" is first recovered by retrieving and applying the
+ * contents of the snapshot file (if it exists). Then, if the log
+ * file has length greater than zero, its contents are retrieved
+ * and applied in order to incrementally recover the state 
+ * changes that occurred from the point of the base state.
+ * <p>
+ * The criteria used by the lookup discovery service to determine
+ * exactly when to "take a snapshot" depends on the current size of
+ * the log file relative to the size that the snapshot file will be.
+ * Note that whereas, the size of the log file depends on the total number 
+ * of changes to the lookup discovery service's state, the size of the
+ * snapshot file depends on the number of registrations that are 
+ * currently active; that is, the more registrations that have been 
+ * created and which have valid leases, the larger the snapshot.
+ * For example, if only 10 registrations are active, the snapshot 
+ * file will be relatively small; but lease renewals may be regularly
+ * requested on some of those registrations. The regular lease renewals
+ * will result in a very large log file.
+ * <p>
+ * A balance must be maintained between how large the log file is
+ * allowed to get and how often a snapshot is taken; taking snapshots
+ * too often can slow down processing significantly. The lookup 
+ * discovery service is initially configured with a threshold value
+ * and a weighting factor that are employed in a computation that 
+ * determines when to take a snapshot. The methods specified by this
+ * interface provide ways to access and modify those values. Thus, based
+ * on a particular lookup discovery service's makeup, these methods can
+ * be used by that service's administrative client to "tune" performance
+ * with respect to logging the service's persistent state.
+ * <pre>
+ * The following comparison is made to determine when to take a snapshot:
+ * 
+ *   if (logSize >= W*snapshotSize) && (snapshotSize >= T) {
+ *       take a snapshot;
+ *   }
+ *       where W = persistenceSnapshotWeight
+ *             T = persistenceSnapshotThreshold
+ * </pre>
+ * The first comparison is used to ensure that the log file does not
+ * grow too large. The second comparison ensures that snapshots are
+ * not taken too often.
+ * <p>
+ * Administrative clients of Fiddler should consider these
+ * relationships when using the methods specified by this interface
+ * to tune that service's persistence mechanism.
+ *
+ * @author Sun Microsystems, Inc.
+ *
+ */
+public interface FiddlerAdmin extends JoinAdmin, DestroyAdmin {
+    /**
+     * Changes the least upper bound applied to all lease durations granted
+     * by the lookup discovery service.
+     * <p>
+     * When a client registers with the lookup discovery service, it
+     * requests a desired duration for the lease that the lookup discovery
+     * service grants on the registration. As stated in the lookup discovery
+     * service specification, the actual duration granted is guaranteed
+     * to never be greater than the requested duration. But the Fiddler
+     * implementation of the lookup discovery service applies an additional
+     * restriction on the duration of the lease that is ultimately granted
+     * to the client: when determining the actual duration to grant,
+     * Fiddler applies a bound to the duration request. That is, whenever
+     * a client requests a lease duration that is greater than the value of
+     * this bound, the value of the <em>actual</em> duration assigned by
+     * Fiddler will not only be less than the <em>requested</em> value,
+     * it will also be less than or equal to the value of the bound.
+     * <p>
+     * The bound satisfies the definition of a <em>least upper bound</em>
+     * on the set of all possible <em>granted</em> durations because the
+     * durations granted by Fiddler can be arbitrarily close to the bound,
+     * but will never be greater than the bound.
+     * <p>
+     * Thus, this method is a mechanism for an entity with the appropriate
+     * privileges to administratively change the value of the least upper
+     * bound that will be applied by the Fiddler implementation of the lookup
+     * discovery service when determining the duration to assign to the lease
+     * on a requested registration.
+     *
+     * @param newBound <code>long</code> value representing the new least
+     *        upper bound (in milliseconds) on the set of all possible
+     *        lease durations that may be granted
+     * 
+     * @throws java.rmi.RemoteException typically, this exception occurs when
+     *         there is a communication failure between the client and the
+     *         lookup discovery service. When this exception does occur, the
+     *         bound value may or may not have been changed successfully.
+     */
+    void setLeaseBound(long newBound) throws RemoteException;
+
+    /**
+     * Retrieves the least upper bound applied to all lease durations granted
+     * by the lookup discovery service.
+     *
+     * @return <code>long</code> value representing the current least
+     *         upper bound (in milliseconds) on the set of all possible
+     *         lease durations that may be granted
+     * 
+     * @throws java.rmi.RemoteException typically, this exception occurs when
+     *         there is a communication failure between the client and the
+     *         lookup discovery service.
+     */
+    long getLeaseBound() throws RemoteException;
+
+    /**
+     * Change the weight factor applied by the lookup discovery service
+     * to the snapshot size during the test to determine whether or not
+     * to take a "snapshot" of the system state.
+     *
+     * @param weight weight factor for snapshot size
+     * 
+     * @throws java.rmi.RemoteException typically, this exception occurs when
+     *         there is a communication failure between the client and the
+     *         lookup discovery service. When this exception does occur, the
+     *         weight factor may or may not have been changed successfully.
+     */
+    void setPersistenceSnapshotWeight(float weight) throws RemoteException;
+
+    /**
+     * Retrieve the weight factor applied by the lookup discovery service
+     * to the snapshot size during the test to determine whether or not to
+     * take a "snapshot" of the system state.
+     * 
+     * @return float value corresponding to the weight factor for snapshot
+     *         size
+     * 
+     * @throws java.rmi.RemoteException typically, this exception occurs when
+     *         there is a communication failure between the client and the
+     *         lookup discovery service.
+     */
+    float getPersistenceSnapshotWeight() throws RemoteException;
+
+    /**
+     * Change the value of the size threshold of the snapshot; which is
+     * employed by the lookup discovery service in the test to determine
+     * whether or not to take a "snapshot" of the system state.
+     *
+     * @param threshold size threshold for taking a snapshot
+     * 
+     * @throws java.rmi.RemoteException typically, this exception occurs when
+     *         there is a communication failure between the client and the
+     *         lookup discovery service. When this exception does occur, the
+     *         threshold may or may not have been changed successfully.
+     */
+    void setPersistenceSnapshotThreshold(int threshold) throws RemoteException;
+
+    /**
+     * Retrieve the value of the size threshold of the snapshot; which is
+     * employed by the lookup discovery service in the test to determine
+     * whether or not to take a "snapshot" of the system state.
+     * 
+     * @return int value corresponding to the size threshold of the snapshot
+     * 
+     * @throws java.rmi.RemoteException typically, this exception occurs when
+     *         there is a communication failure between the client and the
+     *         lookup discovery service.
+     */
+    int getPersistenceSnapshotThreshold() throws RemoteException;
+}


Reply via email to