Class MappedBufferCleaner


  • public class MappedBufferCleaner
    extends java.lang.Object
    Copied/pasted from the Apache Lucene/Solr project.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String UNMAP_NOT_SUPPORTED_REASON
      if UNMAP_SUPPORTED is false, this contains the reason why unmapping is not supported.
      static boolean UNMAP_SUPPORTED
      true, if this platform supports unmapping mmapped files.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void freeBuffer​(java.nio.ByteBuffer b)
      If a cleaner is available, this buffer will be cleaned.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNMAP_SUPPORTED

        public static final boolean UNMAP_SUPPORTED
        true, if this platform supports unmapping mmapped files.
      • UNMAP_NOT_SUPPORTED_REASON

        public static final java.lang.String UNMAP_NOT_SUPPORTED_REASON
        if UNMAP_SUPPORTED is false, this contains the reason why unmapping is not supported.
    • Constructor Detail

      • MappedBufferCleaner

        public MappedBufferCleaner()
    • Method Detail

      • freeBuffer

        public static void freeBuffer​(java.nio.ByteBuffer b)
                               throws java.io.IOException
        If a cleaner is available, this buffer will be cleaned. Otherwise, this is a no-op.
        Parameters:
        b - buffer to clean; no-op if buffer is null
        Throws:
        java.io.IOException