2362N/A * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class implements the guts of the server-side distributed GC 0N/A * @author Ann Wollrath 0N/A /* dgc system log */ 0N/A /** lease duration to grant to clients */ 0N/A /** lease check interval; default is half of lease grant duration */ 0N/A /** thread pool for scheduling delayed tasks */ 0N/A /** remote implementation of DGC interface for this VM */ 0N/A /** table that maps VMID to LeaseInfo */ 0N/A /** checks for lease expiration */ 0N/A * Return the remote implementation of the DGC interface for 0N/A * Construct a new server-side remote object collector at 0N/A * a particular port. Disallow construction from outside. 0N/A * The dirty call adds the VMID "vmid" to the set of clients 0N/A * that hold references to the object associated with the ObjID 0N/A * id. The long "sequenceNum" is used to detect late dirty calls. If 0N/A * the VMID "vmid" is null, a VMID will be generated on the 0N/A * server (for use by the client in subsequent calls) and 0N/A * The client must call the "dirty" method to renew the lease 0N/A * before the "lease" time expires or all references to remote 0N/A * objects in this VM that the client holds are considered 0N/A * The server specifies the lease value; the client has 0N/A * no say in the matter. 0N/A // create a VMID if one wasn't supplied 0N/A // record lease information 0N/A // return the VMID used 0N/A * The clean call removes the VMID from the set of clients 0N/A * that hold references to the object associated with the LiveRef 0N/A * ref. The sequence number is used to detect late clean calls. If the 0N/A * argument "strong" is true, then the clean call is a result of a 0N/A * failed "dirty" call, thus the sequence number for the VMID needs 0N/A * to be remembered until the client goes away. 0N/A * Register interest in receiving a callback when this VMID 0N/A * becomes inaccessible. 0N/A * Remove notification request. 0N/A * Check if leases have expired. If a lease has expired, remove 0N/A * it from the table and notify all interested parties that the 0N/A * VMID is essentially "dead". 0N/A * @return if true, there are leases outstanding; otherwise leases 0N/A * no longer need to be checked 0N/A /* List of vmids that need to be removed from the leaseTable */ 0N/A /* Build a list of leaseInfo objects that need to have 0N/A * targets removed from their notifySet. Remove expired 0N/A * leases from leaseTable. 0N/A /* Notify and unegister targets without holding the lock on 0N/A * the leaseTable so we avoid deadlock. 0N/A * "Export" the singleton DGCImpl in a context isolated from 0N/A * the arbitrary current thread context. 0N/A * Put remote collector object in table by hand to prevent 0N/A * listen on port. (UnicastServerRef.exportObject would 0N/A * cause transport to listen.) 0N/A "exception initializing server-side DGC", e);