Package org.postgresql.pljava.internal
Class DualState.BBHeapFreeTuple<T>
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference<T>
org.postgresql.pljava.internal.DualState<T>
org.postgresql.pljava.internal.DualState.SingleGuardedBB<T>
org.postgresql.pljava.internal.DualState.BBHeapFreeTuple<T>
A
DualState
subclass whose only native resource releasing action
needed is heap_freetuple
of the address of a direct byte buffer.-
Nested Class Summary
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>
-
Constructor Summary
ModifierConstructorDescriptionprotected
BBHeapFreeTuple
(T referent, Lifespan span, ByteBuffer hftTarget) -
Method Summary
Modifier and TypeMethodDescriptionReturn aprintf
format string resembling"%s something(%s)"
where the second%s
will be the value being guarded; the "something" should indicate what the value represents, or what will be done with it when released by Java.protected void
javaStateUnreachable
(boolean nativeStateLive) When the Java state is released or unreachable, aheap_freetuple
call is made so the native memory is released without having to wait for release of its containing context.Methods inherited from class org.postgresql.pljava.internal.DualState.SingleGuardedBB
guardedBuffer, toString
Methods inherited from class org.postgresql.pljava.internal.DualState
adoptionLock, adoptionUnlock, clear, enqueue, get, identifierForMessage, invalidMessage, invalidSqlState, javaStateReleased, lock, m, nativeStateReleased, pin, pinned, pinnedByCurrentThread, pinnedNoChecked, pinUnlessReleased, referent, releasedMessage, releasedSqlState, releaseFromJava, toString, unlessReleased, unlock, unlock, unpin
Methods inherited from class java.lang.ref.Reference
clone, isEnqueued, reachabilityFence, refersTo
-
Constructor Details
-
BBHeapFreeTuple
-
-
Method Details
-
formatString
Description copied from class:DualState.SingleGuardedBB
Return aprintf
format string resembling"%s something(%s)"
where the second%s
will be the value being guarded; the "something" should indicate what the value represents, or what will be done with it when released by Java.- Overrides:
formatString
in classDualState.SingleGuardedBB<T>
-
javaStateUnreachable
protected void javaStateUnreachable(boolean nativeStateLive) When the Java state is released or unreachable, aheap_freetuple
call is made so the native memory is released without having to wait for release of its containing context.- Overrides:
javaStateUnreachable
in classDualState<T>
- Parameters:
nativeStateLive
- true is passed if the instance's "native state" is still considered live, that is, no lifespan callback has been invoked to stamp it invalid (nor has it been "adopted").
-