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 class
ClosureMagazine.Handle
-
Field Summary
Fields Modifier and Type Field Description private CallContext
callContext
keep a reference to the call context, to avoid GC whilst the magazine is in useprivate int
disposed
private Foreign
foreign
A handle to the foreign interface to keep it alive as long as this object is aliveprivate long
magazineAddress
private 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.Handle
allocate(java.lang.Object proxy)
void
dispose()
protected void
finalize()
-
-
-
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:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-