Top Description Fields Constructors Methods
org.jruby.ext.ffi.jffi

pack-priv final Class CallbackMemoryIO

extends InvalidMemoryIO
implements AllocatedDirectMemoryIO
Class Inheritance
All Implemented Interfaces
org.jruby.ext.ffi.AllocatedDirectMemoryIO
Imports
com.kenai.jffi.Closure, org.jruby.Ruby, org.jruby.ext.ffi.AllocatedDirectMemoryIO, .InvalidMemoryIO, java.util.concurrent.atomic.AtomicBoolean

An implementation of MemoryIO that throws exceptions on any attempt to read/write the callback memory area (which is code). This also keeps the callback alive via the handle member, as long as this CallbackMemoryIO instance is contained in a valid Callback pointer.

Field Summary

Modifier and TypeField and Description
private final Closure.Handle
private Object
private volatile boolean
private volatile boolean
Inherited from org.jruby.ext.ffi.InvalidMemoryIO:
runtime

Constructor Summary

AccessConstructor and Description
public
CallbackMemoryIO(Ruby runtime, Closure.Handle handle, Object proc)

public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public boolean
public synchronized void
Inherited from org.jruby.ext.ffi.InvalidMemoryIO:
arrayarrayLengtharrayOffsetasByteBuffercleardupexgetgetgetgetgetgetgetAddressgetBytegetDoublegetErrorClassgetFloatgetIntgetLonggetMemoryIOgetNativeLonggetShortgetZeroTerminatedByteArraygetZeroTerminatedByteArrayindexOfindexOforderputputputputputputputAddressputByteputDoubleputFloatputIntputLongputMemoryIOputNativeLongputShortputZeroTerminatedByteArraysetMemorysliceslice

Field Detail

handleback to summary
private final Closure.Handle handle
procback to summary
private Object proc
releasedback to summary
private volatile boolean released
unmanagedback to summary
private volatile boolean unmanaged

Constructor Detail

CallbackMemoryIOback to summary
public CallbackMemoryIO(Ruby runtime, Closure.Handle handle, Object proc)
CallbackMemoryIOback to summary
public CallbackMemoryIO(Ruby runtime, Closure.Handle handle)

Method Detail

freeback to summary
public synchronized void free()

Implements org.jruby.ext.ffi.AllocatedDirectMemoryIO.free.

isAutoReleaseback to summary
public boolean isAutoRelease()

Implements org.jruby.ext.ffi.AllocatedDirectMemoryIO.isAutoRelease.

setAutoReleaseback to summary
public synchronized void setAutoRelease(boolean autorelease)

Implements org.jruby.ext.ffi.AllocatedDirectMemoryIO.setAutoRelease.