Package org.postgresql.pljava.internal
Class DualState.SingleHeapFreeTuple<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.SingleGuardedLong<T>
-
- org.postgresql.pljava.internal.DualState.SingleHeapFreeTuple<T>
-
public abstract static class DualState.SingleHeapFreeTuple<T> extends DualState.SingleGuardedLong<T>
ADualState
subclass whose only native resource releasing action needed isheap_freetuple
of a single pointer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.postgresql.pljava.internal.DualState
DualState.Key, DualState.SingleFreeErrorData<T>, DualState.SingleFreeTupleDesc<T>, DualState.SingleGuardedLong<T>, DualState.SingleHeapFreeTuple<T>, DualState.SingleMemContextDelete<T>, DualState.SinglePfree<T>, DualState.SingleSPIcursorClose<T>, DualState.SingleSPIfreeplan<T>
-
-
Field Summary
-
Fields inherited from class org.postgresql.pljava.internal.DualState
m_resourceOwner
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleHeapFreeTuple(DualState.Key cookie, T referent, long resourceOwner, long hftTarget)
-
Method Summary
Modifier and Type Method Description String
formatString()
Return aprintf
format string resembling"%s something(%x)"
where the%x
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.SingleGuardedLong
guardedLong, toString
-
Methods inherited from class org.postgresql.pljava.internal.DualState
adoptionLock, adoptionUnlock, checkCookie, clear, enqueue, get, identifierForMessage, invalidMessage, invalidSqlState, javaStateReleased, lock, nativeStateReleased, pin, pinnedByCurrentThread, pinUnlessReleased, referent, releasedMessage, releasedSqlState, releaseFromJava, toString, unlock, unlock, unpin
-
Methods inherited from class java.lang.ref.Reference
clone, isEnqueued, reachabilityFence
-
-
-
-
Constructor Detail
-
SingleHeapFreeTuple
protected SingleHeapFreeTuple(DualState.Key cookie, T referent, long resourceOwner, long hftTarget)
-
-
Method Detail
-
formatString
public String formatString()
Description copied from class:DualState.SingleGuardedLong
Return aprintf
format string resembling"%s something(%x)"
where the%x
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.SingleGuardedLong<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 resource-owner callback has been invoked to stamp it invalid (nor has it been "adopted").
-
-