class org.postgresql.hostchooser.MultiHostChooser implements org.postgresql.hostchooser.HostChooser
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: org.postgresql.hostchooser.MultiHostChooser
super_class: java.lang.Object
{
private org.postgresql.util.HostSpec[] hostSpecs;
descriptor: [Lorg/postgresql/util/HostSpec;
flags: (0x0002) ACC_PRIVATE
private final org.postgresql.hostchooser.HostRequirement targetServerType;
descriptor: Lorg/postgresql/hostchooser/HostRequirement;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private int hostRecheckTime;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private boolean loadBalance;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
void <init>(org.postgresql.util.HostSpec[], org.postgresql.hostchooser.HostRequirement, java.util.Properties);
descriptor: ([Lorg/postgresql/util/HostSpec;Lorg/postgresql/hostchooser/HostRequirement;Ljava/util/Properties;)V
flags: (0x0000)
Code:
stack=3, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 1
putfield org.postgresql.hostchooser.MultiHostChooser.hostSpecs:[Lorg/postgresql/util/HostSpec;
2: aload 0
aload 2
putfield org.postgresql.hostchooser.MultiHostChooser.targetServerType:Lorg/postgresql/hostchooser/HostRequirement;
3: aload 0
getstatic org.postgresql.PGProperty.HOST_RECHECK_SECONDS:Lorg/postgresql/PGProperty;
aload 3
invokevirtual org.postgresql.PGProperty.getInt:(Ljava/util/Properties;)I
sipush 1000
imul
putfield org.postgresql.hostchooser.MultiHostChooser.hostRecheckTime:I
4: aload 0
getstatic org.postgresql.PGProperty.LOAD_BALANCE_HOSTS:Lorg/postgresql/PGProperty;
aload 3
invokevirtual org.postgresql.PGProperty.getBoolean:(Ljava/util/Properties;)Z
putfield org.postgresql.hostchooser.MultiHostChooser.loadBalance:Z
5: goto 8
StackMap locals: org.postgresql.hostchooser.MultiHostChooser org.postgresql.util.HostSpec[] org.postgresql.hostchooser.HostRequirement java.util.Properties
StackMap stack: org.postgresql.util.PSQLException
6: astore 4
start local 4 7: new java.lang.RuntimeException
dup
aload 4
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 4 8: StackMap locals:
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/postgresql/hostchooser/MultiHostChooser;
0 9 1 hostSpecs [Lorg/postgresql/util/HostSpec;
0 9 2 targetServerType Lorg/postgresql/hostchooser/HostRequirement;
0 9 3 info Ljava/util/Properties;
7 8 4 e Lorg/postgresql/util/PSQLException;
Exception table:
from to target type
3 5 6 Class org.postgresql.util.PSQLException
MethodParameters:
Name Flags
hostSpecs
targetServerType
info
public java.util.Iterator<org.postgresql.hostchooser.CandidateHost> iterator();
descriptor: ()Ljava/util/Iterator;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual org.postgresql.hostchooser.MultiHostChooser.candidateIterator:()Ljava/util/Iterator;
astore 1
start local 1 1: aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
2: aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.hostSpecs:[Lorg/postgresql/util/HostSpec;
invokestatic java.util.Arrays.asList:([Ljava/lang/Object;)Ljava/util/List;
astore 2
start local 2 3: aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.loadBalance:Z
ifeq 6
4: new java.util.ArrayList
dup
aload 2
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 2
5: aload 2
invokestatic java.util.Collections.shuffle:(Ljava/util/List;)V
6: StackMap locals: java.util.Iterator java.util.List
StackMap stack:
aload 0
aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.targetServerType:Lorg/postgresql/hostchooser/HostRequirement;
aload 2
invokevirtual org.postgresql.hostchooser.MultiHostChooser.withReqStatus:(Lorg/postgresql/hostchooser/HostRequirement;Ljava/util/List;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 1
end local 2 7: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/postgresql/hostchooser/MultiHostChooser;
1 8 1 res Ljava/util/Iterator<Lorg/postgresql/hostchooser/CandidateHost;>;
3 7 2 allHosts Ljava/util/List<Lorg/postgresql/util/HostSpec;>;
Signature: ()Ljava/util/Iterator<Lorg/postgresql/hostchooser/CandidateHost;>;
private java.util.Iterator<org.postgresql.hostchooser.CandidateHost> candidateIterator();
descriptor: ()Ljava/util/Iterator;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=3, args_size=1
start local 0 0: aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.targetServerType:Lorg/postgresql/hostchooser/HostRequirement;
getstatic org.postgresql.hostchooser.HostRequirement.preferSecondary:Lorg/postgresql/hostchooser/HostRequirement;
if_acmpeq 2
1: aload 0
aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.targetServerType:Lorg/postgresql/hostchooser/HostRequirement;
invokevirtual org.postgresql.hostchooser.MultiHostChooser.getCandidateHosts:(Lorg/postgresql/hostchooser/HostRequirement;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
areturn
2: StackMap locals:
StackMap stack:
aload 0
getstatic org.postgresql.hostchooser.HostRequirement.secondary:Lorg/postgresql/hostchooser/HostRequirement;
invokevirtual org.postgresql.hostchooser.MultiHostChooser.getCandidateHosts:(Lorg/postgresql/hostchooser/HostRequirement;)Ljava/util/List;
astore 1
start local 1 3: aload 0
getstatic org.postgresql.hostchooser.HostRequirement.any:Lorg/postgresql/hostchooser/HostRequirement;
invokevirtual org.postgresql.hostchooser.MultiHostChooser.getCandidateHosts:(Lorg/postgresql/hostchooser/HostRequirement;)Ljava/util/List;
astore 2
start local 2 4: aload 1
invokeinterface java.util.List.isEmpty:()Z
ifeq 6
5: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
areturn
6: StackMap locals: java.util.List java.util.List
StackMap stack:
aload 2
invokeinterface java.util.List.isEmpty:()Z
ifeq 8
7: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
areturn
8: StackMap locals:
StackMap stack:
aload 1
aload 1
invokeinterface java.util.List.size:()I
iconst_1
isub
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast org.postgresql.hostchooser.CandidateHost
aload 2
iconst_0
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 10
9: aload 0
iconst_1
aload 1
invokevirtual org.postgresql.hostchooser.MultiHostChooser.rtrim:(ILjava/util/List;)Ljava/util/List;
astore 1
10: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 2
invokevirtual org.postgresql.hostchooser.MultiHostChooser.append:(Ljava/util/List;Ljava/util/List;)Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/postgresql/hostchooser/MultiHostChooser;
3 11 1 secondaries Ljava/util/List<Lorg/postgresql/hostchooser/CandidateHost;>;
4 11 2 any Ljava/util/List<Lorg/postgresql/hostchooser/CandidateHost;>;
Signature: ()Ljava/util/Iterator<Lorg/postgresql/hostchooser/CandidateHost;>;
private java.util.List<org.postgresql.hostchooser.CandidateHost> getCandidateHosts(org.postgresql.hostchooser.HostRequirement);
descriptor: (Lorg/postgresql/hostchooser/HostRequirement;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.hostSpecs:[Lorg/postgresql/util/HostSpec;
aload 1
aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.hostRecheckTime:I
i2l
invokestatic org.postgresql.hostchooser.GlobalHostStatusTracker.getCandidateHosts:([Lorg/postgresql/util/HostSpec;Lorg/postgresql/hostchooser/HostRequirement;J)Ljava/util/List;
1: astore 2
start local 2 2: aload 0
getfield org.postgresql.hostchooser.MultiHostChooser.loadBalance:Z
ifeq 4
3: aload 2
invokestatic java.util.Collections.shuffle:(Ljava/util/List;)V
4: StackMap locals: java.util.List
StackMap stack:
aload 0
aload 1
aload 2
invokevirtual org.postgresql.hostchooser.MultiHostChooser.withReqStatus:(Lorg/postgresql/hostchooser/HostRequirement;Ljava/util/List;)Ljava/util/List;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/postgresql/hostchooser/MultiHostChooser;
0 5 1 hostRequirement Lorg/postgresql/hostchooser/HostRequirement;
2 5 2 candidates Ljava/util/List<Lorg/postgresql/util/HostSpec;>;
Signature: (Lorg/postgresql/hostchooser/HostRequirement;)Ljava/util/List<Lorg/postgresql/hostchooser/CandidateHost;>;
MethodParameters:
Name Flags
hostRequirement
private java.util.List<org.postgresql.hostchooser.CandidateHost> withReqStatus(org.postgresql.hostchooser.HostRequirement, java.util.List<org.postgresql.util.HostSpec>);
descriptor: (Lorg/postgresql/hostchooser/HostRequirement;Ljava/util/List;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new org.postgresql.hostchooser.MultiHostChooser$1
dup
aload 0
aload 2
aload 1
invokespecial org.postgresql.hostchooser.MultiHostChooser$1.<init>:(Lorg/postgresql/hostchooser/MultiHostChooser;Ljava/util/List;Lorg/postgresql/hostchooser/HostRequirement;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/postgresql/hostchooser/MultiHostChooser;
0 1 1 requirement Lorg/postgresql/hostchooser/HostRequirement;
0 1 2 hosts Ljava/util/List<Lorg/postgresql/util/HostSpec;>;
Signature: (Lorg/postgresql/hostchooser/HostRequirement;Ljava/util/List<Lorg/postgresql/util/HostSpec;>;)Ljava/util/List<Lorg/postgresql/hostchooser/CandidateHost;>;
MethodParameters:
Name Flags
requirement final
hosts final
private <T> java.util.List<T> append(java.util.List<T>, java.util.List<T>);
descriptor: (Ljava/util/List;Ljava/util/List;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new org.postgresql.hostchooser.MultiHostChooser$2
dup
aload 0
aload 1
aload 2
invokespecial org.postgresql.hostchooser.MultiHostChooser$2.<init>:(Lorg/postgresql/hostchooser/MultiHostChooser;Ljava/util/List;Ljava/util/List;)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/postgresql/hostchooser/MultiHostChooser;
0 1 1 a Ljava/util/List<TT;>;
0 1 2 b Ljava/util/List<TT;>;
Signature: <T:Ljava/lang/Object;>(Ljava/util/List<TT;>;Ljava/util/List<TT;>;)Ljava/util/List<TT;>;
MethodParameters:
Name Flags
a final
b final
private <T> java.util.List<T> rtrim(int, java.util.List<T>);
descriptor: (ILjava/util/List;)Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new org.postgresql.hostchooser.MultiHostChooser$3
dup
aload 0
aload 2
iload 1
invokespecial org.postgresql.hostchooser.MultiHostChooser$3.<init>:(Lorg/postgresql/hostchooser/MultiHostChooser;Ljava/util/List;I)V
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/postgresql/hostchooser/MultiHostChooser;
0 1 1 size I
0 1 2 a Ljava/util/List<TT;>;
Signature: <T:Ljava/lang/Object;>(ILjava/util/List<TT;>;)Ljava/util/List<TT;>;
MethodParameters:
Name Flags
size final
a final
}
SourceFile: "MultiHostChooser.java"
NestMembers:
org.postgresql.hostchooser.MultiHostChooser$1 org.postgresql.hostchooser.MultiHostChooser$2 org.postgresql.hostchooser.MultiHostChooser$3
InnerClasses:
org.postgresql.hostchooser.MultiHostChooser$1
org.postgresql.hostchooser.MultiHostChooser$2
org.postgresql.hostchooser.MultiHostChooser$3