java.lang.Object
java.lang.ref.Reference<String>
java.lang.ref.WeakReference<String>
org.postgresql.pljava.internal.DualState<String>
org.postgresql.pljava.internal.DualState.ListHead
org.postgresql.pljava.internal.LifespanImpl
org.postgresql.pljava.pg.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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.postgresql.pljava.internal.LifespanImpl
LifespanImpl.Addressed
Nested classes/interfaces inherited from class org.postgresql.pljava.internal.DualState
DualState.BBHeapFreeTuple<T>, DualState.ListHead, DualState.Pinned, DualState.SingleDeleteGlobalRefP<T>, DualState.SingleFreeErrorData<T>, DualState.SingleFreeTupleDesc<T>, DualState.SingleGuardedBB<T>, DualState.SingleGuardedLong<T>, DualState.SingleHeapFreeTuple<T>, DualState.SingleMemContextDelete<T>, DualState.SinglePfree<T>, DualState.SingleSPIcursorClose<T>, DualState.SingleSPIfreeplan<T>, DualState.SingleSPIfreetuptable<T>
-
Method Summary
Modifier and TypeMethodDescriptionlong
address()
static ResourceOwner
fromAddress
(long address) static long
Specialized method intended, so far, only forPgSavepoint
's use.static void
setCurrentRaw
(long owner) Even more specialized method intended, so far, only forPgSavepoint
's use.toString()
Produce a string describing this state object in a way useful for debugging, with such information as the associatedLifespan
and whether the state is fresh or stale.Methods inherited from class org.postgresql.pljava.internal.LifespanImpl
toString
Methods inherited from class org.postgresql.pljava.internal.DualState.ListHead
lifespanRelease
Methods inherited from class org.postgresql.pljava.internal.DualState
adoptionLock, adoptionUnlock, clear, enqueue, get, identifierForMessage, invalidMessage, invalidSqlState, javaStateReleased, javaStateUnreachable, lock, m, nativeStateReleased, pin, pinned, pinnedByCurrentThread, pinnedNoChecked, pinUnlessReleased, referent, releasedMessage, releasedSqlState, releaseFromJava, unlessReleased, unlock, unlock, unpin
Methods inherited from class java.lang.ref.Reference
clone, isEnqueued, reachabilityFence, refersTo
-
Method Details
-
fromAddress
-
getCurrentRaw
public static long getCurrentRaw()Specialized method intended, so far, only forPgSavepoint
'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 forPgSavepoint
's use.Only to be called on the PG thread.
-
address
public long address()- Specified by:
address
in interfaceLifespanImpl.Addressed
-
toString
Description copied from class:DualState
Produce a string describing this state object in a way useful for debugging, with such information as the associatedLifespan
and whether the state is fresh or stale.This method calls
DualState.toString(Object)
passingthis
. Subclasses are encouraged to override that method with versions that add subclass-specific details.- Overrides:
toString
in classLifespanImpl
- Returns:
- Description of this state object.
-