Class SyncUtil


  • public class SyncUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean SKIP_SYNC  
    • Constructor Summary

      Constructors 
      Constructor Description
      SyncUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void force​(java.nio.channels.FileChannel fc, boolean metaData)  
      static java.nio.MappedByteBuffer force​(java.nio.MappedByteBuffer buf)  
      static void sync​(java.io.FileDescriptor fd)  
      static void sync​(java.io.FileOutputStream fos)  
      static void trySync​(int fd)  
      static void trySyncDir​(File dir)  
      • Methods inherited from class java.lang.Object

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

      • SKIP_SYNC

        public static final boolean SKIP_SYNC
    • Constructor Detail

      • SyncUtil

        public SyncUtil()
    • Method Detail

      • force

        public static java.nio.MappedByteBuffer force​(java.nio.MappedByteBuffer buf)
      • sync

        public static void sync​(java.io.FileDescriptor fd)
                         throws java.io.SyncFailedException
        Throws:
        java.io.SyncFailedException
      • force

        public static void force​(java.nio.channels.FileChannel fc,
                                 boolean metaData)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • sync

        public static void sync​(java.io.FileOutputStream fos)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • trySync

        public static void trySync​(int fd)
      • trySyncDir

        public static void trySyncDir​(File dir)