Class ResourceOwnerImpl

All Implemented Interfaces:
LifespanImpl.Addressed, Lifespan, ResourceOwner

public class ResourceOwnerImpl extends LifespanImpl implements ResourceOwner, LifespanImpl.Addressed
A PostgreSQL ResourceOwner, one of the things that can serve as a PL/Java Lifespan.

The designer of this PostgreSQL object believed strongly in encapsulation, so very strongly that there is not any C header exposing its structure, and any operations to be exposed here will have to be calls through JNI. While a ResourceOwner does have a name (which will appear in log messages involving it), there's not even an exposed API to retrieve that. So this object will be not much more than a stub, known by its address and capable of serving as a PL/Java lifespan.

  • Method Details

    • fromAddress

      public static ResourceOwner fromAddress(long address)
    • getCurrentRaw

      public static long getCurrentRaw()
      Specialized method intended, so far, only for PgSavepoint's use.

      Only to be called on the PG thread.

    • setCurrentRaw

      public static void setCurrentRaw(long owner)
      Even more specialized method intended, so far, only for PgSavepoint's use.

      Only to be called on the PG thread.

    • address

      public long address()
      Specified by:
      address in interface LifespanImpl.Addressed
    • toString

      public String toString()
      Description copied from class: DualState
      Produce a string describing this state object in a way useful for debugging, with such information as the associated Lifespan and whether the state is fresh or stale.

      This method calls DualState.toString(Object) passing this. Subclasses are encouraged to override that method with versions that add subclass-specific details.

      Overrides:
      toString in class LifespanImpl
      Returns:
      Description of this state object.