|Enum Constant and Description|
Keep all previous lazily cached buffer slices alive, useful for hopping readers, i.e.
Hard flush the previous lazily cached buffer slice when caching the next buffer slice, useful for sequential forward readers.
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
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final MappedByteBufferInputStream.CacheMode FLUSH_NONE
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
of a thrown
public static final MappedByteBufferInputStream.CacheMode FLUSH_PRE_SOFT
FLUSH_NONEin case of relatively short periods between hopping across slices.
public static final MappedByteBufferInputStream.CacheMode FLUSH_PRE_HARD
Besides clearing the buffer slice reference,
implementation attempts to hard flush the mapped buffer
sun.misc.Cleaner by reflection.
In case such method does not exist nor works, implementation falls back to
This is the default.
public static MappedByteBufferInputStream.CacheMode values()
for (MappedByteBufferInputStream.CacheMode c : MappedByteBufferInputStream.CacheMode.values()) System.out.println(c);
public static MappedByteBufferInputStream.CacheMode valueOf(String name)