Class ResourceRegistry<T,P>

java.lang.Object
com.yourkit.probes.ResourceRegistry<T,P>
Type Parameters:
T - resource class
P - parent resource class; for a top level resources use the derived class MasterResourceRegistry
Direct Known Subclasses:
DependentResourceRegistry, MasterResourceRegistry

public abstract class ResourceRegistry<T,P> extends Object
Don't use this class directly. Instead, use one of its subclasses, depending on the resource kind: MasterResourceRegistry or DependentResourceRegistry.
  • Method Details

    • closeOnEnter

      public int closeOnEnter(@NotNull T resource)
      Use in onEnter callback
    • closeOnExit

      public void closeOnExit(int rowIndex, @Nullable Throwable exception)
      Use in onExit callback
    • setOpenException

      public void setOpenException(int rowIndex, @Nullable Throwable exception)
    • getResourceTable

      @NotNull public ResourceTable<T> getResourceTable()
    • get

      public int get(T resource)
      Returns:
      resource table row associated with the resource, or Table.NO_ROW if no row is associated with the resource
      See Also:
    • getOrCreate

      public int getOrCreate(T resource)
      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

      public void mapAlias(@Nullable T resource, @Nullable T alias)
    • getOpenRow

      public static int getOpenRow(long resourceID)