Class ReferenceCounting


  • public class ReferenceCounting
    extends Object
    • Constructor Detail

      • ReferenceCounting

        public ReferenceCounting()
        Reference counting constructor
    • Method Detail

      • getExternalReferences

        public int getExternalReferences()
        Get number of external references
        Returns:
        externalReferences number of external references
      • setExternalReferences

        public void setExternalReferences​(int theexternalReferences)
        Set number of external references
        Parameters:
        theexternalReferences - number of external references
      • incrementReferenceCounting

        public void incrementReferenceCounting​(ObjectID objectID,
                                               BackendID hint)
        Add +1 to reference counting
        Parameters:
        objectID - Object id to increment counter
        hint - If not null, is added to proper reference counting, otherwise to Null entry (GlobalGC need to ask LM)
      • serializeReferenceCounting

        public void serializeReferenceCounting​(DataClayObject dcObject,
                                               DataClayByteBuffer dcBuffer)
        Serialize reference counting
        Parameters:
        dcObject - object being serialized with ref counting
        dcBuffer - Buffer in which to write bytes.
      • deserializeReferenceCounting

        public void deserializeReferenceCounting​(ObjectID referrerObjectID,
                                                 byte[] bytes)
        Deserialize reference counting
        Parameters:
        referrerObjectID - ID of referrer object.
        bytes - Bytes representing the reference counting