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.internal.Invocation
- All Implemented Interfaces:
Lifespan
One invocation, from PostgreSQL, of functionality implemented using PL/Java.
This class is the Java counterpart of the struct Invocation_
in the
C code, but while there is a new stack-allocated C structure on every entry
from PG to PL/Java, no instance of this class is created unless requested
(with current()
; once requested, a reference to it is saved
in the C struct for the duration of the invocation.
- Author:
- Thomas Hallgren
-
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 TypeMethodDescriptionstatic void
static Invocation
current()
int
final PgSavepoint
final void
setSavepoint
(PgSavepoint savepoint) static MemoryContext
The "upper executor" memory context (that is, the context on entry, prior to anySPI_connect
) associated with the current (innermost) invocation.Methods inherited from class org.postgresql.pljava.internal.LifespanImpl
toString, 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
-
getNestingLevel
public int getNestingLevel()- Returns:
- The nesting level of this invocation
-
getSavepoint
- Returns:
- Returns the savePoint.
-
setSavepoint
- Parameters:
savepoint
- The savepoint to set.
-
current
- Returns:
- The current invocation
-
upperExecutorContext
The "upper executor" memory context (that is, the context on entry, prior to anySPI_connect
) associated with the current (innermost) invocation. -
clearErrorCondition
public static void clearErrorCondition()
-