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 TypeMethodDescriptionintcloseOnEnter(T resource) Use inonEntercallbackvoidcloseOnExit(int rowIndex, Throwable exception) Use inonExitcallbackintstatic intgetOpenRow(long resourceID) intgetOrCreate(T resource) voidvoidsetOpenException(int rowIndex, Throwable exception)
-
Method Details
-
closeOnEnter
Use inonEntercallback -
closeOnExit
Use inonExitcallback -
setOpenException
-
getResourceTable
-
get
- Returns:
- resource table row associated with the resource,
or
Table.NO_ROWif 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)
-