GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.nio.MappedByteBufferInputStream.CacheMode Enum Reference
Collaboration diagram for com.jogamp.common.nio.MappedByteBufferInputStream.CacheMode:

Public Attributes

 FLUSH_NONE
 Keep all previous lazily cached buffer slices alive, useful for hopping readers, i.e. More...
 
 FLUSH_PRE_SOFT
 Soft flush the previous lazily cached buffer slice when caching the next buffer slice, useful for sequential forward readers, as well as for hopping readers like FLUSH_NONE in case of relatively short periods between hopping across slices. More...
 
 FLUSH_PRE_HARD
 Hard flush the previous lazily cached buffer slice when caching the next buffer slice, useful for sequential forward readers. More...
 

Detailed Description

Definition at line 60 of file MappedByteBufferInputStream.java.

Member Data Documentation

◆ FLUSH_NONE

com.jogamp.common.nio.MappedByteBufferInputStream.CacheMode.FLUSH_NONE

Keep all previous lazily cached buffer slices alive, useful for hopping readers, i.e.

random access via position(p) or reset().

Note that without flushing, the platform may fail memory mapping due to virtual address space exhaustion.
In such case an OutOfMemoryError may be thrown directly, or encapsulated as the the cause of a thrown IOException.

Definition at line 73 of file MappedByteBufferInputStream.java.

◆ FLUSH_PRE_HARD

com.jogamp.common.nio.MappedByteBufferInputStream.CacheMode.FLUSH_PRE_HARD

Hard flush the previous lazily cached buffer slice when caching the next buffer slice, useful for sequential forward readers.

Besides clearing the buffer slice reference, implementation attempts to hard flush the mapped buffer using a sun.misc.Cleaner by reflection. In case such method does not exist nor works, implementation falls back to FLUSH_PRE_SOFT.

This is the default.

Definition at line 99 of file MappedByteBufferInputStream.java.

◆ FLUSH_PRE_SOFT

com.jogamp.common.nio.MappedByteBufferInputStream.CacheMode.FLUSH_PRE_SOFT

Soft flush the previous lazily cached buffer slice when caching the next buffer slice, useful for sequential forward readers, as well as for hopping readers like FLUSH_NONE in case of relatively short periods between hopping across slices.

Implementation clears the buffer slice reference while preserving a WeakReference to allow its resurrection if not yet garbage collected.

Definition at line 84 of file MappedByteBufferInputStream.java.


The documentation for this enum was generated from the following file: