final class org.apache.cassandra.db.lifecycle.LogReplica implements java.lang.AutoCloseable
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.db.lifecycle.LogReplica
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.io.File file;
descriptor: Ljava/io/File;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private int directoryDescriptor;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private final java.util.Map<java.lang.String, java.lang.String> errors;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/db/lifecycle/LogReplica;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.db.lifecycle.LogReplica.logger:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
static org.apache.cassandra.db.lifecycle.LogReplica create(java.io.File, java.lang.String);
descriptor: (Ljava/io/File;Ljava/lang/String;)Lorg/apache/cassandra/db/lifecycle/LogReplica;
flags: (0x0008) ACC_STATIC
Code:
stack=9, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic org.apache.cassandra.utils.NativeLibrary.tryOpenDirectory:(Ljava/lang/String;)I
istore 2
start local 2 1: iload 2
iconst_m1
if_icmpne 3
2: new org.apache.cassandra.io.FSReadError
dup
new java.io.IOException
dup
ldc "Invalid folder descriptor trying to create log replica %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.io.File.getPath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokespecial org.apache.cassandra.io.FSReadError.<init>:(Ljava/lang/Throwable;Ljava/lang/String;)V
athrow
3: StackMap locals: int
StackMap stack:
new org.apache.cassandra.db.lifecycle.LogReplica
dup
new java.io.File
dup
aload 1
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
iload 2
invokespecial org.apache.cassandra.db.lifecycle.LogReplica.<init>:(Ljava/io/File;I)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 directory Ljava/io/File;
0 4 1 fileName Ljava/lang/String;
1 4 2 folderFD I
MethodParameters:
Name Flags
directory
fileName
static org.apache.cassandra.db.lifecycle.LogReplica open(java.io.File);
descriptor: (Ljava/io/File;)Lorg/apache/cassandra/db/lifecycle/LogReplica;
flags: (0x0008) ACC_STATIC
Code:
stack=9, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokestatic org.apache.cassandra.utils.NativeLibrary.tryOpenDirectory:(Ljava/lang/String;)I
istore 1
start local 1 1: iload 1
iconst_m1
if_icmpne 3
2: new org.apache.cassandra.io.FSReadError
dup
new java.io.IOException
dup
ldc "Invalid folder descriptor trying to create log replica %s"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getPath:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.io.File.getParentFile:()Ljava/io/File;
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokespecial org.apache.cassandra.io.FSReadError.<init>:(Ljava/lang/Throwable;Ljava/lang/String;)V
athrow
3: StackMap locals: int
StackMap stack:
new org.apache.cassandra.db.lifecycle.LogReplica
dup
aload 0
iload 1
invokespecial org.apache.cassandra.db.lifecycle.LogReplica.<init>:(Ljava/io/File;I)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 file Ljava/io/File;
1 4 1 folderFD I
MethodParameters:
Name Flags
file
void <init>(java.io.File, int);
descriptor: (Ljava/io/File;I)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield org.apache.cassandra.db.lifecycle.LogReplica.errors:Ljava/util/Map;
2: aload 0
aload 1
putfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
3: aload 0
iload 2
putfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
0 5 1 file Ljava/io/File;
0 5 2 directoryDescriptor I
MethodParameters:
Name Flags
file
directoryDescriptor
java.io.File file();
descriptor: ()Ljava/io/File;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
java.util.List<java.lang.String> readLines();
descriptor: ()Ljava/util/List;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokestatic org.apache.cassandra.io.util.FileUtils.readLines:(Ljava/io/File;)Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
Signature: ()Ljava/util/List<Ljava/lang/String;>;
java.lang.String getFileName();
descriptor: ()Ljava/lang/String;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokevirtual java.io.File.getName:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
java.lang.String getDirectory();
descriptor: ()Ljava/lang/String;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokevirtual java.io.File.getParent:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
void append(org.apache.cassandra.db.lifecycle.LogRecord);
descriptor: (Lorg/apache/cassandra/db/lifecycle/LogRecord;)V
flags: (0x0000)
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.apache.cassandra.db.lifecycle.LogReplica.exists:()Z
istore 2
start local 2 1: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
iconst_1
anewarray java.lang.String
dup
iconst_0
aload 1
invokevirtual org.apache.cassandra.db.lifecycle.LogRecord.toString:()Ljava/lang/String;
aastore
invokestatic org.apache.cassandra.io.util.FileUtils.appendAndSync:(Ljava/io/File;[Ljava/lang/String;)V
2: goto 6
3: StackMap locals: org.apache.cassandra.db.lifecycle.LogReplica org.apache.cassandra.db.lifecycle.LogRecord int
StackMap stack: org.apache.cassandra.io.FSError
astore 3
start local 3 4: getstatic org.apache.cassandra.db.lifecycle.LogReplica.logger:Lorg/slf4j/Logger;
ldc "Failed to sync file {}"
aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
aload 3
invokeinterface org.slf4j.Logger.error:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
5: aload 3
invokestatic org.apache.cassandra.io.util.FileUtils.handleFSErrorAndPropagate:(Lorg/apache/cassandra/io/FSError;)V
end local 3 6: StackMap locals:
StackMap stack:
iload 2
ifne 8
7: aload 0
invokevirtual org.apache.cassandra.db.lifecycle.LogReplica.syncDirectory:()V
8: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
0 9 1 record Lorg/apache/cassandra/db/lifecycle/LogRecord;
1 9 2 existed Z
4 6 3 e Lorg/apache/cassandra/io/FSError;
Exception table:
from to target type
1 2 3 Class org.apache.cassandra.io.FSError
MethodParameters:
Name Flags
record
void syncDirectory();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
iflt 6
1: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
invokestatic org.apache.cassandra.utils.NativeLibrary.trySync:(I)V
2: goto 6
3: StackMap locals:
StackMap stack: org.apache.cassandra.io.FSError
astore 1
start local 1 4: getstatic org.apache.cassandra.db.lifecycle.LogReplica.logger:Lorg/slf4j/Logger;
ldc "Failed to sync directory descriptor {}"
aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aload 1
invokeinterface org.slf4j.Logger.error:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
5: aload 1
invokestatic org.apache.cassandra.io.util.FileUtils.handleFSErrorAndPropagate:(Lorg/apache/cassandra/io/FSError;)V
end local 1 6: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
4 6 1 e Lorg/apache/cassandra/io/FSError;
Exception table:
from to target type
0 2 3 Class org.apache.cassandra.io.FSError
void delete();
descriptor: ()V
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokestatic org.apache.cassandra.db.lifecycle.LogTransaction.delete:(Ljava/io/File;)V
1: aload 0
invokevirtual org.apache.cassandra.db.lifecycle.LogReplica.syncDirectory:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
boolean exists();
descriptor: ()Z
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokevirtual java.io.File.exists:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
iflt 3
1: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
invokestatic org.apache.cassandra.utils.NativeLibrary.tryCloseFD:(I)V
2: aload 0
iconst_m1
putfield org.apache.cassandra.db.lifecycle.LogReplica.directoryDescriptor:I
3: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: ldc "[%s] "
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
void setError(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.errors:Ljava/util/Map;
aload 1
aload 2
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
0 2 1 line Ljava/lang/String;
0 2 2 error Ljava/lang/String;
MethodParameters:
Name Flags
line
error
void printContentsWithAnyErrors(java.lang.StringBuilder);
descriptor: (Ljava/lang/StringBuilder;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokevirtual java.io.File.getPath:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
1: aload 1
invokestatic java.lang.System.lineSeparator:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
2: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.file:Ljava/io/File;
invokestatic org.apache.cassandra.io.util.FileUtils.readLines:(Ljava/io/File;)Ljava/util/List;
aload 0
aload 1
invokedynamic accept(Lorg/apache/cassandra/db/lifecycle/LogReplica;Ljava/lang/StringBuilder;)Ljava/util/function/Consumer;
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:
(Ljava/lang/Object;)V
org/apache/cassandra/db/lifecycle/LogReplica.lambda$0(Ljava/lang/StringBuilder;Ljava/lang/String;)V (7)
(Ljava/lang/String;)V
invokeinterface java.util.List.forEach:(Ljava/util/function/Consumer;)V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
0 4 1 str Ljava/lang/StringBuilder;
MethodParameters:
Name Flags
str
private void printLineWithAnyError(java.lang.StringBuilder, java.lang.String);
descriptor: (Ljava/lang/StringBuilder;Ljava/lang/String;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
bipush 9
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
pop
1: aload 1
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
2: aload 1
invokestatic java.lang.System.lineSeparator:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
3: aload 0
getfield org.apache.cassandra.db.lifecycle.LogReplica.errors:Ljava/util/Map;
aload 2
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 3
start local 3 4: aload 3
ifnull 8
5: aload 1
ldc "\t\t***"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
6: aload 1
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
7: aload 1
invokestatic java.lang.System.lineSeparator:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
8: StackMap locals: java.lang.String
StackMap stack:
return
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/db/lifecycle/LogReplica;
0 9 1 str Ljava/lang/StringBuilder;
0 9 2 line Ljava/lang/String;
4 9 3 error Ljava/lang/String;
MethodParameters:
Name Flags
str
line
private void lambda$0(java.lang.StringBuilder, java.lang.String);
descriptor: (Ljava/lang/StringBuilder;Ljava/lang/String;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 2 0: aload 0
aload 1
aload 2
invokevirtual org.apache.cassandra.db.lifecycle.LogReplica.printLineWithAnyError:(Ljava/lang/StringBuilder;Ljava/lang/String;)V
return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/db/lifecycle/LogReplica;
0 1 2 line Ljava/lang/String;
}
SourceFile: "LogReplica.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles