Package com.kenai.jffi
Class ClosureMagazine
- java.lang.Object
-
- com.kenai.jffi.ClosureMagazine
-
public final class ClosureMagazine extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classClosureMagazine.Handle
-
Field Summary
Fields Modifier and Type Field Description private CallContextcallContextkeep a reference to the call context, to avoid GC whilst the magazine is in useprivate intdisposedprivate ForeignforeignA handle to the foreign interface to keep it alive as long as this object is aliveprivate longmagazineAddressprivate static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<ClosureMagazine>UPDATER
-
Constructor Summary
Constructors Constructor Description ClosureMagazine(Foreign foreign, CallContext callContext, long magazineAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Closure.Handleallocate(java.lang.Object proxy)voiddispose()protected voidfinalize()
-
-
-
Field Detail
-
foreign
private final Foreign foreign
A handle to the foreign interface to keep it alive as long as this object is alive
-
callContext
private final CallContext callContext
keep a reference to the call context, to avoid GC whilst the magazine is in use
-
magazineAddress
private final long magazineAddress
-
disposed
private volatile int disposed
-
UPDATER
private static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater<ClosureMagazine> UPDATER
-
-
Constructor Detail
-
ClosureMagazine
ClosureMagazine(Foreign foreign, CallContext callContext, long magazineAddress)
-
-
Method Detail
-
allocate
public Closure.Handle allocate(java.lang.Object proxy)
-
dispose
public void dispose()
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-