Class 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 use
      private int disposed  
      private Foreign foreign
      A handle to the foreign interface to keep it alive as long as this object is alive
      private long magazineAddress  
      private static java.util.concurrent.atomic.AtomicIntegerFieldUpdater<ClosureMagazine> UPDATER  
    • 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()