14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 * 25 */ 26 27 package jdk.internal.access.foreign; 28 29 /** 30 * This proxy interface is required to allow instances of the {@code MemoryAddress} interface (which is defined inside 31 * an incubating module) to be accessed from the memory access var handles. 32 */ 33 public interface MemoryAddressProxy { 34 void checkAccess(long offset, long length, boolean readOnly); 35 long unsafeGetOffset(); 36 Object unsafeGetBase(); 37 } | 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 * 25 */ 26 27 package jdk.internal.access.foreign; 28 29 /** 30 * This proxy interface is required to allow instances of the {@code MemoryAddress} interface (which is defined inside 31 * an incubating module) to be accessed from the memory access var handles. 32 */ 33 public interface MemoryAddressProxy { 34 /** 35 * Check that memory access is within spatial and temporal bounds. 36 * @throws IllegalStateException if underlying segment has been closed already. 37 * @throws IndexOutOfBoundsException if access is out-of-bounds. 38 */ 39 void checkAccess(long offset, long length, boolean readOnly); 40 long unsafeGetOffset(); 41 Object unsafeGetBase(); 42 } |