Edit D:\app\Administrator\product\11.2.0\dbhome_1\ucp\lib\oracle\ucp\jdbc\oracle\OracleRuntimeLoadBalancingHandler.class
?? 1? Krs r ?tu r ?vw r ?xy z ?{ ?| ?} ?~ r ?? ?? ?? K? ??? ?? ?? ??? ?? ? ??? ?? ?? ???? ?? ??? ??? ,r *? ?? ?? #?? #??? ??? ?? ????? =?? ?? ??????? D??? ?? D? ?? ?? ?? ?????? ???? ?? ?? ????? ?? ???? ?? f??????? f? f? f? f? ?? ???????????? _? ?? _? _??? ???? ?? ????? ????? fr ?? f? f? f? f? f ? * ? * D ? ? _ D ? *? * ? * D D ? C ! ?" *# *$ %??& ?r s' () (* ?+ s,-. ?/ ?0^ 1 ?2 #3 #4 #5678 s9 ?:;<= D> ?? K*@ ?A ?B CDE InnerClasses logger Ljava/util/logging/Logger; m_cp 1Loracle/ucp/jdbc/oracle/OracleJDBCConnectionPool; m_serviceName -Ljava/util/concurrent/atomic/AtomicReference; Signature ALjava/util/concurrent/atomic/AtomicReference<Ljava/lang/String;>; m_instancesToRetireQueue $Ljava/util/concurrent/BlockingQueue; YLjava/util/concurrent/BlockingQueue<Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo;>; m_countTotal +Ljava/util/concurrent/atomic/AtomicInteger; m_rand Ljava/util/Random; m_gravitatePoolThread kLjava/util/concurrent/atomic/AtomicReference<Loracle/ucp/jdbc/oracle/OracleGravitateConnectionPoolThread;>; m_RLBEventHandlerThread fLjava/util/concurrent/atomic/AtomicReference<Loracle/ucp/jdbc/oracle/ONSRuntimeLBEventHandlerThread;>; m_isInstanceAffinityEnabled Z m_gravitateThreadBusy +Ljava/util/concurrent/atomic/AtomicBoolean; m_mixTable [I MIX_TABLE_SIZE I ConstantValue IRREDUCIBLE_POLYNOMIAL MIX_TABLE_GENERATOR $assertionsDisabled <init> 4(Loracle/ucp/jdbc/oracle/OracleJDBCConnectionPool;)V Code LineNumberTable LocalVariableTable ucpe -Loracle/ucp/UniversalConnectionPoolException; this :Loracle/ucp/jdbc/oracle/OracleRuntimeLoadBalancingHandler; connectionPool Exceptions initRLBSubscription (Ljava/lang/String;)V serviceName Ljava/lang/String; )setRuntimeLoadBalancingEventHandlerThread :(Loracle/ucp/jdbc/oracle/ONSRuntimeLBEventHandlerThread;)V rlbEventHandlerThread 7Loracle/ucp/jdbc/oracle/ONSRuntimeLBEventHandlerThread; processDatabaseInstances ()V ie Ljava/lang/InterruptedException; e Ljava/lang/Exception; gravitatePoolThread Ljava/lang/Thread; failoverInfo 7Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfoList; gravitatePool instanceToRetire 3Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo; retireConnectionsCount 2selectConnectionPerRuntimeLoadBalancingAndAffinity >(Ljava/util/Collection;)Loracle/ucp/UniversalPooledConnection; opc 8Loracle/ucp/jdbc/oracle/OracleUniversalPooledConnection; affinityContext 8Loracle/ucp/jdbc/oracle/OracleConnectionAffinityContext; instanceKey conn &Loracle/ucp/UniversalPooledConnection; i$ Ljava/util/Iterator; updatedAffinityContext instanceName dbUniqName isInstanceAffinityEnabled isAppAffinityContextValidToUse affinityValue conns Ljava/util/Collection; cbk 'Loracle/ucp/ConnectionAffinityCallback; appAffinityContext Ljava/lang/Object; pc LocalVariableTypeTable >Ljava/util/Collection<Loracle/ucp/UniversalPooledConnection;>; f(Ljava/util/Collection<Loracle/ucp/UniversalPooledConnection;>;)Loracle/ucp/UniversalPooledConnection; "getUpdatedAffinityContextAfterRCLB s(Loracle/ucp/jdbc/oracle/OracleUniversalPooledConnection;Z)Loracle/ucp/jdbc/oracle/OracleConnectionAffinityContext; needToCreateAffinityContext dbName getConnectionToNamedInstance M(Ljava/lang/String;Ljava/lang/String;Z)Loracle/ucp/UniversalPooledConnection; originalUrl dbInstance namedInstanceUrl dbInfoList cfa .Loracle/ucp/jdbc/JDBCConnectionFactoryAdapter; upc $selectConnectionPerDataBasedAffinity instanceCategoryF #INSTANCE_CATEGORY_FOR_DATA_AFFINITY [Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfoList$INSTANCE_CATEGORY_FOR_DATA_AFFINITY; instanceId configuredInstCardinality <Loracle/ucp/jdbc/oracle/DataBasedConnectionAffinityCallback; partitionId generateMixTable i alog log mix destroyMixTable 'selectConnectionPerRuntimeLoadBalancing needValidateOnBorrow validateResult tmpPc status ,Loracle/ucp/UniversalPooledConnectionStatus; sz pos iter connsToClose Ljava/util/List; useRLBMetricsPolicy <Ljava/util/Iterator<Loracle/ucp/UniversalPooledConnection;>; 8Ljava/util/List<Loracle/ucp/UniversalPooledConnection;>; cleanupRLBThreads checkAndStartThread (Ljava/lang/Thread;)V 'Ljava/lang/IllegalThreadStateException; thr selectConnectionFromArray q(Ljava/util/Collection;Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo;)Loracle/ucp/UniversalPooledConnection; exc j numToClose connectionsToClose '[Loracle/ucp/UniversalPooledConnection; ?(Ljava/util/Collection<Loracle/ucp/UniversalPooledConnection;>;Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo;)Loracle/ucp/UniversalPooledConnection; areObjectsEqual '(Ljava/lang/Object;Ljava/lang/Object;)Z o1 o2 <clinit> SourceFile &OracleRuntimeLoadBalancingHandler.java ? +java/util/concurrent/atomic/AtomicReference ? ? (java/util/concurrent/LinkedBlockingQueue ? ? )java/util/concurrent/atomic/AtomicInteger ? ? java/util/Random ?G ? ? ? ? ? ? ? ? )java/util/concurrent/atomic/AtomicBoolean ? ?HIJ ? ?KLMNO !OracleRuntimeLoadBalancingHandlerPQR ? ?STU serviceName: {0}MVWXYZ 5oracle/ucp/jdbc/oracle/ONSRuntimeLBEventHandlerThread java/lang/String ?[ java/lang/Thread_`J +runtimeLoadBalancingEventHandlerThread: {0} process database instances\]^Z 5oracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfoList ? ? java/lang/AssertionError_`abYc #about to interrupt gravitate threadd about to join gravitate threade java/lang/InterruptedException joining threadsMf growing pool to min pool sizeghij java/lang/Exception growing pool :oracle/ucp/jdbc/oracle/OracleGravitateConnectionPoolThread ?k startedWb polling instance queuelmnopq 1oracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo interrupted no more instances to retirer ? .instanceName: {0}, retireConnectionsCount: {1} java/lang/Object%stuMvwxWj tearing down conns for instance finished conns: {0}yzh{|}~????A???Z /Application has no affinity context establishedM?P &Connection obtained based on RCLB: {0} 6oracle/ucp/jdbc/oracle/OracleUniversalPooledConnection45?Z?? (Application affinity context is now set. (Application affinity context is not set. ,Application has affinity context established 6oracle/ucp/jdbc/oracle/OracleConnectionAffinityContext?O?O?O?c???? ?Database instance affinity. Use application's affinity context. 6Temporal affinity. Use application's affinity context. 3Affinity context: instance={0}, service={1}, db={2}????c?Z $oracle/ucp/UniversalPooledConnection?Okl?O /Connection found matching affinity context: {0} mAffinity contexts match but no connection available to serviceName: {0}, instanceName: {1}, dbUniqueName: {2}89 *Connection obtained to named instance: {0} ?Temporal affinity. Application affinity context is updated: {0}?? DTemporal affinity miss. Application affinity context is updated: {0} method returns connection: {0} (opc: {0}, isInstanceAffinityEnabled: {1}?t? (Checking affinity hint for this instance Temporal Affinity hint is false ,Creating temporary updated affinity context.???? %New context is for instance affinity.?b !New Affinity context created: {0}?? ,oracle/ucp/jdbc/JDBCConnectionFactoryAdapter???O??<?8??? ? ,URL invalid for connecting to named instance :oracle/ucp/jdbc/oracle/DataBasedConnectionAffinityCallback?h (Callback returns incorrect partition-id. !Callback returns partition-id:{0}?? Partition-id={0}, dbinfo={1} ? ? @Bad instance, dbinfo == null in table, remap to partition-id:{0}???? ??h ?Data-based affinity. Found good instance based on partition-id. BPartition-id={0}, Good instance: instance={0}, service={1}, db={2} 7Available connection found in chosen good instance: {0} iFound good instance but no connection available to serviceName: {0}, instanceName: {1}, dbUniqueName: {2} 5Violating instance: instance={0}, service={1}, db={2} MBad instance, service: {0}, instance: {1}, db: {2}; remap to partition-id:{3} numConns: {0}, conns: {1}?c?c???? java/util/ArrayList????U???c?c???????bO?c?b? %java/lang/IllegalThreadStateException starting thread {0}, {1}??? +oracle/ucp/UniversalConnectionPoolException closing onnection failed pc: {0}, serviceName: {1}, instanceName: {2},numberOfConnectionsCount: {3},attemptedConnRequestCount: {4},totalConnections: {5}? ??h 8oracle/ucp/jdbc/oracle/OracleRuntimeLoadBalancingHandler?c?O??? :oracle/ucp/jdbc/oracle/OracleRuntimeLoadBalancingHandler$1 Yoracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfoList$INSTANCE_CATEGORY_FOR_DATA_AFFINITY (J)V oracle/ucp/util/UCPErrorHandler #newUniversalConnectionPoolException 0(I)Loracle/ucp/UniversalConnectionPoolException; getClass ()Ljava/lang/Class; java/lang/Class getName ()Ljava/lang/String; java/util/logging/Logger throwing <(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V java/util/logging/Level FINEST Ljava/util/logging/Level; @(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V set (Ljava/lang/Object;)V get ()Ljava/lang/Object; F(Ljava/lang/String;Loracle/ucp/jdbc/oracle/OracleJDBCConnectionPool;)V finest /oracle/ucp/jdbc/oracle/OracleJDBCConnectionPool getFailoverInfo processDatabaseInstanceList R(Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/atomic/AtomicInteger;)V setRCLBMetricsPolicyEnabled (Z)V ()Z interrupt join C(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V getMinPoolSize ()I growPool (I)V =(Loracle/ucp/jdbc/oracle/OracleRuntimeLoadBalancingHandler;)V java/util/concurrent/TimeUnit SECONDS Ljava/util/concurrent/TimeUnit; "java/util/concurrent/BlockingQueue poll 4(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object; numberOfConnectionsCount java/lang/Integer valueOf (I)Ljava/lang/Integer; A(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V tearDownConnectionsForInstance 7(Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo;I)V java/util/Collection size getConnectionAffinityCallback )()Loracle/ucp/ConnectionAffinityCallback; %oracle/ucp/ConnectionAffinityCallback getAffinityPolicy AffinityPolicy 8()Loracle/ucp/ConnectionAffinityCallback$AffinityPolicy; 4oracle/ucp/ConnectionAffinityCallback$AffinityPolicy DATA_BASED_AFFINITY 6Loracle/ucp/ConnectionAffinityCallback$AffinityPolicy; TRANSACTION_BASED_AFFINITY getConnectionAffinityContext .(Ljava/util/logging/Level;Ljava/lang/String;)V clone setConnectionAffinityContext (Ljava/lang/Object;)Z getInstanceName getDatabaseUniqueName getServiceName isForInstanceAffinity generateDatabaseInstanceKey J(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; getConnectionAffinityValue (Ljava/lang/String;)Z iterator ()Ljava/util/Iterator; java/util/Iterator hasNext next getDataSourceInstanceName getDbUniqueName 'incrementFailedAffinityBasedBorrowCount +incrementSuccessfulAffinityBasedBorrowCount java/lang/Boolean (Z)Ljava/lang/Boolean; setConnectionPoolID setInstanceName setDatabaseUniqueName setServiceName setForInstanceAffinity getConnectionFactoryAdapter '()Loracle/ucp/ConnectionFactoryAdapter; isNamedInstanceConnectingAllowed ((Ljava/lang/String;Ljava/lang/String;Z)Z getUrl getOracleDatabaseInstanceInfo Y(Ljava/lang/String;Ljava/lang/String;)Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo; setUrl (()Loracle/ucp/UniversalPooledConnection; setForNamedInstance numNamedInstanceConns getPartitionId 6(I)Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo; getInstanceCategory ?(Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfo;)Loracle/ucp/jdbc/oracle/OracleDatabaseInstanceInfoList$INSTANCE_CATEGORY_FOR_DATA_AFFINITY; databaseUniqName d$SwitchMap$oracle$ucp$jdbc$oracle$OracleDatabaseInstanceInfoList$INSTANCE_CATEGORY_FOR_DATA_AFFINITY ordinal isRCLBMetricsPolicyEnabled useGoodGroup selectConnectionPerRLBMetrics x(Loracle/ucp/jdbc/oracle/OracleRuntimeLoadBalancingHandler;Ljava/util/Collection;)Loracle/ucp/UniversalPooledConnection; nextInt (I)I getStatus .()Loracle/ucp/UniversalPooledConnectionStatus; *oracle/ucp/UniversalPooledConnectionStatus STATUS_NORMAL equals getValidateConnectionOnBorrow isValid java/util/List add 'closeAvailableConnectionsAsynchronously (Ljava/util/List;)V #incrementFailedRCLBBasedBorrowCount setTerminate isAlive setDaemon start validate $removeAndCloseOneAvailableConnection )(Loracle/ucp/UniversalPooledConnection;)V attemptedConnRequestCount getTotalConnectionsCount desiredAssertionStatus getCanonicalName (oracle/ucp/util/logging/UCPLoggerFactory createLogger .(Ljava/lang/String;)Ljava/util/logging/Logger; ? K ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? y*? *? Y? ? *? Y? ? *? Y? ? *? Y ? ? *? Y? ? *? Y? ? *? *? Y? ? +? 6? M? *? ? ,? ,?*+? ? ? >