idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
38,400
private int sequentialSearchEqual ( SearchComparator comp , int lower , int upper , Object searchKey ) { int xcc ; int idx = - 1 ; for ( int i = lower ; i <= upper ; i ++ ) { xcc = comp . compare ( searchKey , _nodeKey [ i ] ) ; if ( xcc == 0 ) { idx = i ; break ; } } return idx ; }
Use sequential search to find a matched key .
38,401
private int findGreater ( SearchComparator comp , int lower , int upper , Object searchKey ) { int nkeys = numKeys ( lower , upper ) ; int idx = - 1 ; if ( nkeys < 4 ) idx = sequentialSearchGreater ( comp , lower , upper , searchKey ) ; else idx = binarySearchGreater ( comp , lower , upper , searchKey ) ; return idx ; ...
Find an index entry that is either greater than or greater than or equal to the supplied key .
38,402
private void findIndex ( int lower , int upper , Object new1 , NodeInsertPoint point ) { int nkeys = numKeys ( lower , upper ) ; if ( nkeys < 4 ) sequentialFindIndex ( lower , upper , new1 , point ) ; else binaryFindIndex ( lower , upper , new1 , point ) ; }
Find the insert point for a new key .
38,403
private void binaryFindIndex ( int lower , int upper , Object new1 , NodeInsertPoint point ) { java . util . Comparator comp = insertComparator ( ) ; int xcc ; int lxcc = + 1 ; int i ; int idx = upper + 1 ; while ( lower <= upper ) { i = ( lower + upper ) >>> 1 ; xcc = comp . compare ( new1 , _nodeKey [ i ] ) ; if ( ! ...
Use binary search to find the insert point .
38,404
int findDeleteInRight ( Object delKey ) { int idx = - 1 ; int r = rightMostIndex ( ) ; int m = midPoint ( ) ; if ( r > m ) idx = findDelete ( m , r , delKey ) ; return idx ; }
Find the delete key in the right half of the node .
38,405
int findDelete ( int lower , int upper , Object delKey ) { int nkeys = numKeys ( lower , upper ) ; int idx = - 1 ; if ( nkeys < 4 ) idx = sequentialFindDelete ( lower , upper , delKey ) ; else idx = binaryFindDelete ( lower , upper , delKey ) ; return idx ; }
Find the index of the key to delete .
38,406
private int sequentialFindDelete ( int lower , int upper , Object delKey ) { java . util . Comparator comp = deleteComparator ( ) ; int xcc ; int idx = - 1 ; for ( int i = lower ; i <= upper ; i ++ ) { xcc = comp . compare ( delKey , _nodeKey [ i ] ) ; if ( xcc == 0 ) { idx = i ; break ; } } return idx ; }
Use sequential search to find the delete key .
38,407
private int binaryFindDelete ( int lower , int upper , Object delKey ) { java . util . Comparator comp = insertComparator ( ) ; int xcc ; int i ; int idx = - 1 ; while ( lower <= upper ) { i = ( lower + upper ) >>> 1 ; xcc = comp . compare ( delKey , _nodeKey [ i ] ) ; if ( xcc < 0 ) upper = i - 1 ; else { if ( xcc > 0...
Use binary search to find the delete key .
38,408
public int middleIndex ( ) { int x = midPoint ( ) ; int r = rightMostIndex ( ) ; if ( r < midPoint ( ) ) x = r ; return x ; }
Return the index to the key at the median position in the node .
38,409
void addRightLeaf ( Object new1 ) { GBSNode p = _index . getNode ( new1 ) ; if ( rightChild ( ) != null ) throw new RuntimeException ( "Help!" ) ; setRightChild ( p ) ; }
Add a right child to the node placing in the new right child the supplied key .
38,410
Object insertByLeftShift ( int ix , Object new1 ) { Object old1 = leftMostKey ( ) ; leftShift ( ix ) ; _nodeKey [ ix ] = new1 ; if ( midPoint ( ) > rightMostIndex ( ) ) _nodeKey [ midPoint ( ) ] = rightMostKey ( ) ; return old1 ; }
Insert a new key by overlaying the left - most key shifting other keys left and inserting the new key at the appropriate insert point .
38,411
private void leftShift ( int ix ) { for ( int j = 0 ; j < ix ; j ++ ) _nodeKey [ j ] = _nodeKey [ j + 1 ] ; }
Open up a slot in a node by shifting the keys left .
38,412
Object insertByRightShift ( int ix , Object new1 ) { Object old1 = null ; if ( isFull ( ) ) { old1 = rightMostKey ( ) ; rightMove ( ix + 1 ) ; _nodeKey [ ix + 1 ] = new1 ; } else { rightShift ( ix + 1 ) ; _nodeKey [ ix + 1 ] = new1 ; _population ++ ; if ( midPoint ( ) > rightMostIndex ( ) ) _nodeKey [ midPoint ( ) ] = ...
Insert a new key by shifting keys right .
38,413
Object addRightMostKey ( Object new1 ) { Object old1 = null ; if ( isFull ( ) ) { old1 = rightMostKey ( ) ; _nodeKey [ rightMostIndex ( ) ] = new1 ; } else { _population ++ ; _nodeKey [ rightMostIndex ( ) ] = new1 ; if ( midPoint ( ) > rightMostIndex ( ) ) _nodeKey [ midPoint ( ) ] = rightMostKey ( ) ; } return old1 ; ...
Add the right - most key to the node .
38,414
void fillFromRight ( ) { int gapWid = width ( ) - population ( ) ; int gidx = population ( ) ; GBSNode p = rightChild ( ) ; for ( int j = 0 ; j < gapWid ; j ++ ) _nodeKey [ j + gidx ] = p . _nodeKey [ j ] ; int delta = gapWid ; if ( p . _population < delta ) delta = p . _population ; _population += delta ; p . _populat...
Fill a node with new keys from the right side .
38,415
GBSNode rightMostChild ( ) { GBSNode q = this ; GBSNode p = rightChild ( ) ; while ( p != null ) { q = p ; p = p . rightChild ( ) ; } return q ; }
Find the right - most child of a node by following the paths of all of the right - most children all the way to the bottom of the tree .
38,416
private void rightShift ( int ix ) { for ( int j = rightMostIndex ( ) ; j >= ix ; j -- ) _nodeKey [ j + 1 ] = _nodeKey [ j ] ; }
Open up a slot for a new key by shifting keys right to make room .
38,417
private void rightMove ( int ix ) { for ( int j = rightMostIndex ( ) - 1 ; j >= ix ; j -- ) _nodeKey [ j + 1 ] = _nodeKey [ j ] ; }
Open up a slot for a new key by shifting keys right to make room and overlaying the right - most key .
38,418
void overlayLeftShift ( int ix ) { for ( int j = ix ; j < rightMostIndex ( ) ; j ++ ) _nodeKey [ j ] = _nodeKey [ j + 1 ] ; }
Overlay a key to be deleted by moving keys left .
38,419
private void overlayRightShift ( int ix ) { for ( int j = ix ; j > 0 ; j -- ) _nodeKey [ j ] = _nodeKey [ j - 1 ] ; }
Overlay a key to be deleted by moving keys right .
38,420
GBSNode lowerPredecessor ( NodeStack stack ) { GBSNode r = leftChild ( ) ; GBSNode lastr = r ; if ( r != null ) stack . push ( NodeStack . PROCESS_CURRENT , this ) ; while ( r != null ) { if ( r . rightChild ( ) != null ) stack . push ( NodeStack . DONE_VISITS , r ) ; lastr = r ; r = r . rightChild ( ) ; } return lastr...
Find the lower predecessor of this node .
38,421
public boolean validate ( ) { boolean correct = true ; if ( population ( ) > 1 ) { java . util . Comparator comp = index ( ) . insertComparator ( ) ; int xcc = 0 ; for ( int i = 0 ; i < population ( ) - 1 ; i ++ ) { xcc = comp . compare ( _nodeKey [ i ] , _nodeKey [ i + 1 ] ) ; if ( ! ( xcc < 0 ) ) { System . out . pri...
Used by test code to make sure that all of the keys within a node are in the correct collating sequence .
38,422
public Set < String > getExtensionClasses ( ) { Set < String > serviceClazzes = new HashSet < > ( ) ; if ( getType ( ) == ArchiveType . WEB_MODULE ) { Resource webInfClassesMetaInfServicesEntry = getResource ( CDIUtils . WEB_INF_CLASSES_META_INF_SERVICES_CDI_EXTENSION ) ; serviceClazzes . addAll ( CDIUtils . parseServi...
Get hold of the extension class names from the file of META - INF \ services \ javax . enterprise . inject . spi . Extension
38,423
public BeanDiscoveryMode getBeanDiscoveryMode ( CDIRuntime cdiRuntime , BeansXml beansXml ) { BeanDiscoveryMode mode = BeanDiscoveryMode . ANNOTATED ; if ( beansXml != null ) { mode = beansXml . getBeanDiscoveryMode ( ) ; } else if ( cdiRuntime . isImplicitBeanArchivesScanningDisabled ( this ) ) { mode = BeanDiscoveryM...
Determine the bean deployment archive scanning mode If there is a beans . xml the bean discovery mode will be used . If there is no beans . xml the mode will be annotated unless the enableImplicitBeanArchives is configured as false via the server . xml . If there is no beans . xml and the enableImplicitBeanArchives att...
38,424
public static void teardownClass ( ) throws Exception { try { if ( libertyServer != null ) { libertyServer . stopServer ( "CWIML4537E" ) ; } } finally { if ( ds != null ) { ds . shutDown ( true ) ; } } libertyServer . deleteFileFromLibertyInstallRoot ( "lib/features/internalfeatures/securitylibertyinternals-1.0.mf" ) ;...
Tear down the test .
38,425
private static void setupLibertyServer ( ) throws Exception { LDAPUtils . addLDAPVariables ( libertyServer ) ; Log . info ( c , "setUp" , "Starting the server... (will wait for userRegistry servlet to start)" ) ; libertyServer . copyFileToLibertyInstallRoot ( "lib/features" , "internalfeatures/securitylibertyinternals-...
Setup the Liberty server . This server will start with very basic configuration . The tests will configure the server dynamically .
38,426
private static void setupldapServer ( ) throws Exception { ds = new InMemoryLDAPServer ( SUB_DN ) ; Entry entry = new Entry ( SUB_DN ) ; entry . addAttribute ( "objectclass" , "top" ) ; entry . addAttribute ( "objectclass" , "domain" ) ; ds . add ( entry ) ; entry = new Entry ( "ou=Test,o=ibm,c=us" ) ; entry . addAttri...
Configure the embedded LDAP server .
38,427
private Object syncGetValueFromBucket ( FastSyncHashBucket hb , int key , boolean remove ) { FastSyncHashEntry e = null ; FastSyncHashEntry last = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "syncGetValueFromBucket: key, remove " + key + " " + remove ) ; } synch...
Internal get from the table which is partially synchronized at the hash bucket level .
38,428
public Object put ( int key , Object value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "put" ) ; } if ( value == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "value == null" ) ; } throw new NullPointerExcep...
Put into the table if does not exist .
38,429
private Object syncPutIntoBucket ( FastSyncHashBucket hb , FastSyncHashEntry newEntry ) { FastSyncHashEntry e = null ; FastSyncHashEntry last = null ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "syncPutIntoBucket" ) ; } synchronized ( hb ) { e = hb . root ; while ( e ...
Put synchronized into bucket .
38,430
public Object [ ] getAllEntryValues ( ) { List < Object > values = new ArrayList < Object > ( ) ; FastSyncHashBucket hb = null ; FastSyncHashEntry e = null ; for ( int i = 0 ; i < xVar ; i ++ ) { for ( int j = 0 ; j < yVar ; j ++ ) { hb = mainTable [ i ] [ j ] ; synchronized ( hb ) { e = hb . root ; while ( e != null )...
This routine returns a snapshot of all the values in the hash table .
38,431
void removeSession ( JmsSessionImpl sess ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeSession" , sess ) ; synchronized ( stateLock ) { boolean res = sessions . remove ( sess ) ; unusedOrderingContexts . add ( sess . getOrderingContext ( ) ) ; if ( ! r...
This method is used to remove a Session from the list of sessions held by the Connection .
38,432
protected int getState ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getState" ) ; int tempState ; synchronized ( stateLock ) { tempState = state ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "get...
Returns the state .
38,433
protected void setState ( int newState ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setState" , newState ) ; synchronized ( stateLock ) { if ( ( newState == JmsInternalConstants . CLOSED ) || ( newState == JmsInternalConstants . STOPPED ) || ( newState == J...
Sets the state .
38,434
protected void checkClosed ( ) throws JMSException { if ( getState ( ) == CLOSED ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "This Connection is closed." ) ; throw ( javax . jms . IllegalStateException ) JmsErrorUtils . newThrowable ( javax . jms . IllegalS...
This method is called at the beginning of every method that should not work if the Connection has been closed . It prevents further execution by throwing a JMSException with a suitable I m closed message .
38,435
protected void fixClientID ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "fixClientID" ) ; synchronized ( stateLock ) { clientIDFixed = true ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "fixClient...
This method is called in order to mark that the clientID may not now change .
38,436
void unfixClientID ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "unfixClientID" ) ; synchronized ( stateLock ) { clientIDFixed = false ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "unfixClientID"...
This method is called in order to mark that the clientID may now change .
38,437
protected JmsJcaSession createJcaSession ( boolean transacted ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createJcaSession" , transacted ) ; JmsJcaSession jcaSess = null ; if ( jcaConnection != null ) { try { jcaSess = jcaConnection . c...
Create a JCA Session . If this Connection contains a JCA Connection then use it to create a JCA Session .
38,438
protected void addTemporaryDestination ( JmsTemporaryDestinationInternal tempDest ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addTemporaryDestination" , System . identityHashCode ( tempDest ) ) ; synchronized ( temporaryDestinations ) { temporaryDestinatio...
Add a TemporaryDestination to the list of temporary destinations created by sessions under this connection
38,439
protected void removeTemporaryDestination ( JmsTemporaryDestinationInternal tempDest ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeTemporaryDestination" , System . identityHashCode ( tempDest ) ) ; synchronized ( temporaryDestinations ) { temporaryDest...
Remove a TemporaryDestination from the list of temporary destinations created by sessions under this connection
38,440
public OrderingContext allocateOrderingContext ( ) throws SIConnectionDroppedException , SIConnectionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "allocateOrderingContext" ) ; OrderingContext oc = null ; synchronized ( stateLock ) { while ( oc ==...
Called by each session when it is created to get an ordering context for that session .
38,441
private static void initExceptionThreadPool ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "initExceptionThreadPool" ) ; synchronized ( exceptionTPCreateSync ) { if ( exceptionThreadPool == null ) { int maxThreads = Integer . parseInt ( ApiJmsConstants . EXCEPTION_...
PK59962 Ensure the existence of a single thread pool within the process
38,442
private void addClientId ( String clientId ) { if ( clientId == null ) return ; ConcurrentHashMap < String , Integer > clientIdTable = JmsFactoryFactoryImpl . getClientIdTable ( ) ; if ( clientIdTable . containsKey ( clientId ) ) { clientIdTable . put ( clientId , clientIdTable . get ( clientId ) . intValue ( ) + 1 ) ;...
If there is no entry for the given Client Id in the clientIdTable then add it with count as 1 . If its already exists then just increment the counter value by 1 .
38,443
private void removeClientId ( String clientId ) { if ( clientId == null ) return ; ConcurrentHashMap < String , Integer > clientIdTable = JmsFactoryFactoryImpl . getClientIdTable ( ) ; if ( clientIdTable . containsKey ( clientId ) ) { int referenceCount = clientIdTable . get ( clientId ) . intValue ( ) ; if ( reference...
To remove the client id from client table . Whenever this method is called the counter of respective HashMap entry is decremented by one . If the count reaches 0 then that entry wil be removed from the clientIdTable .
38,444
public void initializeForAroundConstruct ( ManagedObjectContext managedObjectContext , Object [ ] interceptors , InterceptorProxy [ ] proxies ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "initializeForAroundConstruct : context = " + managedObjectContext + " intercepto...
Initialize a InvocationContext for AroundConstruct with an array of interceptor instances created for this bean instance and the interceptor proxies .
38,445
public Object doAroundInvoke ( InterceptorProxy [ ] proxies , Method businessMethod , Object [ ] parameters , EJSDeployedSupport s ) throws Exception { ivMethod = businessMethod ; ivParameters = parameters ; ivEJSDeployedSupport = s ; ivInterceptorProxies = proxies ; ivIsAroundConstruct = false ; if ( TraceComponent . ...
Invoke each AroundInvoke interceptor methods for a specified business method of an EJB being invoked .
38,446
private Object doAroundInterceptor ( ) throws Exception { ivNextIndex = 0 ; ivNumberOfInterceptors = ivInterceptorProxies == null ? 0 : ivInterceptorProxies . length ; ivParametersModified = false ; return proceed ( ) ; }
Invoke each AroundInvoke or AroundConstruct interceptor methods
38,447
public void doLifeCycle ( InterceptorProxy [ ] proxies , EJBModuleMetaDataImpl mmd ) { ivMethod = null ; ivParameters = null ; ivInterceptorProxies = proxies ; ivNumberOfInterceptors = ivInterceptorProxies . length ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "doLifeC...
d450431 - add appExceptionMap parameter .
38,448
private void lifeCycleExceptionHandler ( Throwable t , EJBModuleMetaDataImpl mmd ) { if ( t instanceof RuntimeException ) { RuntimeException rtex = ( RuntimeException ) t ; if ( mmd . getApplicationExceptionRollback ( rtex ) != null ) { InterceptorProxy w = ivInterceptorProxies [ ivNextIndex - 1 ] ; String lifeCycle = ...
d450431 - ensure runtime exception is not an application exception .
38,449
private void throwUndeclaredExceptionCause ( Throwable undeclaredException ) throws Exception { Throwable cause = undeclaredException . getCause ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "proceed unwrappering " + undeclaredException . getClass ( ) . getSimpleName...
Since some interceptor methods cannot throw Exception but the target method on the bean can throw application exceptions this method may be used to unwrap the application exception from either an InvocationTargetException or UndeclaredThrowableException .
38,450
protected void setCredentialProvider ( ServiceReference < CredentialProvider > ref ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Resetting unauthenticatedSubject as new CredentialProvider has been set" ) ; } synchronized ( unauthenticatedSubjectLock ) { unauthentica...
When CredentialProviders come and go reset the unauthenticated subject .
38,451
@ FFDCIgnore ( Exception . class ) public Subject getUnauthenticatedSubject ( ) { if ( unauthenticatedSubject == null ) { CredentialsService cs = credentialsServiceRef . getService ( ) ; String unauthenticatedUserid = cs . getUnauthenticatedUserid ( ) ; try { Subject subject = new Subject ( ) ; Hashtable < String , Obj...
Return the unauthenticated subject . If we don t already have one create it .
38,452
public void setClientAlias ( String alias ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setClientAlias" , new Object [ ] { alias } ) ; if ( ! ks . containsAlias ( alias ) ) { String keyFileName = config . getProperty ( Constants . SSLPROP_KEY_STORE ) ...
Set the client alias value for the given slot number .
38,453
public String chooseClientAlias ( String keyType , Principal [ ] issuers ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "chooseClientAlias" , new Object [ ] { keyType , issuers } ) ; Map < String , Object > connectionInfo = JSSEHelper . getInstance ( ) . getOutboundConn...
Choose a client alias .
38,454
public String chooseEngineServerAlias ( String keyType , Principal [ ] issuers , SSLEngine engine ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "chooseEngineServerAlias" , new Object [ ] { keyType , issuers , engine } ) ; String rc = null ; if ( null != customKM && cus...
Handshakes that use the SSLEngine and not an SSLSocket require this method from the extended X509KeyManager .
38,455
public X509KeyManager getX509KeyManager ( ) { if ( customKM != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "getX509KeyManager -> " + customKM . getClass ( ) . getName ( ) ) ; return customKM ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnable...
Get the appropriate X509KeyManager for this instance .
38,456
protected static void getAlpnResult ( SSLEngine engine , SSLConnectionLink link ) { alpnNegotiator . tryToRemoveAlpnNegotiator ( link . getAlpnNegotiator ( ) , engine , link ) ; }
This must be called after the SSL handshake has completed . If an ALPN protocol was selected by the available provider that protocol will be set on the SSLConnectionLink . Also additional cleanup will be done for some ALPN providers .
38,457
void metadataProcessingInitialize ( ComponentNameSpaceConfiguration nameSpaceConfig ) { ivContext = ( InjectionProcessorContext ) nameSpaceConfig . getInjectionProcessorContext ( ) ; ivNameSpaceConfig = nameSpaceConfig ; ivCheckAppConfig = nameSpaceConfig . isCheckApplicationConfiguration ( ) ; }
d730349 . 1
38,458
protected void mergeError ( Object oldValue , Object newValue , boolean xml , String elementName , boolean property , String key ) throws InjectionConfigurationException { JNDIEnvironmentRefType refType = getJNDIEnvironmentRefType ( ) ; String component = ivNameSpaceConfig . getDisplayName ( ) ; String module = ivNameS...
Indication that an error has occurred while merging an attribute value .
38,459
protected Boolean mergeAnnotationBoolean ( Boolean oldValue , boolean oldValueXML , boolean newValue , String elementName , boolean defaultValue ) throws InjectionConfigurationException { if ( newValue == defaultValue || oldValueXML ) { return oldValue ; } if ( isComplete ( ) ) { mergeError ( oldValue , newValue , fals...
Merges the value of a boolean annotation value .
38,460
protected Integer mergeAnnotationInteger ( Integer oldValue , boolean oldValueXML , int newValue , String elementName , int defaultValue , Map < Integer , String > valueNames ) throws InjectionConfigurationException { if ( newValue == defaultValue ) { return oldValue ; } if ( oldValueXML ) { return oldValue ; } if ( ol...
Merges the value of an integer annotation value .
38,461
protected < T > T mergeAnnotationValue ( T oldValue , boolean oldValueXML , T newValue , String elementName , T defaultValue ) throws InjectionConfigurationException { if ( newValue . equals ( defaultValue ) || oldValueXML ) { return oldValue ; } if ( oldValue == null ? isComplete ( ) : ! newValue . equals ( oldValue )...
Merges the value of a String or Enum annotation value .
38,462
protected < T > T mergeXMLValue ( T oldValue , T newValue , String elementName , String key , Map < T , String > valueNames ) throws InjectionConfigurationException { if ( newValue == null ) { return oldValue ; } if ( oldValue != null && ! newValue . equals ( oldValue ) ) { Object oldValueName = valueNames == null ? ol...
Merges a value specified in XML .
38,463
protected Map < String , String > mergeXMLProperties ( Map < String , String > oldProperties , Set < String > oldXMLProperties , List < Property > properties ) throws InjectionConfigurationException { if ( ! properties . isEmpty ( ) ) { if ( oldProperties == null ) { oldProperties = new HashMap < String , String > ( ) ...
Merges the properties specified in XML .
38,464
protected static < K , V > void addOrRemoveProperty ( Map < K , V > props , K key , V value ) { if ( value == null ) { props . remove ( key ) ; } else { props . put ( key , value ) ; } }
Add the specified property if the value is non - null or remove it from the map if it is null .
38,465
public Reference createDefinitionReference ( String bindingName , String type , Map < String , Object > properties ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) { Map < String , Object > traceProps = properties ; if ( trace...
Create a Reference to a resource definition .
38,466
public void setObjects ( Object injectionObject , Reference bindingObject ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setObjects" , injectionObject , bindingObjectToString ( bindingObject ) ) ; ivInject...
Sets the object to use for injection and the Reference to use for binding . Usually the injection object is null .
38,467
public void setReferenceObject ( Reference bindingObject , Class < ? extends ObjectFactory > objectFactory ) throws InjectionException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setReferenceObject" , bindingObjectToString ( bindi...
F623 - 841 . 1
38,468
protected Object getInjectionObjectInstance ( Object targetObject , InjectionTargetContext targetContext ) throws Exception { ObjectFactory objectFactory = ivObjectFactory ; InjectionObjectFactory injObjFactory = ivInjectionObjectFactory ; if ( objectFactory == null ) { try { InternalInjectionEngine ie = InjectionEngin...
F48603 . 4
38,469
public final void setJndiName ( String jndiName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) && jndiName . length ( ) != 0 ) Tr . debug ( tc , "setJndiName: " + jndiName ) ; ivJndiName = InjectionScope . normalize ( jndiName ) ; }
d367834 . 14 Ends
38,470
public void setInjectionClassType ( Class < ? > injectionClassType ) throws InjectionException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setInjectionClassType: " + injectionClassType ) ; if ( ivInjectionClassType == null || ivInjectionClassType == Object . class ) {...
Set the InjectionClassType to be most fine grained injection target Class type .
38,471
public void setInjectionClassTypeName ( String name ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "setInjectionClassType: " + name ) ; if ( ivInjectionClassTypeName != null ) { throw new IllegalStateException ( "duplicate reference data for " + getJndiName ( ) ) ; } iv...
Sets the injection class type name . When class names are specified in XML rather than annotation sub - classes must call this method or override getInjectionClassTypeName in order to support callers of the injection engine that do not have a class loader .
38,472
public static boolean isClassesCompatible ( Class < ? > memberClass , Class < ? > injectClass ) { if ( memberClass . isAssignableFrom ( injectClass ) ) return true ; if ( injectClass . isAssignableFrom ( memberClass ) ) return true ; return getPrimitiveClass ( memberClass ) == getPrimitiveClass ( injectClass ) ; }
Test if the input two classes are auto - boxing compatible .
38,473
public static Class < ? > mostSpecificClass ( Class < ? > classOne , Class < ? > classTwo ) { if ( classOne . isAssignableFrom ( classTwo ) ) { return classTwo ; } else if ( classTwo . isAssignableFrom ( classOne ) ) { return classOne ; } return null ; }
Returns the most most specific class to the caller . If the two classes are not compatible a null is returned .
38,474
public static String toStringSecure ( Annotation ann ) { Class < ? > annType = ann . annotationType ( ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( '@' ) . append ( annType . getName ( ) ) . append ( '(' ) ; boolean any = false ; for ( Method m : annType . getMethods ( ) ) { Object defaultValue = m . get...
Convert an annotation to a string but mask members named password .
38,475
@ FFDCIgnore ( Exception . class ) protected int overQualLastAccessTimeUpdate ( BackedSession sess , long nowTime ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; String id = sess . getId ( ) ; int updateCount ; try { if ( trace && tc . isDebugEnabled ( ) ) tcInvoke ( tcSessionMetaCache , "get" , id...
Attempts to update the last access time ensuring the old value matches . This verifies that the copy we have in cache is still valid .
38,476
public static String typeToString ( MediaType type , List < String > ignoreParams ) { if ( type == null ) { throw new IllegalArgumentException ( "MediaType parameter is null" ) ; } StringBuilder sb = new StringBuilder ( ) ; sb . append ( type . getType ( ) ) . append ( '/' ) . append ( type . getSubtype ( ) ) ; Map < S...
to the implementation
38,477
private static void createHandshakeInstance ( ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createHandshakeInstance" ) ; try { instance = Class . forName ( MfpConstants . COMP_HANDSHAKE_CLASS ) . newInstance ( ) ; } catch ( Exception e ) { FFDCFilt...
Create the singleton ComponentHandshake instance .
38,478
synchronized void setProperties ( Map < Object , Object > m ) throws ChannelFactoryPropertyIgnoredException { this . myProperties = m ; if ( cf != null ) { cf . updateProperties ( m ) ; } }
internally set the properties associated with this object
38,479
synchronized void setProperty ( Object key , Object value ) throws ChannelFactoryPropertyIgnoredException { if ( null == key ) { throw new ChannelFactoryPropertyIgnoredException ( "Ignored channel factory property key of null" ) ; } if ( myProperties == null ) { this . myProperties = new HashMap < Object , Object > ( )...
Iternally set a property associated with this object
38,480
synchronized void setChannelFactory ( ChannelFactory factory ) throws ChannelFactoryException { if ( factory != null && cf != null ) { throw new ChannelFactoryException ( "ChannelFactory already exists" ) ; } this . cf = factory ; }
Internally set the channel factory in this data object .
38,481
public void dissociate ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "dissociate" ) ; } if ( WSSecurityHelper . isServerSecurityEnabled ( ) ) { J2CSecurityHelper . removeRunAsSubject ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) )...
This method is called by the WorkProxy class to dissociate the inflown SecurityContext from the workmanager thread after it has run the work By the time this method is called the WSSubject . doAs method call would have exited and the runAs subject would be dissociated . So all that is left to do here is to clear the Th...
38,482
public static void validateStatusAtInstanceRestart ( long jobInstanceId , Properties restartJobParameters ) throws JobRestartException , JobExecutionAlreadyCompleteException { IPersistenceManagerService iPers = ServicesManagerStaticAnchor . getServicesManager ( ) . getPersistenceManagerService ( ) ; WSJobInstance jobIn...
validates job is restart - able validates the jobInstance is in failed or stopped
38,483
protected void write ( WriteableLogRecord logRecord ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "write" , new Object [ ] { logRecord , this } ) ; byte [ ] data = this . getData ( ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Writing '" + data . length + "' bytes " + RLSUtils . toHexString ( data , RLSU...
Instructs this DataItem to write its data to the given WriteableLogRecord . The write involves writing the length of the data as an int followed by the data itself . The data is written at the log record s current position .
38,484
protected byte [ ] getData ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getData" , this ) ; byte [ ] data = _data ; if ( data != null ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Cached data located" ) ; } else { if ( _storageMode == MultiScopeRecoveryLog . FILE_BACKED ) { if ( tc . isDebugEnabled (...
Returns the data encapsulated by this DataItem instance . If this DataItem is memory back the in memory copy of the data is always returned . If the DataItem is file backed and it has been written to disk the data is retrieved from disk and then returned .
38,485
private UserRegistry getActiveUserRegistry ( ) throws WSSecurityException { final String METHOD = "getUserRegistry" ; UserRegistry activeUserRegistry = null ; try { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , METHOD + " securityServiceRef " + securityServiceRef ) ; } S...
Returns the active UserRegistry . If the active user registry is an instance of com . ibm . ws . security . registry . UserRegistry then it will be wrapped . Otherwise if the active user registry is an instance of CustomUserRegistryWrapper then the underlying com . ibm . websphere . security . UserRegistry will be retu...
38,486
public synchronized UserTransaction getUserTransaction ( ) { if ( state == PRE_CREATE ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Incorrect state: " + getStateName ( state ) ) ; throw new IllegalStateException ( getStateName ( state ) ) ; } return UserTransactionWra...
Get user transaction object that bean can use to demarcate transactions .
38,487
public Map < String , Object > getContextData ( ) { if ( state == PRE_CREATE || state == DESTROYED ) { IllegalStateException ise ; ise = new IllegalStateException ( "SessionBean: getContextData " + "not allowed from state = " + getStateName ( state ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnab...
F743 - 21028
38,488
protected void canBeRemoved ( ) throws RemoveException { ContainerTx tx = container . getCurrentContainerTx ( ) ; if ( tx == null ) { return ; } if ( tx . isTransactionGlobal ( ) && tx . ivRemoveBeanO != this ) { throw new RemoveException ( "Cannot remove session bean " + "within a transaction." ) ; } }
Checks if beanO can be removed . Throws RemoveException if cannot be removed .
38,489
private static String toKey ( String name , String filter , SearchControls cons ) { int length = name . length ( ) + filter . length ( ) + 100 ; StringBuffer key = new StringBuffer ( length ) ; key . append ( name ) ; key . append ( "|" ) ; key . append ( filter ) ; key . append ( "|" ) ; key . append ( cons . getSearc...
Returns a hash key for the name|filter|cons tuple used in the search query - results cache .
38,490
private static String toKey ( String name , String filterExpr , Object [ ] filterArgs , SearchControls cons ) { int length = name . length ( ) + filterExpr . length ( ) + filterArgs . length + 200 ; StringBuffer key = new StringBuffer ( length ) ; key . append ( name ) ; key . append ( "|" ) ; key . append ( filterExpr...
Returns a hash key for the name|filterExpr|filterArgs|cons tuple used in the search query - results cache .
38,491
public NameParser getNameParser ( ) throws WIMException { if ( iNameParser == null ) { TimedDirContext ctx = iContextManager . getDirContext ( ) ; try { try { iNameParser = ctx . getNameParser ( "" ) ; } catch ( NamingException e ) { if ( ! ContextManager . isConnectionException ( e ) ) { throw e ; } ctx = iContextMana...
Retrieves the parser associated with the root context .
38,492
private void initializeCaches ( Map < String , Object > configProps ) { final String METHODNAME = "initializeCaches(DataObject)" ; iAttrsCacheName = iReposId + "/" + iAttrsCacheName ; iSearchResultsCacheName = iReposId + "/" + iSearchResultsCacheName ; List < Map < String , Object > > cacheConfigs = Nester . nest ( CAC...
Initialize search and attribute caches .
38,493
private void createSearchResultsCache ( ) { final String METHODNAME = "createSearchResultsCache" ; if ( iSearchResultsCacheEnabled ) { if ( FactoryManager . getCacheUtil ( ) . isCacheAvailable ( ) ) { iSearchResultsCache = FactoryManager . getCacheUtil ( ) . initialize ( "SearchResultsCache" , iSearchResultsCacheSize ,...
Method to create the search results cache if configured .
38,494
private void createAttributesCache ( ) { final String METHODNAME = "createAttributesCache" ; if ( iAttrsCacheEnabled ) { if ( FactoryManager . getCacheUtil ( ) . isCacheAvailable ( ) ) { iAttrsCache = FactoryManager . getCacheUtil ( ) . initialize ( "AttributesCache" , iAttrsCacheSize , iAttrsCacheSize , iAttrsCacheTim...
Method to create the attributes cache if configured .
38,495
public void invalidateAttributes ( String DN , String extId , String uniqueName ) { final String METHODNAME = "invalidateAttributes(String, String, String)" ; if ( getAttributesCache ( ) != null ) { if ( DN != null ) { getAttributesCache ( ) . invalidate ( toKey ( DN ) ) ; } if ( extId != null ) { getAttributesCache ( ...
Method to invalidate the specified entry from the attributes cache . One or all parameters can be set in a single call . If all parameters are null then this operation no - ops .
38,496
public LdapEntry getEntityByIdentifier ( IdentifierType id , List < String > inEntityTypes , List < String > propNames , boolean getMbrshipAttr , boolean getMbrAttr ) throws WIMException { return getEntityByIdentifier ( id . getExternalName ( ) , id . getExternalId ( ) , id . getUniqueName ( ) , inEntityTypes , propNam...
Get an LDAP entity by an identifier .
38,497
public LdapEntry getEntityByIdentifier ( String dn , String extId , String uniqueName , List < String > inEntityTypes , List < String > propNames , boolean getMbrshipAttr , boolean getMbrAttr ) throws WIMException { String [ ] attrIds = iLdapConfigMgr . getAttributeNames ( inEntityTypes , propNames , getMbrshipAttr , g...
Get an LDAP entity by an identifier . One of dn extId or uniqueName must be non - null .
38,498
private String getUniqueName ( String dn , String entityType , Attributes attrs ) throws WIMException { final String METHODNAME = "getUniqueName" ; String uniqueName = null ; dn = iLdapConfigMgr . switchToNode ( dn ) ; if ( iLdapConfigMgr . needTranslateRDN ( ) && iLdapConfigMgr . needTranslateRDN ( entityType ) ) { tr...
Get the unique name for the specified distinguished name .
38,499
@ FFDCIgnore ( { NamingException . class , NameNotFoundException . class } ) private Attributes getAttributes ( String name , String [ ] attrIds ) throws WIMException { Attributes attributes = null ; if ( iLdapConfigMgr . getUseEncodingInSearchExpression ( ) != null ) name = LdapHelper . encodeAttribute ( name , iLdapC...
Get the specified attributes for the distinguished name .