43 строки
3.1 KiB
YAML
43 строки
3.1 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.core.util.ReferenceManager"
|
|
fullName: "com.azure.core.util.ReferenceManager"
|
|
name: "ReferenceManager"
|
|
nameWithType: "ReferenceManager"
|
|
summary: "This interface represents managing references to <xref uid=\"java.lang.Object\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Objects\"></xref> and providing the ability to run a cleaning operation once the object is no longer able to be reference."
|
|
syntax: "public interface ReferenceManager"
|
|
fields:
|
|
- uid: "com.azure.core.util.ReferenceManager.INSTANCE"
|
|
fullName: "com.azure.core.util.ReferenceManager.INSTANCE"
|
|
name: "INSTANCE"
|
|
nameWithType: "ReferenceManager.INSTANCE"
|
|
summary: "The global instance of <xref uid=\"com.azure.core.util.ReferenceManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReferenceManager\"></xref> that should be used to maintain object references."
|
|
modifiers:
|
|
- "static"
|
|
- "final"
|
|
field:
|
|
type: "<xref href=\"com.azure.core.util.ReferenceManager?alt=com.azure.core.util.ReferenceManager&text=ReferenceManager\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public static final ReferenceManager INSTANCE"
|
|
desc: "The global instance of <xref uid=\"com.azure.core.util.ReferenceManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReferenceManager\"></xref> that should be used to maintain object references."
|
|
methods:
|
|
- uid: "com.azure.core.util.ReferenceManager.register(java.lang.Object,java.lang.Runnable)"
|
|
fullName: "com.azure.core.util.ReferenceManager.register(Object object, Runnable cleanupAction)"
|
|
name: "register(Object object, Runnable cleanupAction)"
|
|
nameWithType: "ReferenceManager.register(Object object, Runnable cleanupAction)"
|
|
summary: "Registers the `object` and the cleaning action to run once the object becomes phantom reachable."
|
|
modifiers:
|
|
- "abstract"
|
|
parameters:
|
|
- description: "The object to monitor."
|
|
name: "object"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
- description: "The cleanup action to perform when the <code>object</code> becomes phantom reachable."
|
|
name: "cleanupAction"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html\">Runnable</a>"
|
|
syntax: "public abstract void register(Object object, Runnable cleanupAction)"
|
|
desc: "Registers the `object` and the cleaning action to run once the object becomes phantom reachable.\n\nThe `cleanupAction` cannot have a reference to the `object`, otherwise the object will never be able to become phantom reachable.\n\nExceptions thrown by `cleanupAction` are ignored."
|
|
type: "interface"
|
|
desc: "This interface represents managing references to <xref uid=\"java.lang.Object\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Objects\"></xref> and providing the ability to run a cleaning operation once the object is no longer able to be reference.\n\nExpected usage of this is through <xref uid=\"com.azure.core.util.ReferenceManager.INSTANCE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReferenceManager#INSTANCE\"></xref>."
|
|
metadata: {}
|
|
package: "com.azure.core.util"
|
|
artifact: com.azure:azure-core:1.32.0
|