class org.apache.cassandra.hints.HintsWriter implements java.lang.AutoCloseable
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.apache.cassandra.hints.HintsWriter
super_class: java.lang.Object
{
static final int PAGE_SIZE;
descriptor: I
flags: (0x0018) ACC_STATIC, ACC_FINAL
ConstantValue: 4096
private final java.io.File directory;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.hints.HintsDescriptor descriptor;
descriptor: Lorg/apache/cassandra/hints/HintsDescriptor;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.io.File file;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
protected final java.nio.channels.FileChannel channel;
descriptor: Ljava/nio/channels/FileChannel;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
private final int fd;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
protected final java.util.zip.CRC32 globalCRC;
descriptor: Ljava/util/zip/CRC32;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
private volatile long lastSyncPosition;
descriptor: J
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
protected void <init>(java.io.File, org.apache.cassandra.hints.HintsDescriptor, java.io.File, java.nio.channels.FileChannel, int, java.util.zip.CRC32);
descriptor: (Ljava/io/File;Lorg/apache/cassandra/hints/HintsDescriptor;Ljava/io/File;Ljava/nio/channels/FileChannel;ILjava/util/zip/CRC32;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=7, args_size=7
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
lconst_0
putfield org.apache.cassandra.hints.HintsWriter.lastSyncPosition:J
2: aload 0
aload 1
putfield org.apache.cassandra.hints.HintsWriter.directory:Ljava/io/File;
3: aload 0
aload 2
putfield org.apache.cassandra.hints.HintsWriter.descriptor:Lorg/apache/cassandra/hints/HintsDescriptor;
4: aload 0
aload 3
putfield org.apache.cassandra.hints.HintsWriter.file:Ljava/io/File;
5: aload 0
aload 4
putfield org.apache.cassandra.hints.HintsWriter.channel:Ljava/nio/channels/FileChannel;
6: aload 0
iload 5
putfield org.apache.cassandra.hints.HintsWriter.fd:I
7: aload 0
aload 6
putfield org.apache.cassandra.hints.HintsWriter.globalCRC:Ljava/util/zip/CRC32;
8: return
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/cassandra/hints/HintsWriter;
0 9 1 directory Ljava/io/File;
0 9 2 descriptor Lorg/apache/cassandra/hints/HintsDescriptor;
0 9 3 file Ljava/io/File;
0 9 4 channel Ljava/nio/channels/FileChannel;
0 9 5 fd I
0 9 6 globalCRC Ljava/util/zip/CRC32;
MethodParameters:
Name Flags
directory
descriptor
file
channel
fd
globalCRC
static org.apache.cassandra.hints.HintsWriter create(java.io.File, org.apache.cassandra.hints.HintsDescriptor);
descriptor: (Ljava/io/File;Lorg/apache/cassandra/hints/HintsDescriptor;)Lorg/apache/cassandra/hints/HintsWriter;
flags: (0x0008) ACC_STATIC
Code:
stack=8, locals=10, args_size=2
start local 0 start local 1 0: new java.io.File
dup
aload 0
aload 1
invokevirtual org.apache.cassandra.hints.HintsDescriptor.fileName:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 2
start local 2 1: aload 2
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_2
anewarray java.nio.file.OpenOption
dup
iconst_0
getstatic java.nio.file.StandardOpenOption.WRITE:Ljava/nio/file/StandardOpenOption;
aastore
dup
iconst_1
getstatic java.nio.file.StandardOpenOption.CREATE_NEW:Ljava/nio/file/StandardOpenOption;
aastore
invokestatic java.nio.channels.FileChannel.open:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/FileChannel;
astore 3
start local 3 2: aload 3
invokestatic org.apache.cassandra.utils.NativeLibrary.getfd:(Ljava/nio/channels/FileChannel;)I
istore 4
start local 4 3: new java.util.zip.CRC32
dup
invokespecial java.util.zip.CRC32.<init>:()V
astore 5
start local 5 4: aconst_null
astore 6
aconst_null
astore 7
5: getstatic org.apache.cassandra.io.util.DataOutputBuffer.scratchBuffer:Lio/netty/util/concurrent/FastThreadLocal;
invokevirtual io.netty.util.concurrent.FastThreadLocal.get:()Ljava/lang/Object;
checkcast org.apache.cassandra.io.util.DataOutputBuffer
astore 8
start local 8 6: aload 1
aload 8
invokevirtual org.apache.cassandra.hints.HintsDescriptor.serialize:(Lorg/apache/cassandra/io/util/DataOutputPlus;)V
7: aload 8
invokevirtual org.apache.cassandra.io.util.DataOutputBuffer.buffer:()Ljava/nio/ByteBuffer;
astore 9
start local 9 8: aload 5
aload 9
invokestatic org.apache.cassandra.utils.FBUtilities.updateChecksum:(Ljava/util/zip/CRC32;Ljava/nio/ByteBuffer;)V
9: aload 3
aload 9
invokevirtual java.nio.channels.FileChannel.write:(Ljava/nio/ByteBuffer;)I
pop
end local 9 10: aload 8
ifnull 19
aload 8
invokevirtual org.apache.cassandra.io.util.DataOutputBuffer.close:()V
goto 19
StackMap locals: java.io.File org.apache.cassandra.hints.HintsDescriptor java.io.File java.nio.channels.FileChannel int java.util.zip.CRC32 java.lang.Throwable java.lang.Throwable org.apache.cassandra.io.util.DataOutputBuffer
StackMap stack: java.lang.Throwable
11: astore 6
aload 8
ifnull 12
aload 8
invokevirtual org.apache.cassandra.io.util.DataOutputBuffer.close:()V
end local 8 StackMap locals:
StackMap stack:
12: aload 6
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
13: astore 7
aload 6
ifnonnull 14
aload 7
astore 6
goto 15
StackMap locals:
StackMap stack:
14: aload 6
aload 7
if_acmpeq 15
aload 6
aload 7
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
15: aload 6
athrow
16: StackMap locals: java.io.File org.apache.cassandra.hints.HintsDescriptor java.io.File java.nio.channels.FileChannel int java.util.zip.CRC32
StackMap stack: java.lang.Throwable
astore 6
start local 6 17: aload 3
invokevirtual java.nio.channels.FileChannel.close:()V
18: aload 6
athrow
end local 6 19: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.apache.cassandra.hints.HintsDescriptor.isEncrypted:()Z
ifeq 21
20: new org.apache.cassandra.hints.EncryptedHintsWriter
dup
aload 0
aload 1
aload 2
aload 3
iload 4
aload 5
invokespecial org.apache.cassandra.hints.EncryptedHintsWriter.<init>:(Ljava/io/File;Lorg/apache/cassandra/hints/HintsDescriptor;Ljava/io/File;Ljava/nio/channels/FileChannel;ILjava/util/zip/CRC32;)V
areturn
21: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.apache.cassandra.hints.HintsDescriptor.isCompressed:()Z
ifeq 23
22: new org.apache.cassandra.hints.CompressedHintsWriter
dup
aload 0
aload 1
aload 2
aload 3
iload 4
aload 5
invokespecial org.apache.cassandra.hints.CompressedHintsWriter.<init>:(Ljava/io/File;Lorg/apache/cassandra/hints/HintsDescriptor;Ljava/io/File;Ljava/nio/channels/FileChannel;ILjava/util/zip/CRC32;)V
areturn
23: StackMap locals:
StackMap stack:
new org.apache.cassandra.hints.HintsWriter
dup
aload 0
aload 1
aload 2
aload 3
iload 4
aload 5
invokespecial org.apache.cassandra.hints.HintsWriter.<init>:(Ljava/io/File;Lorg/apache/cassandra/hints/HintsDescriptor;Ljava/io/File;Ljava/nio/channels/FileChannel;ILjava/util/zip/CRC32;)V
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 24 0 directory Ljava/io/File;
0 24 1 descriptor Lorg/apache/cassandra/hints/HintsDescriptor;
1 24 2 file Ljava/io/File;
2 24 3 channel Ljava/nio/channels/FileChannel;
3 24 4 fd I
4 24 5 crc Ljava/util/zip/CRC32;
6 12 8 dob Lorg/apache/cassandra/io/util/DataOutputBuffer;
8 10 9 descriptorBytes Ljava/nio/ByteBuffer;
17 19 6 e Ljava/lang/Throwable;
Exception table:
from to target type
6 10 11 any
5 13 13 any
4 16 16 Class java.lang.Throwable
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
directory
descriptor
org.apache.cassandra.hints.HintsDescriptor descriptor();
descriptor: ()Lorg/apache/cassandra/hints/HintsDescriptor;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsWriter.descriptor:Lorg/apache/cassandra/hints/HintsDescriptor;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/hints/HintsWriter;
private void writeChecksum();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=1
start local 0 0: new java.io.File
dup
aload 0
getfield org.apache.cassandra.hints.HintsWriter.directory:Ljava/io/File;
aload 0
getfield org.apache.cassandra.hints.HintsWriter.descriptor:Lorg/apache/cassandra/hints/HintsDescriptor;
invokevirtual org.apache.cassandra.hints.HintsDescriptor.checksumFileName:()Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/io/File;Ljava/lang/String;)V
astore 1
start local 1 1: aconst_null
astore 2
aconst_null
astore 3
2: aload 1
invokevirtual java.io.File.toPath:()Ljava/nio/file/Path;
iconst_0
anewarray java.nio.file.OpenOption
invokestatic java.nio.file.Files.newOutputStream:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
astore 4
start local 4 3: aload 4
aload 0
getfield org.apache.cassandra.hints.HintsWriter.globalCRC:Ljava/util/zip/CRC32;
invokevirtual java.util.zip.CRC32.getValue:()J
l2i
invokestatic java.lang.Integer.toHexString:(I)Ljava/lang/String;
getstatic java.nio.charset.StandardCharsets.UTF_8:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.io.OutputStream.write:([B)V
4: aload 4
ifnull 12
aload 4
invokevirtual java.io.OutputStream.close:()V
goto 12
StackMap locals: org.apache.cassandra.hints.HintsWriter java.io.File java.lang.Throwable java.lang.Throwable java.io.OutputStream
StackMap stack: java.lang.Throwable
5: astore 2
aload 4
ifnull 6
aload 4
invokevirtual java.io.OutputStream.close:()V
end local 4 StackMap locals:
StackMap stack:
6: aload 2
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
7: astore 3
aload 2
ifnonnull 8
aload 3
astore 2
goto 9
StackMap locals:
StackMap stack:
8: aload 2
aload 3
if_acmpeq 9
aload 2
aload 3
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
9: aload 2
athrow
10: StackMap locals: org.apache.cassandra.hints.HintsWriter java.io.File
StackMap stack: java.io.IOException
astore 2
start local 2 11: new org.apache.cassandra.io.FSWriteError
dup
aload 2
aload 1
invokespecial org.apache.cassandra.io.FSWriteError.<init>:(Ljava/lang/Throwable;Ljava/io/File;)V
athrow
end local 2 12: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/apache/cassandra/hints/HintsWriter;
1 13 1 checksumFile Ljava/io/File;
3 6 4 out Ljava/io/OutputStream;
11 12 2 e Ljava/io/IOException;
Exception table:
from to target type
3 4 5 any
2 7 7 any
1 10 10 Class java.io.IOException
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsWriter.file:Ljava/io/File;
getstatic org.apache.cassandra.utils.Throwables$FileOpType.WRITE:Lorg/apache/cassandra/utils/Throwables$FileOpType;
iconst_2
anewarray org.apache.cassandra.utils.Throwables$DiscreteAction
dup
iconst_0
aload 0
invokedynamic perform(Lorg/apache/cassandra/hints/HintsWriter;)Lorg/apache/cassandra/utils/Throwables$DiscreteAction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
org/apache/cassandra/hints/HintsWriter.doFsync()V (7)
()V
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.hints.HintsWriter.channel:Ljava/nio/channels/FileChannel;
dup
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
pop
invokedynamic perform(Ljava/nio/channels/FileChannel;)Lorg/apache/cassandra/utils/Throwables$DiscreteAction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
java/nio/channels/spi/AbstractInterruptibleChannel.close()V (5)
()V
aastore
invokestatic org.apache.cassandra.utils.Throwables.perform:(Ljava/io/File;Lorg/apache/cassandra/utils/Throwables$FileOpType;[Lorg/apache/cassandra/utils/Throwables$DiscreteAction;)V
1: aload 0
invokevirtual org.apache.cassandra.hints.HintsWriter.writeChecksum:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/hints/HintsWriter;
public void fsync();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsWriter.file:Ljava/io/File;
getstatic org.apache.cassandra.utils.Throwables$FileOpType.WRITE:Lorg/apache/cassandra/utils/Throwables$FileOpType;
iconst_1
anewarray org.apache.cassandra.utils.Throwables$DiscreteAction
dup
iconst_0
aload 0
invokedynamic perform(Lorg/apache/cassandra/hints/HintsWriter;)Lorg/apache/cassandra/utils/Throwables$DiscreteAction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
()V
org/apache/cassandra/hints/HintsWriter.doFsync()V (7)
()V
aastore
invokestatic org.apache.cassandra.utils.Throwables.perform:(Ljava/io/File;Lorg/apache/cassandra/utils/Throwables$FileOpType;[Lorg/apache/cassandra/utils/Throwables$DiscreteAction;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/hints/HintsWriter;
private void doFsync();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.hints.HintsWriter.channel:Ljava/nio/channels/FileChannel;
iconst_1
invokestatic org.apache.cassandra.utils.SyncUtil.force:(Ljava/nio/channels/FileChannel;Z)V
1: aload 0
aload 0
getfield org.apache.cassandra.hints.HintsWriter.channel:Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.position:()J
putfield org.apache.cassandra.hints.HintsWriter.lastSyncPosition:J
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/hints/HintsWriter;
Exceptions:
throws java.io.IOException
org.apache.cassandra.hints.HintsWriter$Session newSession(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)Lorg/apache/cassandra/hints/HintsWriter$Session;
flags: (0x0000)
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: new org.apache.cassandra.hints.HintsWriter$Session
dup
aload 0
aload 1
aload 0
getfield org.apache.cassandra.hints.HintsWriter.channel:Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.size:()J
invokespecial org.apache.cassandra.hints.HintsWriter$Session.<init>:(Lorg/apache/cassandra/hints/HintsWriter;Ljava/nio/ByteBuffer;J)V
1: areturn
2: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 3: new org.apache.cassandra.io.FSWriteError
dup
aload 2
aload 0
getfield org.apache.cassandra.hints.HintsWriter.file:Ljava/io/File;
invokespecial org.apache.cassandra.io.FSWriteError.<init>:(Ljava/lang/Throwable;Ljava/io/File;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/hints/HintsWriter;
0 4 1 buffer Ljava/nio/ByteBuffer;
3 4 2 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
buffer
protected void writeBuffer(java.nio.ByteBuffer);
descriptor: (Ljava/nio/ByteBuffer;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.hints.HintsWriter.globalCRC:Ljava/util/zip/CRC32;
aload 1
invokestatic org.apache.cassandra.utils.FBUtilities.updateChecksum:(Ljava/util/zip/CRC32;Ljava/nio/ByteBuffer;)V
1: aload 0
getfield org.apache.cassandra.hints.HintsWriter.channel:Ljava/nio/channels/FileChannel;
aload 1
invokevirtual java.nio.channels.FileChannel.write:(Ljava/nio/ByteBuffer;)I
pop
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/hints/HintsWriter;
0 3 1 bb Ljava/nio/ByteBuffer;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
bb
}
SourceFile: "HintsWriter.java"
NestMembers:
org.apache.cassandra.hints.HintsWriter$Session
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
final Session = org.apache.cassandra.hints.HintsWriter$Session of org.apache.cassandra.hints.HintsWriter
public abstract DiscreteAction = org.apache.cassandra.utils.Throwables$DiscreteAction of org.apache.cassandra.utils.Throwables
public final FileOpType = org.apache.cassandra.utils.Throwables$FileOpType of org.apache.cassandra.utils.Throwables