|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.postgresql.pljava.internal.NativeStruct
public abstract class NativeStruct
The NativeStruct
maintains a pointer to a piece of memory
allocated with a life cycle that spans a call from the PostgreSQL function
manager (using palloc()
). Since Java uses a garbage collector
and since an object in the Java domain might survive longer than memory
allocated using palloc()
, some code must assert that pointers
from Java objects to such memory is cleared when the function manager call
ends. This code resides in the JNI part of the Pl/Java package.
Constructor Summary | |
---|---|
NativeStruct()
|
Method Summary | |
---|---|
protected long |
getNative()
|
void |
invalidate()
Invalidates this structure and frees up memory allocated for this structure (if any). |
boolean |
isValid()
Returns true if native structure pointer is still valid. |
protected void |
releasePointer()
Invalidates this structure without freeing up memory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NativeStruct()
Method Detail |
---|
public boolean isValid()
true
if native structure pointer is still valid.
public void invalidate()
protected final long getNative()
protected void releasePointer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |