public abstract class com.mongodb.TaggableReadPreference extends com.mongodb.ReadPreference
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: com.mongodb.TaggableReadPreference
super_class: com.mongodb.ReadPreference
{
private static final int SMALLEST_MAX_STALENESS_MS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 90000
private static final int IDLE_WRITE_PERIOD_MS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 10000
private final java.util.List<com.mongodb.TagSet> tagSetList;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Lcom/mongodb/TagSet;>;
private final java.lang.Long maxStalenessMS;
descriptor: Ljava/lang/Long;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
void <init>();
descriptor: ()V
flags: (0x0000)
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial com.mongodb.ReadPreference.<init>:()V
1: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
2: aload 0
aconst_null
putfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/TaggableReadPreference;
void <init>(java.util.List<com.mongodb.TagSet>, java.lang.Long, java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/List;Ljava/lang/Long;Ljava/util/concurrent/TimeUnit;)V
flags: (0x0000)
Code:
stack=5, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial com.mongodb.ReadPreference.<init>:()V
1: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
2: ldc "tagSetList"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: ldc "maxStaleness is null or >= 0"
aload 2
ifnull 4
aload 2
invokevirtual java.lang.Long.longValue:()J
lconst_0
lcmp
ifge 4
iconst_0
goto 5
StackMap locals: com.mongodb.TaggableReadPreference java.util.List java.lang.Long java.util.concurrent.TimeUnit
StackMap stack: java.lang.String
4: iconst_1
StackMap locals: com.mongodb.TaggableReadPreference java.util.List java.lang.Long java.util.concurrent.TimeUnit
StackMap stack: java.lang.String int
5: invokestatic com.mongodb.assertions.Assertions.isTrueArgument:(Ljava/lang/String;Z)V
6: aload 0
aload 2
ifnonnull 7
aconst_null
goto 8
StackMap locals:
StackMap stack: com.mongodb.TaggableReadPreference
7: getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
aload 2
invokevirtual java.lang.Long.longValue:()J
aload 3
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
StackMap locals: com.mongodb.TaggableReadPreference java.util.List java.lang.Long java.util.concurrent.TimeUnit
StackMap stack: com.mongodb.TaggableReadPreference java.lang.Long
8: putfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
9: aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
aload 1
invokeinterface java.util.List.addAll:(Ljava/util/Collection;)Z
pop
10: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/TaggableReadPreference;
0 11 1 tagSetList Ljava/util/List<Lcom/mongodb/TagSet;>;
0 11 2 maxStaleness Ljava/lang/Long;
0 11 3 timeUnit Ljava/util/concurrent/TimeUnit;
Signature: (Ljava/util/List<Lcom/mongodb/TagSet;>;Ljava/lang/Long;Ljava/util/concurrent/TimeUnit;)V
RuntimeVisibleParameterAnnotations:
0:
1:
com.mongodb.lang.Nullable()
2:
MethodParameters:
Name Flags
tagSetList final
maxStaleness final
timeUnit final
public boolean isSlaveOk();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/TaggableReadPreference;
public org.bson.BsonDocument toDocument();
descriptor: ()Lorg/bson/BsonDocument;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=2, args_size=1
start local 0 0: new org.bson.BsonDocument
dup
ldc "mode"
new org.bson.BsonString
dup
aload 0
invokevirtual com.mongodb.TaggableReadPreference.getName:()Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokespecial org.bson.BsonDocument.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
astore 1
start local 1 1: aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifne 3
2: aload 1
ldc "tags"
aload 0
invokevirtual com.mongodb.TaggableReadPreference.tagsListToBsonArray:()Lorg/bson/BsonArray;
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
3: StackMap locals: org.bson.BsonDocument
StackMap stack:
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
ifnull 5
4: aload 1
ldc "maxStalenessSeconds"
new org.bson.BsonInt64
dup
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
invokevirtual java.lang.Long.longValue:()J
invokevirtual java.util.concurrent.TimeUnit.toSeconds:(J)J
invokespecial org.bson.BsonInt64.<init>:(J)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
5: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/TaggableReadPreference;
1 6 1 readPrefObject Lorg/bson/BsonDocument;
public java.util.List<com.mongodb.TagSet> getTagSetList();
descriptor: ()Ljava/util/List;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokestatic java.util.Collections.unmodifiableList:(Ljava/util/List;)Ljava/util/List;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/TaggableReadPreference;
Signature: ()Ljava/util/List<Lcom/mongodb/TagSet;>;
public java.lang.Long getMaxStaleness(java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/concurrent/TimeUnit;)Ljava/lang/Long;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: ldc "timeUnit"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
pop
1: aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals:
StackMap stack:
aload 1
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
invokevirtual java.lang.Long.longValue:()J
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/TaggableReadPreference;
0 4 1 timeUnit Ljava/util/concurrent/TimeUnit;
RuntimeVisibleAnnotations:
com.mongodb.lang.Nullable()
MethodParameters:
Name Flags
timeUnit final
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
ldc "ReadPreference{name="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
1: aload 0
invokevirtual com.mongodb.TaggableReadPreference.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
2: aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifeq 3
ldc ""
goto 4
StackMap locals:
StackMap stack: java.lang.StringBuilder
3: new java.lang.StringBuilder
dup
ldc ", tagSetList="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
StackMap locals: com.mongodb.TaggableReadPreference
StackMap stack: java.lang.StringBuilder java.lang.String
4: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
ifnonnull 6
ldc ""
goto 7
StackMap locals:
StackMap stack: java.lang.StringBuilder
6: new java.lang.StringBuilder
dup
ldc ", maxStalenessMS="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
StackMap locals: com.mongodb.TaggableReadPreference
StackMap stack: java.lang.StringBuilder java.lang.String
7: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
8: bipush 125
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
9: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/mongodb/TaggableReadPreference;
public boolean equals(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
if_acmpne 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 1
ifnull 3
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
if_acmpeq 4
3: StackMap locals:
StackMap stack:
iconst_0
ireturn
4: StackMap locals:
StackMap stack:
aload 1
checkcast com.mongodb.TaggableReadPreference
astore 2
start local 2 5: aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
ifnull 6
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
aload 2
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
invokevirtual java.lang.Long.equals:(Ljava/lang/Object;)Z
ifne 8
goto 7
StackMap locals: com.mongodb.TaggableReadPreference
StackMap stack:
6: aload 2
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
ifnull 8
7: StackMap locals:
StackMap stack:
iconst_0
ireturn
8: StackMap locals:
StackMap stack:
aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
aload 2
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokeinterface java.util.List.equals:(Ljava/lang/Object;)Z
ifne 10
9: iconst_0
ireturn
10: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/TaggableReadPreference;
0 11 1 o Ljava/lang/Object;
5 11 2 that Lcom/mongodb/TaggableReadPreference;
MethodParameters:
Name Flags
o final
public int hashCode();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokeinterface java.util.List.hashCode:()I
istore 1
start local 1 1: bipush 31
iload 1
imul
aload 0
invokevirtual com.mongodb.TaggableReadPreference.getName:()Ljava/lang/String;
invokevirtual java.lang.String.hashCode:()I
iadd
istore 1
2: bipush 31
iload 1
imul
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
ifnull 3
aload 0
getfield com.mongodb.TaggableReadPreference.maxStalenessMS:Ljava/lang/Long;
invokevirtual java.lang.Long.hashCode:()I
goto 4
StackMap locals: com.mongodb.TaggableReadPreference int
StackMap stack: int
3: iconst_0
StackMap locals: com.mongodb.TaggableReadPreference int
StackMap stack: int int
4: iadd
istore 1
5: iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/TaggableReadPreference;
1 6 1 result I
protected java.util.List<com.mongodb.connection.ServerDescription> chooseForNonReplicaSet(com.mongodb.connection.ClusterDescription);
descriptor: (Lcom/mongodb/connection/ClusterDescription;)Ljava/util/List;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getAny:()Ljava/util/List;
invokevirtual com.mongodb.TaggableReadPreference.selectFreshServers:(Lcom/mongodb/connection/ClusterDescription;Ljava/util/List;)Ljava/util/List;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/TaggableReadPreference;
0 1 1 clusterDescription Lcom/mongodb/connection/ClusterDescription;
Signature: (Lcom/mongodb/connection/ClusterDescription;)Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
MethodParameters:
Name Flags
clusterDescription final
protected static com.mongodb.connection.ClusterDescription copyClusterDescription(com.mongodb.connection.ClusterDescription, java.util.List<com.mongodb.connection.ServerDescription>);
descriptor: (Lcom/mongodb/connection/ClusterDescription;Ljava/util/List;)Lcom/mongodb/connection/ClusterDescription;
flags: (0x000c) ACC_PROTECTED, ACC_STATIC
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: new com.mongodb.connection.ClusterDescription
dup
aload 0
invokevirtual com.mongodb.connection.ClusterDescription.getConnectionMode:()Lcom/mongodb/connection/ClusterConnectionMode;
1: aload 0
invokevirtual com.mongodb.connection.ClusterDescription.getType:()Lcom/mongodb/connection/ClusterType;
2: aload 1
3: aload 0
invokevirtual com.mongodb.connection.ClusterDescription.getClusterSettings:()Lcom/mongodb/connection/ClusterSettings;
4: aload 0
invokevirtual com.mongodb.connection.ClusterDescription.getServerSettings:()Lcom/mongodb/connection/ServerSettings;
5: invokespecial com.mongodb.connection.ClusterDescription.<init>:(Lcom/mongodb/connection/ClusterConnectionMode;Lcom/mongodb/connection/ClusterType;Ljava/util/List;Lcom/mongodb/connection/ClusterSettings;Lcom/mongodb/connection/ServerSettings;)V
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 clusterDescription Lcom/mongodb/connection/ClusterDescription;
0 6 1 selectedServers Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
Signature: (Lcom/mongodb/connection/ClusterDescription;Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;)Lcom/mongodb/connection/ClusterDescription;
MethodParameters:
Name Flags
clusterDescription final
selectedServers final
protected java.util.List<com.mongodb.connection.ServerDescription> selectFreshServers(com.mongodb.connection.ClusterDescription, java.util.List<com.mongodb.connection.ServerDescription>);
descriptor: (Lcom/mongodb/connection/ClusterDescription;Ljava/util/List;)Ljava/util/List;
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=11, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.TaggableReadPreference.getMaxStaleness:(Ljava/util/concurrent/TimeUnit;)Ljava/lang/Long;
astore 3
start local 3 1: aload 3
ifnonnull 3
2: aload 2
areturn
3: StackMap locals: java.lang.Long
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getServerSettings:()Lcom/mongodb/connection/ServerSettings;
ifnonnull 5
4: new com.mongodb.MongoConfigurationException
dup
ldc "heartbeat frequency must be provided in cluster description"
invokespecial com.mongodb.MongoConfigurationException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.TaggableReadPreference.serversAreAllThreeDotFour:(Lcom/mongodb/connection/ClusterDescription;)Z
ifne 7
6: new com.mongodb.MongoConfigurationException
dup
ldc "Servers must all be at least version 3.4 when max staleness is configured"
invokespecial com.mongodb.MongoConfigurationException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getType:()Lcom/mongodb/connection/ClusterType;
getstatic com.mongodb.connection.ClusterType.REPLICA_SET:Lcom/mongodb/connection/ClusterType;
if_acmpeq 9
8: aload 2
areturn
9: StackMap locals:
StackMap stack:
aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getServerSettings:()Lcom/mongodb/connection/ServerSettings;
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ServerSettings.getHeartbeatFrequency:(Ljava/util/concurrent/TimeUnit;)J
lstore 4
start local 4 10: aload 3
invokevirtual java.lang.Long.longValue:()J
ldc 90000
lload 4
ldc 10000
ladd
invokestatic java.lang.Math.max:(JJ)J
lcmp
ifge 18
11: ldc 90000
lload 4
ldc 10000
ladd
lcmp
ifle 15
12: new com.mongodb.MongoConfigurationException
dup
ldc "Max staleness (%d sec) must be at least 90 seconds"
iconst_1
anewarray java.lang.Object
dup
iconst_0
13: aload 0
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.TaggableReadPreference.getMaxStaleness:(Ljava/util/concurrent/TimeUnit;)Ljava/lang/Long;
aastore
14: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoConfigurationException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals: long
StackMap stack:
new com.mongodb.MongoConfigurationException
dup
ldc "Max staleness (%d ms) must be at least the heartbeat period (%d ms) plus the idle write period (%d ms)"
iconst_3
anewarray java.lang.Object
dup
iconst_0
16: aload 3
aastore
dup
iconst_1
lload 4
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
dup
iconst_2
sipush 10000
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
17: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial com.mongodb.MongoConfigurationException.<init>:(Ljava/lang/String;)V
athrow
18: StackMap locals:
StackMap stack:
new java.util.ArrayList
dup
aload 2
invokeinterface java.util.List.size:()I
invokespecial java.util.ArrayList.<init>:(I)V
astore 6
start local 6 19: aload 0
aload 1
invokevirtual com.mongodb.TaggableReadPreference.findPrimary:(Lcom/mongodb/connection/ClusterDescription;)Lcom/mongodb/connection/ServerDescription;
astore 7
start local 7 20: aload 7
ifnull 30
21: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 9
goto 28
StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription java.util.List java.lang.Long long java.util.List com.mongodb.connection.ServerDescription top java.util.Iterator
StackMap stack:
22: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.connection.ServerDescription
astore 8
start local 8 23: aload 8
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 26
24: aload 6
aload 8
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
25: goto 28
26: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription java.util.List java.lang.Long long java.util.List com.mongodb.connection.ServerDescription com.mongodb.connection.ServerDescription java.util.Iterator
StackMap stack:
aload 0
aload 7
aload 8
lload 4
invokevirtual com.mongodb.TaggableReadPreference.getStalenessOfSecondaryRelativeToPrimary:(Lcom/mongodb/connection/ServerDescription;Lcom/mongodb/connection/ServerDescription;J)J
aload 3
invokevirtual java.lang.Long.longValue:()J
lcmp
ifgt 28
27: aload 6
aload 8
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 8 28: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription java.util.List java.lang.Long long java.util.List com.mongodb.connection.ServerDescription top java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 22
29: goto 39
30: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription java.util.List java.lang.Long long java.util.List com.mongodb.connection.ServerDescription
StackMap stack:
aload 0
aload 1
invokevirtual com.mongodb.TaggableReadPreference.findMostUpToDateSecondary:(Lcom/mongodb/connection/ClusterDescription;)Lcom/mongodb/connection/ServerDescription;
astore 8
start local 8 31: aload 2
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 10
goto 38
StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription java.util.List java.lang.Long long java.util.List com.mongodb.connection.ServerDescription com.mongodb.connection.ServerDescription top java.util.Iterator
StackMap stack:
32: aload 10
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.connection.ServerDescription
astore 9
start local 9 33: aload 0
aload 8
invokevirtual com.mongodb.TaggableReadPreference.getLastWriteDateNonNull:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
aload 0
aload 9
invokevirtual com.mongodb.TaggableReadPreference.getLastWriteDateNonNull:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
lsub
34: lload 4
35: ladd
36: aload 3
invokevirtual java.lang.Long.longValue:()J
lcmp
ifgt 38
37: aload 6
aload 9
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 9 38: StackMap locals:
StackMap stack:
aload 10
invokeinterface java.util.Iterator.hasNext:()Z
ifne 32
end local 8 39: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription java.util.List java.lang.Long long java.util.List com.mongodb.connection.ServerDescription
StackMap stack:
aload 6
areturn
end local 7 end local 6 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 40 0 this Lcom/mongodb/TaggableReadPreference;
0 40 1 clusterDescription Lcom/mongodb/connection/ClusterDescription;
0 40 2 servers Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
1 40 3 maxStaleness Ljava/lang/Long;
10 40 4 heartbeatFrequencyMS J
19 40 6 freshServers Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
20 40 7 primary Lcom/mongodb/connection/ServerDescription;
23 28 8 cur Lcom/mongodb/connection/ServerDescription;
31 39 8 mostUpToDateSecondary Lcom/mongodb/connection/ServerDescription;
33 38 9 cur Lcom/mongodb/connection/ServerDescription;
Signature: (Lcom/mongodb/connection/ClusterDescription;Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;)Ljava/util/List<Lcom/mongodb/connection/ServerDescription;>;
MethodParameters:
Name Flags
clusterDescription final
servers final
private long getStalenessOfSecondaryRelativeToPrimary(com.mongodb.connection.ServerDescription, com.mongodb.connection.ServerDescription, long);
descriptor: (Lcom/mongodb/connection/ServerDescription;Lcom/mongodb/connection/ServerDescription;J)J
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
invokevirtual com.mongodb.TaggableReadPreference.getLastWriteDateNonNull:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
1: aload 2
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ServerDescription.getLastUpdateTime:(Ljava/util/concurrent/TimeUnit;)J
aload 1
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual com.mongodb.connection.ServerDescription.getLastUpdateTime:(Ljava/util/concurrent/TimeUnit;)J
lsub
2: ladd
3: aload 0
aload 2
invokevirtual com.mongodb.TaggableReadPreference.getLastWriteDateNonNull:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
4: lsub
5: lload 3
6: ladd
lreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/TaggableReadPreference;
0 7 1 primary Lcom/mongodb/connection/ServerDescription;
0 7 2 serverDescription Lcom/mongodb/connection/ServerDescription;
0 7 3 heartbeatFrequencyMS J
MethodParameters:
Name Flags
primary final
serverDescription final
heartbeatFrequencyMS final
private com.mongodb.connection.ServerDescription findPrimary(com.mongodb.connection.ClusterDescription);
descriptor: (Lcom/mongodb/connection/ClusterDescription;)Lcom/mongodb/connection/ServerDescription;
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getServerDescriptions:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.connection.ServerDescription
astore 2
start local 2 2: aload 2
invokevirtual com.mongodb.connection.ServerDescription.isPrimary:()Z
ifeq 4
3: aload 2
areturn
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
5: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/TaggableReadPreference;
0 6 1 clusterDescription Lcom/mongodb/connection/ClusterDescription;
2 4 2 cur Lcom/mongodb/connection/ServerDescription;
RuntimeVisibleAnnotations:
com.mongodb.lang.Nullable()
MethodParameters:
Name Flags
clusterDescription final
private com.mongodb.connection.ServerDescription findMostUpToDateSecondary(com.mongodb.connection.ClusterDescription);
descriptor: (Lcom/mongodb/connection/ClusterDescription;)Lcom/mongodb/connection/ServerDescription;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getServerDescriptions:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 7
StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription com.mongodb.connection.ServerDescription top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.connection.ServerDescription
astore 3
start local 3 3: aload 3
invokevirtual com.mongodb.connection.ServerDescription.isSecondary:()Z
ifeq 7
4: aload 2
ifnull 6
5: aload 0
aload 3
invokevirtual com.mongodb.TaggableReadPreference.getLastWriteDateNonNull:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
aload 0
aload 2
invokevirtual com.mongodb.TaggableReadPreference.getLastWriteDateNonNull:(Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
invokevirtual java.util.Date.getTime:()J
lcmp
ifle 7
6: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription com.mongodb.connection.ServerDescription com.mongodb.connection.ServerDescription java.util.Iterator
StackMap stack:
aload 3
astore 2
end local 3 7: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription com.mongodb.connection.ServerDescription top java.util.Iterator
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
8: aload 2
ifnonnull 10
9: new com.mongodb.MongoInternalException
dup
new java.lang.StringBuilder
dup
ldc "Expected at least one secondary in cluster description: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial com.mongodb.MongoInternalException.<init>:(Ljava/lang/String;)V
athrow
10: StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription com.mongodb.connection.ServerDescription
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/TaggableReadPreference;
0 11 1 clusterDescription Lcom/mongodb/connection/ClusterDescription;
1 11 2 mostUpdateToDateSecondary Lcom/mongodb/connection/ServerDescription;
3 7 3 cur Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
clusterDescription final
private java.util.Date getLastWriteDateNonNull(com.mongodb.connection.ServerDescription);
descriptor: (Lcom/mongodb/connection/ServerDescription;)Ljava/util/Date;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.connection.ServerDescription.getLastWriteDate:()Ljava/util/Date;
astore 2
start local 2 1: aload 2
ifnonnull 3
2: new com.mongodb.MongoClientException
dup
new java.lang.StringBuilder
dup
ldc "lastWriteDate should not be null in "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial com.mongodb.MongoClientException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.util.Date
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/mongodb/TaggableReadPreference;
0 4 1 serverDescription Lcom/mongodb/connection/ServerDescription;
1 4 2 lastWriteDate Ljava/util/Date;
MethodParameters:
Name Flags
serverDescription final
private boolean serversAreAllThreeDotFour(com.mongodb.connection.ClusterDescription);
descriptor: (Lcom/mongodb/connection/ClusterDescription;)Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual com.mongodb.connection.ClusterDescription.getServerDescriptions:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.connection.ClusterDescription top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.connection.ServerDescription
astore 2
start local 2 2: aload 2
invokevirtual com.mongodb.connection.ServerDescription.isOk:()Z
ifeq 4
aload 2
invokevirtual com.mongodb.connection.ServerDescription.getMaxWireVersion:()I
iconst_5
if_icmpge 4
3: iconst_0
ireturn
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
5: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/TaggableReadPreference;
0 6 1 clusterDescription Lcom/mongodb/connection/ClusterDescription;
2 4 2 cur Lcom/mongodb/connection/ServerDescription;
MethodParameters:
Name Flags
clusterDescription final
private org.bson.BsonArray tagsListToBsonArray();
descriptor: ()Lorg/bson/BsonArray;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=1
start local 0 0: new org.bson.BsonArray
dup
invokespecial org.bson.BsonArray.<init>:()V
astore 1
start local 1 1: aload 0
getfield com.mongodb.TaggableReadPreference.tagSetList:Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: com.mongodb.TaggableReadPreference org.bson.BsonArray top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.TagSet
astore 2
start local 2 3: aload 1
aload 0
aload 2
invokevirtual com.mongodb.TaggableReadPreference.toDocument:(Lcom/mongodb/TagSet;)Lorg/bson/BsonDocument;
invokevirtual org.bson.BsonArray.add:(Lorg/bson/BsonValue;)Z
pop
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/TaggableReadPreference;
1 6 1 bsonArray Lorg/bson/BsonArray;
3 4 2 tagSet Lcom/mongodb/TagSet;
private org.bson.BsonDocument toDocument(com.mongodb.TagSet);
descriptor: (Lcom/mongodb/TagSet;)Lorg/bson/BsonDocument;
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=5, args_size=2
start local 0 start local 1 0: new org.bson.BsonDocument
dup
invokespecial org.bson.BsonDocument.<init>:()V
astore 2
start local 2 1: aload 1
invokevirtual com.mongodb.TagSet.iterator:()Ljava/util/Iterator;
astore 4
goto 4
StackMap locals: com.mongodb.TaggableReadPreference com.mongodb.TagSet org.bson.BsonDocument top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast com.mongodb.Tag
astore 3
start local 3 3: aload 2
aload 3
invokevirtual com.mongodb.Tag.getName:()Ljava/lang/String;
new org.bson.BsonString
dup
aload 3
invokevirtual com.mongodb.Tag.getValue:()Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
end local 3 4: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/TaggableReadPreference;
0 6 1 tagSet Lcom/mongodb/TagSet;
1 6 2 document Lorg/bson/BsonDocument;
3 4 3 tag Lcom/mongodb/Tag;
MethodParameters:
Name Flags
tagSet final
}
SourceFile: "TaggableReadPreference.java"
NestMembers:
com.mongodb.TaggableReadPreference$NearestReadPreference com.mongodb.TaggableReadPreference$PrimaryPreferredReadPreference com.mongodb.TaggableReadPreference$SecondaryPreferredReadPreference com.mongodb.TaggableReadPreference$SecondaryReadPreference
InnerClasses:
NearestReadPreference = com.mongodb.TaggableReadPreference$NearestReadPreference of com.mongodb.TaggableReadPreference
PrimaryPreferredReadPreference = com.mongodb.TaggableReadPreference$PrimaryPreferredReadPreference of com.mongodb.TaggableReadPreference
SecondaryPreferredReadPreference = com.mongodb.TaggableReadPreference$SecondaryPreferredReadPreference of com.mongodb.TaggableReadPreference
SecondaryReadPreference = com.mongodb.TaggableReadPreference$SecondaryReadPreference of com.mongodb.TaggableReadPreference
RuntimeVisibleAnnotations:
com.mongodb.annotations.Immutable()