java.rmi.dgc

Interface DGC

  • All Superinterfaces:
    Remote

    public interface DGC
    extends Remote
    The DGC abstraction is used for the server side of the distributed garbage collection algorithm. This interface contains the two methods: dirty and clean. A dirty call is made when a remote reference is unmarshaled in a client (the client is indicated by its VMID). A corresponding clean call is made when no more references to the remote reference exist in the client. A failed dirty call must schedule a strong clean call so that the call's sequence number can be retained in order to detect future calls received out of order by the distributed garbage collector. A reference to a remote object is leased for a period of time by the client holding the reference. The lease period starts when the dirty call is received. It is the client's responsibility to renew the leases, by making additional dirty calls, on the remote references it holds before such leases expire. If the client does not renew the lease before it expires, the distributed garbage collector assumes that the remote object is no longer referenced by that client.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong)
      The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's.
      Lease dirty(ObjID[] ids, long sequenceNum, Lease lease)
      The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'.

        

    • Method Detail

      • dirty

        Lease dirty(ObjID[] ids,
                  long sequenceNum,
                  Lease lease)
                    throws RemoteException
        The dirty call requests leases for the remote object references associated with the object identifiers contained in the array 'ids'. The 'lease' contains a client's unique VM identifier (VMID) and a requested lease period. For each remote object exported in the local VM, the garbage collector maintains a reference list-a list of clients that hold references to it. If the lease is granted, the garbage collector adds the client's VMID to the reference list for each remote object indicated in 'ids'. The 'sequenceNum' parameter is a sequence number that is used to detect and discard late calls to the garbage collector. The sequence number should always increase for each subsequent call to the garbage collector. Some clients are unable to generate a VMID, since a VMID is a universally unique identifier that contains a host address which some clients are unable to obtain due to security restrictions. In this case, a client can use a VMID of null, and the distributed garbage collector will assign a VMID for the client. The dirty call returns a Lease object that contains the VMID used and the lease period granted for the remote references (a server may decide to grant a smaller lease period than the client requests). A client must use the VMID the garbage collector uses in order to make corresponding clean calls when the client drops remote object references. A client VM need only make one initial dirty call for each remote reference referenced in the VM (even if it has multiple references to the same remote object). The client must also make a dirty call to renew leases on remote references before such leases expire. When the client no longer has any references to a specific remote object, it must schedule a clean call for the object ID associated with the reference.
        Parameters:
        ids - IDs of objects to mark as referenced by calling client
        sequenceNum - sequence number
        lease - requested lease
        Returns:
        granted lease
        Throws:
        RemoteException - if dirty call fails
      • clean

        void clean(ObjID[] ids,
                 long sequenceNum,
                 VMID vmid,
                 boolean strong)
                   throws RemoteException
        The clean call removes the 'vmid' from the reference list of each remote object indicated in 'id's. The sequence number is used to detect late clean calls. If the argument 'strong' is true, then the clean call is a result of a failed dirty call, thus the sequence number for the client 'vmid' needs to be remembered.
        Parameters:
        ids - IDs of objects to mark as unreferenced by calling client
        sequenceNum - sequence number
        vmid - client VMID
        strong - make 'strong' clean call
        Throws:
        RemoteException - if clean call fails

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

21/11/2024 21:18:09 Cette version de la page est en cache (à la date du 21/11/2024 21:18:09) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.

Document créé le 28/08/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/rmi/dgc/dgc.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, DGC

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut