Class ReferenceContext
java.lang.Object
septogeddon.pluginquery.library.remote.ReferenceContext
Context containing object references and prevent object from GarbageCollector
- Author:
- Thito Yalasatria Sunarya
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear all referencesvoid
closeReference
(long id) Close referencecreateReference
(TypeHint hint, Object object) Create or get existing referencegetExistingReference
(long id) Get existing reference saved on this Remote sidegetReferenced
(long id) Get existing referencevoid
putExistingReference
(ObjectReference reference) Put existing reference into this Remote side
-
Constructor Details
-
ReferenceContext
public ReferenceContext()
-
-
Method Details
-
clearReferences
public void clearReferences()Clear all references -
getExistingReference
Get existing reference saved on this Remote side- Parameters:
id
- the id of reference object- Returns:
- the reference object
-
putExistingReference
Put existing reference into this Remote side- Parameters:
reference
- the reference object
-
createReference
Create or get existing reference- Parameters:
object
- the object instance- Returns:
- a referenced object
-
closeReference
public void closeReference(long id) Close reference- Parameters:
id
- reference id
-
getReferenced
Get existing reference- Parameters:
id
- reference id- Returns:
- the referenced object
-