public class org.apache.cassandra.utils.SyncUtil
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.SyncUtil
super_class: java.lang.Object
{
public static boolean SKIP_SYNC;
descriptor: Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
private static final java.lang.reflect.Field mbbFDField;
descriptor: Ljava/lang/reflect/Field;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Field fdClosedField;
descriptor: Ljava/lang/reflect/Field;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Field fdUseCountField;
descriptor: Ljava/lang/reflect/Field;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=3, args_size=0
0: ldc "cassandra.skip_sync"
invokestatic java.lang.Boolean.getBoolean:(Ljava/lang/String;)Z
putstatic org.apache.cassandra.utils.SyncUtil.SKIP_SYNC:Z
1: aconst_null
astore 0
start local 0 2: ldc Ljava/nio/MappedByteBuffer;
ldc "fd"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 0
3: aload 0
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
4: goto 6
5: StackMap locals: java.lang.reflect.Field
StackMap stack: java.lang.NoSuchFieldException
pop
6: StackMap locals:
StackMap stack:
aload 0
putstatic org.apache.cassandra.utils.SyncUtil.mbbFDField:Ljava/lang/reflect/Field;
7: aconst_null
astore 1
start local 1 8: ldc Ljava/io/FileDescriptor;
ldc "closed"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 1
9: aload 1
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
10: goto 12
11: StackMap locals: java.lang.reflect.Field java.lang.reflect.Field
StackMap stack: java.lang.NoSuchFieldException
pop
12: StackMap locals:
StackMap stack:
aload 1
putstatic org.apache.cassandra.utils.SyncUtil.fdClosedField:Ljava/lang/reflect/Field;
13: aconst_null
astore 2
start local 2 14: ldc Ljava/io/FileDescriptor;
ldc "useCount"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
astore 2
15: aload 2
iconst_1
invokevirtual java.lang.reflect.Field.setAccessible:(Z)V
16: goto 18
17: StackMap locals: java.lang.reflect.Field java.lang.reflect.Field java.lang.reflect.Field
StackMap stack: java.lang.NoSuchFieldException
pop
18: StackMap locals:
StackMap stack:
aload 2
putstatic org.apache.cassandra.utils.SyncUtil.fdUseCountField:Ljava/lang/reflect/Field;
end local 2 end local 1 end local 0 19: return
LocalVariableTable:
Start End Slot Name Signature
2 19 0 mbbFDFieldTemp Ljava/lang/reflect/Field;
8 19 1 fdClosedFieldTemp Ljava/lang/reflect/Field;
14 19 2 fdUseCountTemp Ljava/lang/reflect/Field;
Exception table:
from to target type
2 4 5 Class java.lang.NoSuchFieldException
8 10 11 Class java.lang.NoSuchFieldException
14 16 17 Class java.lang.NoSuchFieldException
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/SyncUtil;
public static java.nio.MappedByteBuffer force(java.nio.MappedByteBuffer);
descriptor: (Ljava/nio/MappedByteBuffer;)Ljava/nio/MappedByteBuffer;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic org.apache.cassandra.utils.SyncUtil.SKIP_SYNC:Z
ifeq 11
2: aconst_null
astore 1
start local 1 3: getstatic org.apache.cassandra.utils.SyncUtil.mbbFDField:Ljava/lang/reflect/Field;
ifnull 8
4: getstatic org.apache.cassandra.utils.SyncUtil.mbbFDField:Ljava/lang/reflect/Field;
aload 0
invokevirtual java.lang.reflect.Field.get:(Ljava/lang/Object;)Ljava/lang/Object;
astore 1
5: goto 8
6: StackMap locals: java.nio.MappedByteBuffer java.lang.Object
StackMap stack: java.lang.Exception
astore 2
start local 2 7: new java.lang.RuntimeException
dup
aload 2
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 8: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.SyncUtil.mbbFDField:Ljava/lang/reflect/Field;
ifnull 10
aload 1
ifnonnull 10
9: new java.lang.UnsupportedOperationException
dup
invokespecial java.lang.UnsupportedOperationException.<init>:()V
athrow
10: StackMap locals:
StackMap stack:
aload 0
areturn
end local 1 11: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.nio.MappedByteBuffer.force:()Ljava/nio/MappedByteBuffer;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 buf Ljava/nio/MappedByteBuffer;
3 11 1 fd Ljava/lang/Object;
7 8 2 e Ljava/lang/Exception;
Exception table:
from to target type
3 5 6 Class java.lang.Exception
MethodParameters:
Name Flags
buf
public static void sync(java.io.FileDescriptor);
descriptor: (Ljava/io/FileDescriptor;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic org.apache.cassandra.utils.SyncUtil.SKIP_SYNC:Z
ifeq 16
2: iconst_0
istore 1
start local 1 3: getstatic org.apache.cassandra.utils.SyncUtil.fdClosedField:Ljava/lang/reflect/Field;
ifnull 8
4: getstatic org.apache.cassandra.utils.SyncUtil.fdClosedField:Ljava/lang/reflect/Field;
aload 0
invokevirtual java.lang.reflect.Field.getBoolean:(Ljava/lang/Object;)Z
istore 1
5: goto 8
6: StackMap locals: java.io.FileDescriptor int
StackMap stack: java.lang.Exception
astore 2
start local 2 7: new java.lang.RuntimeException
dup
aload 2
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 8: StackMap locals:
StackMap stack:
iconst_1
istore 2
start local 2 9: getstatic org.apache.cassandra.utils.SyncUtil.fdUseCountField:Ljava/lang/reflect/Field;
ifnull 14
10: getstatic org.apache.cassandra.utils.SyncUtil.fdUseCountField:Ljava/lang/reflect/Field;
aload 0
invokevirtual java.lang.reflect.Field.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.concurrent.atomic.AtomicInteger
invokevirtual java.util.concurrent.atomic.AtomicInteger.get:()I
istore 2
11: goto 14
12: StackMap locals: java.io.FileDescriptor int int
StackMap stack: java.lang.Exception
astore 3
start local 3 13: new java.lang.RuntimeException
dup
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 3 14: StackMap locals:
StackMap stack:
iload 1
ifne 15
aload 0
invokevirtual java.io.FileDescriptor.valid:()Z
ifeq 15
iload 2
ifge 17
15: StackMap locals:
StackMap stack:
new java.io.SyncFailedException
dup
new java.lang.StringBuilder
dup
ldc "Closed "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 1
invokevirtual java.lang.StringBuilder.append:(Z)Ljava/lang/StringBuilder;
ldc " valid "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
invokevirtual java.io.FileDescriptor.valid:()Z
invokevirtual java.lang.StringBuilder.append:(Z)Ljava/lang/StringBuilder;
ldc " useCount "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 2
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.io.SyncFailedException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 16: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.FileDescriptor.sync:()V
17: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 fd Ljava/io/FileDescriptor;
3 16 1 closed Z
7 8 2 e Ljava/lang/Exception;
9 16 2 useCount I
13 14 3 e Ljava/lang/Exception;
Exception table:
from to target type
3 5 6 Class java.lang.Exception
9 11 12 Class java.lang.Exception
Exceptions:
throws java.io.SyncFailedException
MethodParameters:
Name Flags
fd
public static void force(java.nio.channels.FileChannel, boolean);
descriptor: (Ljava/nio/channels/FileChannel;Z)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: getstatic org.apache.cassandra.utils.SyncUtil.SKIP_SYNC:Z
ifeq 4
2: aload 0
invokevirtual java.nio.channels.FileChannel.isOpen:()Z
ifne 5
3: new java.nio.channels.ClosedChannelException
dup
invokespecial java.nio.channels.ClosedChannelException.<init>:()V
athrow
4: StackMap locals:
StackMap stack:
aload 0
iload 1
invokevirtual java.nio.channels.FileChannel.force:(Z)V
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 fc Ljava/nio/channels/FileChannel;
0 6 1 metaData Z
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fc
metaData
public static void sync(java.io.RandomAccessFile);
descriptor: (Ljava/io/RandomAccessFile;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
invokevirtual java.io.RandomAccessFile.getFD:()Ljava/io/FileDescriptor;
invokestatic org.apache.cassandra.utils.SyncUtil.sync:(Ljava/io/FileDescriptor;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 ras Ljava/io/RandomAccessFile;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
ras
public static void sync(java.io.FileOutputStream);
descriptor: (Ljava/io/FileOutputStream;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
invokevirtual java.io.FileOutputStream.getFD:()Ljava/io/FileDescriptor;
invokestatic org.apache.cassandra.utils.SyncUtil.sync:(Ljava/io/FileDescriptor;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 fos Ljava/io/FileOutputStream;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fos
public static void trySync(int);
descriptor: (I)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.SyncUtil.SKIP_SYNC:Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
iload 0
invokestatic org.apache.cassandra.utils.NativeLibrary.trySync:(I)V
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 fd I
MethodParameters:
Name Flags
fd
public static void trySyncDir(java.io.File);
descriptor: (Ljava/io/File;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=3, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.SyncUtil.SKIP_SYNC:Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic org.apache.cassandra.utils.NativeLibrary.tryOpenDirectory:(Ljava/lang/String;)I
istore 1
start local 1 3: iload 1
invokestatic org.apache.cassandra.utils.SyncUtil.trySync:(I)V
4: goto 8
5: StackMap locals: java.io.File int
StackMap stack: java.lang.Throwable
astore 2
6: iload 1
invokestatic org.apache.cassandra.utils.NativeLibrary.tryCloseFD:(I)V
7: aload 2
athrow
8: StackMap locals:
StackMap stack:
iload 1
invokestatic org.apache.cassandra.utils.NativeLibrary.tryCloseFD:(I)V
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 dir Ljava/io/File;
3 10 1 directoryFD I
Exception table:
from to target type
3 5 5 any
MethodParameters:
Name Flags
dir
}
SourceFile: "SyncUtil.java"