Package com.yourkit.probes
Class ResourceRegistry<T,P>
java.lang.Object
com.yourkit.probes.ResourceRegistry<T,P>
- Type Parameters:
T
- resource classP
- parent resource class; for a top level resources use the derived classMasterResourceRegistry
- Direct Known Subclasses:
DependentResourceRegistry
,MasterResourceRegistry
Don't use this class directly. Instead, use one of its subclasses, depending on the
resource kind:
MasterResourceRegistry
or DependentResourceRegistry
.-
Method Summary
Modifier and TypeMethodDescriptionint
closeOnEnter
(T resource) Use inonEnter
callbackvoid
closeOnExit
(int rowIndex, Throwable exception) Use inonExit
callbackint
static int
getOpenRow
(long resourceID) int
getOrCreate
(T resource) void
void
setOpenException
(int rowIndex, Throwable exception)
-
Method Details
-
closeOnEnter
Use inonEnter
callback -
closeOnExit
Use inonExit
callback -
setOpenException
-
getResourceTable
-
get
- Returns:
- resource table row associated with the resource,
or
Table.NO_ROW
if no row is associated with the resource - See Also:
-
getOrCreate
- Returns:
- resource table row associated with the resource.
If there is a row already associated with the resource, returns it.
Otherwise tries to create, remember and return a new row for the resource.
If the new row cannot be created for some reason, returns
Table.NO_ROW
. - See Also:
-
mapAlias
-
getOpenRow
public static int getOpenRow(long resourceID)
-