src/java.rmi/share/classes/sun/rmi/transport/ObjectTable.java

Print this page
rev 13995 : 8153286: Move sun.misc.GC to java.rmi ( sun.rmi.transport )
Reviewed-by: alanb, erikj


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package sun.rmi.transport;
  26 
  27 import java.lang.ref.ReferenceQueue;
  28 import java.rmi.NoSuchObjectException;
  29 import java.rmi.Remote;
  30 import java.rmi.dgc.VMID;
  31 import java.rmi.server.ExportException;
  32 import java.rmi.server.ObjID;
  33 import java.security.AccessController;
  34 import java.security.PrivilegedAction;
  35 import java.util.HashMap;
  36 import java.util.Map;
  37 import sun.misc.GC;
  38 import sun.rmi.runtime.Log;
  39 import sun.rmi.runtime.NewThreadAction;
  40 
  41 /**
  42  * Object table shared by all implementors of the Transport interface.
  43  * This table maps object ids to remote object targets in this address
  44  * space.
  45  *
  46  * @author  Ann Wollrath
  47  * @author  Peter Jones
  48  */
  49 public final class ObjectTable {
  50 
  51     /** maximum interval between complete garbage collections of local heap */
  52     private final static long gcInterval =              // default 1 hour
  53         AccessController.doPrivileged((PrivilegedAction<Long>) () ->
  54             Long.getLong("sun.rmi.dgc.server.gcInterval", 3600000));
  55 
  56     /**
  57      * lock guarding objTable and implTable.




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package sun.rmi.transport;
  26 
  27 import java.lang.ref.ReferenceQueue;
  28 import java.rmi.NoSuchObjectException;
  29 import java.rmi.Remote;
  30 import java.rmi.dgc.VMID;
  31 import java.rmi.server.ExportException;
  32 import java.rmi.server.ObjID;
  33 import java.security.AccessController;
  34 import java.security.PrivilegedAction;
  35 import java.util.HashMap;
  36 import java.util.Map;

  37 import sun.rmi.runtime.Log;
  38 import sun.rmi.runtime.NewThreadAction;
  39 
  40 /**
  41  * Object table shared by all implementors of the Transport interface.
  42  * This table maps object ids to remote object targets in this address
  43  * space.
  44  *
  45  * @author  Ann Wollrath
  46  * @author  Peter Jones
  47  */
  48 public final class ObjectTable {
  49 
  50     /** maximum interval between complete garbage collections of local heap */
  51     private final static long gcInterval =              // default 1 hour
  52         AccessController.doPrivileged((PrivilegedAction<Long>) () ->
  53             Long.getLong("sun.rmi.dgc.server.gcInterval", 3600000));
  54 
  55     /**
  56      * lock guarding objTable and implTable.