Package es.bsc.dataclay.util
Class ReferenceCounting
- java.lang.Object
-
- es.bsc.dataclay.util.ReferenceCounting
-
public class ReferenceCounting extends Object
-
-
Constructor Summary
Constructors Constructor Description ReferenceCounting()
Reference counting constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deserializeReferenceCounting(ObjectID referrerObjectID, byte[] bytes)
Deserialize reference countingint
getExternalReferences()
Get number of external referencesMap<BackendID,Map<ObjectID,Integer>>
getReferenceCounting()
Get ref.void
incrementReferenceCounting(ObjectID objectID, BackendID hint)
Add +1 to reference countingvoid
serializeReferenceCounting(DataClayObject dcObject, DataClayByteBuffer dcBuffer)
Serialize reference countingvoid
setExternalReferences(int theexternalReferences)
Set number of external references
-
-
-
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 counterhint
- 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 countingdcBuffer
- 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
-
-