idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
35,400
private void addUpstreamCommittersTriggeringBuild ( Run < ? , ? > build , Set < InternetAddress > to , Set < InternetAddress > cc , Set < InternetAddress > bcc , EnvVars env , final ExtendedEmailPublisherContext context , RecipientProviderUtilities . IDebug debug ) { debug . send ( "Adding upstream committer from job %...
Adds for the given upstream build the committers to the recipient list for each commit in the upstream build .
35,401
private void addUserFromChangeSet ( ChangeLogSet . Entry change , Set < InternetAddress > to , Set < InternetAddress > cc , Set < InternetAddress > bcc , EnvVars env , final ExtendedEmailPublisherContext context , RecipientProviderUtilities . IDebug debug ) { User user = change . getAuthor ( ) ; RecipientProviderUtilit...
Adds a user to the recipients list based on a specific SCM change set
35,402
private String fetchStyles ( Document doc ) { Elements els = doc . select ( STYLE_TAG ) ; StringBuilder styles = new StringBuilder ( ) ; for ( Element e : els ) { if ( e . attr ( "data-inline" ) . equals ( "true" ) ) { styles . append ( e . data ( ) ) ; e . remove ( ) ; } } return styles . toString ( ) ; }
Generates a stylesheet from an html document
35,403
public String process ( String input ) { Document doc = Jsoup . parse ( input ) ; Elements elements = doc . getElementsByAttributeValue ( DATA_INLINE_ATTR , "true" ) ; if ( elements . isEmpty ( ) ) { return input ; } extractStyles ( doc ) ; applyStyles ( doc ) ; inlineImages ( doc ) ; doc . outputSettings ( doc . outpu...
Takes an input string representing an html document and processes it with the Css Inliner .
35,404
public static String unescapeString ( String escapedString ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 1 ; i < escapedString . length ( ) - 1 ; ++ i ) { char c = escapedString . charAt ( i ) ; if ( c == '\\' ) { ++ i ; sb . append ( unescapeChar ( escapedString . charAt ( i ) ) ) ; } else { sb . append...
Replaces all the printf - style escape sequences in a string with the appropriate characters .
35,405
public static void printf ( StringBuffer buf , String formatString , PrintfSpec printfSpec ) { for ( int i = 0 ; i < formatString . length ( ) ; ++ i ) { char c = formatString . charAt ( i ) ; if ( ( c == '%' ) && ( i + 1 < formatString . length ( ) ) ) { ++ i ; char code = formatString . charAt ( i ) ; if ( code == '%...
Formats a string and puts the result into a StringBuffer . Allows for standard Java backslash escapes and a customized behavior for % escapes in the form of a PrintfSpec .
35,406
private ClassLoader expandClasspath ( ExtendedEmailPublisherContext context , ClassLoader loader ) throws IOException { List < ClasspathEntry > classpathList = new ArrayList < > ( ) ; if ( classpath != null && ! classpath . isEmpty ( ) ) { transformToClasspathEntries ( classpath , context , classpathList ) ; } List < G...
Expand the plugin class loader with URL taken from the project descriptor and the global configuration .
35,407
protected int getNumFailures ( Run < ? , ? > build ) { AbstractTestResultAction a = build . getAction ( AbstractTestResultAction . class ) ; if ( a instanceof AggregatedTestResultAction ) { int result = 0 ; AggregatedTestResultAction action = ( AggregatedTestResultAction ) a ; for ( ChildReport cr : action . getChildRe...
Determine the number of direct failures in the given build . If it aggregates downstream results ignore contributed failures . This is because at the time this trigger runs the current build s aggregated results aren t available yet but those of the previous build may be .
35,408
private Run < ? , ? > getPreviousRun ( Run < ? , ? > build , TaskListener listener ) { Run < ? , ? > prevBuild = ExtendedEmailPublisher . getPreviousRun ( build , listener ) ; if ( prevBuild != null && prevBuild . getResult ( ) == Result . ABORTED ) { return getPreviousRun ( prevBuild , listener ) ; } return prevBuild ...
Find most recent previous build matching certain criteria .
35,409
public static void setDnsCache ( long expireMillis , String host , String ... ips ) { try { InetAddressCacheUtil . setInetAddressCache ( host , ips , System . currentTimeMillis ( ) + expireMillis ) ; } catch ( Exception e ) { final String message = String . format ( "Fail to setDnsCache for host %s ip %s expireMillis %...
Set a dns cache entry .
35,410
public static void setDnsCache ( Properties properties ) { for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { final String host = ( String ) entry . getKey ( ) ; String ipList = ( String ) entry . getValue ( ) ; ipList = ipList . trim ( ) ; if ( ipList . isEmpty ( ) ) continue ; final String [ ...
Set dns cache entries by properties
35,411
public static void loadDnsCacheConfig ( String propertiesFileName ) { InputStream inputStream = Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( propertiesFileName ) ; if ( inputStream == null ) { inputStream = DnsCacheManipulator . class . getClassLoader ( ) . getResourceAsStream ( proper...
Load dns config from the specified properties file on classpath then set dns cache .
35,412
public static DnsCacheEntry getDnsCache ( String host ) { try { return InetAddressCacheUtil . getInetAddressCache ( host ) ; } catch ( Exception e ) { throw new DnsCacheManipulatorException ( "Fail to getDnsCache, cause: " + e . toString ( ) , e ) ; } }
Get dns cache .
35,413
public static List < DnsCacheEntry > listDnsCache ( ) { try { return InetAddressCacheUtil . listInetAddressCache ( ) . getCache ( ) ; } catch ( Exception e ) { throw new DnsCacheManipulatorException ( "Fail to listDnsCache, cause: " + e . toString ( ) , e ) ; } }
Get all dns cache entries .
35,414
public static DnsCache getWholeDnsCache ( ) { try { return InetAddressCacheUtil . listInetAddressCache ( ) ; } catch ( Exception e ) { throw new DnsCacheManipulatorException ( "Fail to getWholeDnsCache, cause: " + e . toString ( ) , e ) ; } }
Get whole dns cache info .
35,415
public static void removeDnsCache ( String host ) { try { InetAddressCacheUtil . removeInetAddressCache ( host ) ; } catch ( Exception e ) { final String message = String . format ( "Fail to removeDnsCache for host %s, cause: %s" , host , e . toString ( ) ) ; throw new DnsCacheManipulatorException ( message , e ) ; } }
Remove dns cache entry cause lookup dns server for host after .
35,416
public static void setDnsNegativeCachePolicy ( int negativeCacheSeconds ) { try { InetAddressCacheUtil . setDnsNegativeCachePolicy ( negativeCacheSeconds ) ; } catch ( Exception e ) { throw new DnsCacheManipulatorException ( "Fail to setDnsNegativeCachePolicy, cause: " + e . toString ( ) , e ) ; } }
Set JVM DNS negative cache policy
35,417
private void initializeDrawableForDisplay ( Drawable d ) { if ( mBlockInvalidateCallback == null ) { mBlockInvalidateCallback = new BlockInvalidateCallback ( ) ; } d . setCallback ( mBlockInvalidateCallback . wrap ( d . getCallback ( ) ) ) ; try { if ( mDrawableContainerState . mEnterFadeDuration <= 0 && mHasAlpha ) { ...
Initializes a drawable for display in this container .
35,418
protected boolean onStateChange ( int [ ] stateSet ) { final boolean changed = super . onStateChange ( stateSet ) ; int idx = mAnimationScaleListState . getCurrentDrawableIndexBasedOnScale ( ) ; return selectDrawable ( idx ) || changed ; }
Set the current drawable according to the animation scale . If scale is 0 then pick the static drawable otherwise pick the animatable drawable .
35,419
public static int longToInt ( long inLong ) { if ( inLong < Integer . MIN_VALUE ) { return Integer . MIN_VALUE ; } if ( inLong > Integer . MAX_VALUE ) { return Integer . MAX_VALUE ; } return ( int ) inLong ; }
convert unsigned long to signed int .
35,420
public static void getAllInterfaces ( Class < ? > classObject , ArrayList < Type > interfaces ) { Type [ ] superInterfaces = classObject . getGenericInterfaces ( ) ; interfaces . addAll ( ( Arrays . asList ( superInterfaces ) ) ) ; Type tgs = classObject . getGenericSuperclass ( ) ; if ( tgs != null ) { if ( ( tgs ) in...
recursively gets all interfaces
35,421
public static String truncateCloseReason ( String reasonPhrase ) { if ( reasonPhrase != null ) { byte [ ] reasonBytes = reasonPhrase . getBytes ( Utils . UTF8_CHARSET ) ; int len = reasonBytes . length ; if ( len > 120 ) { String updatedPhrase = cutStringByByteSize ( reasonPhrase , 120 ) ; reasonPhrase = updatedPhrase ...
close reason needs to be truncated to 123 UTF - 8 encoded bytes
35,422
protected Converter getConverter ( FacesContext facesContext , UIComponent component ) { if ( component instanceof UISelectMany ) { return HtmlRendererUtils . findUISelectManyConverterFailsafe ( facesContext , ( UISelectMany ) component ) ; } else if ( component instanceof UISelectOne ) { return HtmlRendererUtils . fin...
Gets the converter for the given component rendered by this renderer .
35,423
public void startConditional ( ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startConditional" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( tc , "Activating MBean for ME " + getName ( ) ) ; s...
Start the Messaging Engine if it is enabled
35,424
private boolean okayToSendServerStarted ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "okayToSendServerStarted" , this ) ; synchronized ( lockObject ) { if ( ! _sentServerStarted ) { if ( ( _state == STATE_STARTED ) && _mainImpl . isServerStarted ( ) ) { _sentServ...
Determine whether the conditions permitting a server started notification to be sent are met .
35,425
private boolean okayToSendServerStopping ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "okayToSendServerStopping" , this ) ; synchronized ( lockObject ) { if ( ! _sentServerStopping ) { if ( ( _state == STATE_STARTED || _state == STATE_AUTOSTARTING || _state == ST...
Determine whether the conditions permitting a server stopping notification to be sent are met . The ME state can be STARTED AUTOSTARTING or in STARTING state to receive server stopping notification
35,426
@ SuppressWarnings ( "unchecked" ) public < EngineComponent > EngineComponent getEngineComponent ( Class < EngineComponent > clazz ) { String thisMethodName = "getEngineComponent" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , clazz ) ; } JsEngineCom...
The purpose of this method is to get an engine component that can be cast using the specified class . The EngineComponent is not a class name but represents the classes real type .
35,427
@ SuppressWarnings ( "unchecked" ) public < EngineComponent > EngineComponent [ ] getEngineComponents ( Class < EngineComponent > clazz ) { String thisMethodName = "getEngineComponents" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , clazz ) ; } List ...
The purpose of this method is to get an engine component that can be cast using the specified class . The EngineComponent is not a class name but represents the classes real type . It is not possible to create an Array of a generic type without using reflection .
35,428
public final JsMEConfig getMeConfig ( ) { String thisMethodName = "getMeConfig" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; SibTr . exit ( tc , thisMethodName , _me ) ; } return _me ; }
Returns a reference to this messaging engine s configuration .
35,429
public JsEngineComponent getMessageProcessor ( String name ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMessageProcessor" , this ) ; SibTr . exit ( tc , "getMessageProcessor" , _messageProcessor ) ; } return _messageProcessor ; }
Gets the instance of the MP associated with this ME
35,430
private void resolveExceptionDestination ( BaseDestinationDefinition dd ) { String thisMethodName = "resolveExceptionDestination" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , dd . getName ( ) ) ; } if ( dd . isLocal ( ) ) { String ed = ( ( Destinat...
Resolve if necessary a variable Exception Destination name in the specified DD to it s runtime value .
35,431
BaseDestinationDefinition getSIBDestinationByUuid ( String bus , String key , boolean newCache ) throws SIBExceptionDestinationNotFound , SIBExceptionBase { String thisMethodName = "getSIBDestinationByUuid" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodNam...
Accessor method to return a destination definition .
35,432
public final String getState ( ) { String thisMethodName = "getState" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; SibTr . exit ( tc , thisMethodName , states [ _state ] ) ; } return states [ _state ] ; }
Get the state of this ME
35,433
public final boolean isStarted ( ) { String thisMethodName = "isStarted" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } boolean retVal = ( _state == STATE_STARTED ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( )...
Returns an indication of whether this ME is started or not
35,434
final boolean addLocalizationPoint ( LWMConfig lp , DestinationDefinition dd ) { String thisMethodName = "addLocalizationPoint" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , lp ) ; } boolean success = _localizer . addLocalizationPoint ( lp , dd ) ; ...
Pass the request to add a new localization point onto the localizer object .
35,435
final void alterLocalizationPoint ( BaseDestination dest , LWMConfig lp ) { String thisMethodName = "alterLocalizationPoint" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , lp ) ; } try { _localizer . alterLocalizationPoint ( dest , lp ) ; } catch ( E...
Pass the request to alter a localization point onto the localizer object .
35,436
final void deleteLocalizationPoint ( JsBus bus , LWMConfig dest ) { String thisMethodName = "deleteLocalizationPoint" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , dest ) ; } try { _localizer . deleteLocalizationPoint ( bus , dest ) ; } catch ( SIBE...
Pass the request to delete a localization point onto the localizer object .
35,437
final void setLPConfigObjects ( List config ) { String thisMethodName = "setLPConfigObjects" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , "Number of LPs =" + config . size ( ) ) ; } _lpConfig . clear ( ) ; _lpConfig . addAll ( config ) ; if ( Trace...
Update the cache of localization point config objects . This method is used by dynamic config to refresh the cache .
35,438
public boolean isEventNotificationPropertySet ( ) { String thisMethodName = "isEventNotificationPropertySet" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; } boolean enabled = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEn...
Test whether the Event Notification property has been set . This method resolves the setting for the specific ME and the setting for the bus .
35,439
public JsMainImpl getMainImpl ( ) { String thisMethodName = "getMainImpl" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , this ) ; SibTr . exit ( tc , thisMethodName , _mainImpl ) ; } return _mainImpl ; }
Returns a reference to the repository service . This is used in conjunction with ConfigRoot to access EMF configuration documents .
35,440
protected final JsEngineComponent loadClass ( String className , int stopSeq , boolean reportError ) { String thisMethodName = "loadClass" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , thisMethodName , new Object [ ] { className , Integer . toString ( stopSeq ) , Bo...
Load the named class and add it to the list of engine components .
35,441
public void addMember ( JSConsumerKey key ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addMember" , key ) ; super . addMember ( key ) ; synchronized ( criteriaLock ) { if ( allCriterias != null ) { SelectionCriteria [ ] newCriterias = ne...
overriding superclass method
35,442
public static void setCustomPropertyVariables ( ) { UPGRADE_READ_TIMEOUT = Integer . valueOf ( customProps . getProperty ( "upgradereadtimeout" , Integer . toString ( TCPReadRequestContext . NO_TIMEOUT ) ) ) . intValue ( ) ; UPGRADE_WRITE_TIMEOUT = Integer . valueOf ( customProps . getProperty ( "upgradewritetimeout" ,...
The timeout to use when the request has been upgraded and a write is happening
35,443
public void registerInvalidations ( String cacheName , Iterator invalidations ) { InvalidationTableList invalidationTableList = getInvalidationTableList ( cacheName ) ; if ( invalidationTableList != null ) { try { invalidationTableList . readWriteLock . writeLock ( ) . lock ( ) ; while ( invalidations . hasNext ( ) ) {...
This adds id and template invalidations .
35,444
public CacheEntry filterEntry ( String cacheName , CacheEntry cacheEntry ) { InvalidationTableList invalidationTableList = getInvalidationTableList ( cacheName ) ; try { invalidationTableList . readWriteLock . readLock ( ) . lock ( ) ; return internalFilterEntry ( cacheName , invalidationTableList , cacheEntry ) ; } fi...
This ensures the specified CacheEntrys have not been invalidated .
35,445
public ArrayList filterEntryList ( String cacheName , ArrayList incomingList ) { InvalidationTableList invalidationTableList = getInvalidationTableList ( cacheName ) ; try { invalidationTableList . readWriteLock . readLock ( ) . lock ( ) ; Iterator it = incomingList . iterator ( ) ; while ( it . hasNext ( ) ) { Object ...
This ensures all incoming CacheEntrys have not been invalidated .
35,446
private final CacheEntry internalFilterEntry ( String cacheName , InvalidationTableList invalidationTableList , CacheEntry cacheEntry ) { InvalidateByIdEvent idEvent = null ; if ( cacheEntry == null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "internalFilterEntry(): Filtered cacheName=" + cacheName + " CE ==...
This is a helper method that filters a single CacheEntry . It is called by the filterEntry and filterEntryList methods .
35,447
public ExternalInvalidation filterExternalCacheFragment ( String cacheName , ExternalInvalidation externalCacheFragment ) { InvalidationTableList invalidationTableList = getInvalidationTableList ( cacheName ) ; try { invalidationTableList . readWriteLock . readLock ( ) . lock ( ) ; return internalFilterExternalCacheFra...
This ensures that the specified ExternalCacheFragment has not been invalidated .
35,448
public ArrayList filterExternalCacheFragmentList ( String cacheName , ArrayList incomingList ) { InvalidationTableList invalidationTableList = getInvalidationTableList ( cacheName ) ; try { invalidationTableList . readWriteLock . readLock ( ) . lock ( ) ; Iterator it = incomingList . iterator ( ) ; while ( it . hasNext...
This ensures all incoming ExternalCacheFragments have not been invalidated .
35,449
private final ExternalInvalidation internalFilterExternalCacheFragment ( String cacheName , InvalidationTableList invalidationTableList , ExternalInvalidation externalCacheFragment ) { if ( externalCacheFragment == null ) { return null ; } long timeStamp = externalCacheFragment . getTimeStamp ( ) ; if ( collision ( inv...
This is a helper method that filters a single ExternalCacheFragment . It is called by the filterExternalCacheFragment and filterExternalCacheFragmentList methods .
35,450
private final boolean collision ( Map < Object , InvalidationEvent > hashtable , Enumeration enumeration , long timeStamp ) { while ( enumeration . hasMoreElements ( ) ) { Object key = enumeration . nextElement ( ) ; InvalidationEvent invalidationEvent = ( InvalidationEvent ) hashtable . get ( key ) ; if ( ( invalidati...
This is a helper method that checks for a collision .
35,451
private InvalidationTableList getInvalidationTableList ( String cacheName ) { InvalidationTableList invalidationTableList = cacheinvalidationTables . get ( cacheName ) ; if ( invalidationTableList == null ) { synchronized ( this ) { invalidationTableList = new InvalidationTableList ( ) ; cacheinvalidationTables . put (...
Retrieve the InvalidationTableList by the specified cacheName .
35,452
public static File getBootstrapJar ( ) { if ( launchHome == null ) { if ( launchURL == null ) { launchURL = getLocationFromClass ( KernelUtils . class ) ; } launchHome = FileUtils . getFile ( launchURL ) ; } return launchHome ; }
The location of the launch jar is only obtained once .
35,453
public static File getBootstrapLibDir ( ) { if ( libDir . get ( ) == null ) { libDir = StaticValue . mutateStaticValue ( libDir , new Utils . FileInitializer ( getBootstrapJar ( ) . getParentFile ( ) ) ) ; } return libDir . get ( ) ; }
The lib dir is the parent of the bootstrap jar
35,454
public static Properties getProperties ( final InputStream is ) throws IOException { Properties p = new Properties ( ) ; try { if ( is != null ) { p . load ( is ) ; for ( Entry < Object , Object > entry : p . entrySet ( ) ) { String s = ( ( String ) entry . getValue ( ) ) . trim ( ) ; if ( s . length ( ) > 1 && s . sta...
Read properties from input stream . Will close the input stream before returning .
35,455
private static String getClassFromLine ( String line ) { line = line . trim ( ) ; if ( line . length ( ) == 0 || line . startsWith ( "#" ) ) return null ; String [ ] className = line . split ( "[\\s#]" ) ; if ( className . length >= 1 ) return className [ 0 ] ; return null ; }
Read a service class from the given line . Must ignore whitespace and skip comment lines or end of line comments .
35,456
public final void checkSpillLimits ( ) { long currentTotal ; long currentSize ; synchronized ( this ) { currentTotal = _countTotal ; currentSize = _countTotalBytes ; } if ( ! _spilling ) { _movingTotal = _movingTotal + currentTotal ; long movingAverage = _movingTotal / MOVING_AVERAGE_LENGTH ; _movingTotal = _movingTota...
Instead of just triggering spilling when we have a certain number of Items on a stream we now have the ability to trigger spilling if the total size of the Items on a stream goes over a pre - defined limit . This should allow us to control the memory usage of a stream in a more intuitive fashion .
35,457
public final void updateTotal ( int oldSizeInBytes , int newSizeInBytes ) throws SevereMessageStoreException { boolean doCallback = false ; synchronized ( this ) { boolean wasBelowHighLimit = ( _countTotalBytes < _watermarkBytesHigh ) ; boolean wasAboveLowLimit = ( _countTotalBytes >= _watermarkBytesLow ) ; _countTotal...
once we have the Item available to determine it from .
35,458
public static void addUnspecifiedAttributes ( FeatureDescriptor descriptor , Tag tag , String [ ] standardAttributesSorted , FaceletContext ctx ) { for ( TagAttribute attribute : tag . getAttributes ( ) . getAll ( ) ) { final String name = attribute . getLocalName ( ) ; if ( Arrays . binarySearch ( standardAttributesSo...
Adds all attributes from the given Tag which are NOT listed in standardAttributesSorted as a ValueExpression to the given BeanDescriptor . NOTE that standardAttributesSorted has to be alphabetically sorted in order to use binary search .
35,459
public static boolean containsUnspecifiedAttributes ( Tag tag , String [ ] standardAttributesSorted ) { for ( TagAttribute attribute : tag . getAttributes ( ) . getAll ( ) ) { final String name = attribute . getLocalName ( ) ; if ( Arrays . binarySearch ( standardAttributesSorted , name ) < 0 ) { return true ; } } retu...
Returns true if the given Tag contains attributes that are not specified in standardAttributesSorted . NOTE that standardAttributesSorted has to be alphabetically sorted in order to use binary search .
35,460
public static void addDevelopmentAttributes ( FeatureDescriptor descriptor , FaceletContext ctx , TagAttribute displayName , TagAttribute shortDescription , TagAttribute expert , TagAttribute hidden , TagAttribute preferred ) { if ( displayName != null ) { descriptor . setDisplayName ( displayName . getValue ( ctx ) ) ...
Applies the displayName shortDescription expert hidden and preferred attributes to the BeanDescriptor .
35,461
public static void addDevelopmentAttributesLiteral ( FeatureDescriptor descriptor , TagAttribute displayName , TagAttribute shortDescription , TagAttribute expert , TagAttribute hidden , TagAttribute preferred ) { if ( displayName != null ) { descriptor . setDisplayName ( displayName . getValue ( ) ) ; } if ( shortDesc...
Applies the displayName shortDescription expert hidden and preferred attributes to the BeanDescriptor if they are all literal values . Thus no FaceletContext is necessary .
35,462
public static boolean areAttributesLiteral ( TagAttribute ... attributes ) { for ( TagAttribute attribute : attributes ) { if ( attribute != null && ! attribute . isLiteral ( ) ) { return false ; } } return true ; }
Returns true if all specified attributes are either null or literal .
35,463
protected static FacesServletMapping calculateFacesServletMapping ( String servletPath , String pathInfo ) { if ( pathInfo != null ) { return FacesServletMapping . createPrefixMapping ( servletPath ) ; } else { int slashPos = servletPath . lastIndexOf ( '/' ) ; int extensionPos = servletPath . lastIndexOf ( '.' ) ; if ...
Determines the mapping of the FacesServlet in the web . xml configuration file . However there is no need to actually parse this configuration file as runtime information is sufficient .
35,464
private boolean isCDIEnabled ( Collection < WebSphereBeanDeploymentArchive > bdas ) { boolean anyHasBeans = false ; for ( WebSphereBeanDeploymentArchive bda : bdas ) { boolean hasBeans = false ; if ( bda . getType ( ) != ArchiveType . RUNTIME_EXTENSION ) { hasBeans = isCDIEnabled ( bda ) ; } anyHasBeans = anyHasBeans |...
Do any of the specified BDAs or any of BDAs accessible by them have any beans
35,465
private boolean isCDIEnabled ( WebSphereBeanDeploymentArchive bda ) { Boolean hasBeans = cdiStatusMap . get ( bda . getId ( ) ) ; if ( hasBeans == null ) { hasBeans = bda . hasBeans ( ) || bda . isExtension ( ) ; cdiStatusMap . put ( bda . getId ( ) , hasBeans ) ; hasBeans = hasBeans || isCDIEnabled ( bda . getWebSpher...
Does the specified BDA or any of BDAs accessible by it have any beans or it is an extension which could add beans
35,466
public boolean isCDIEnabled ( String bdaId ) { boolean hasBeans = false ; if ( isCDIEnabled ( ) ) { Boolean hasBeansBoolean = cdiStatusMap . get ( bdaId ) ; if ( hasBeansBoolean == null ) { WebSphereBeanDeploymentArchive bda = deploymentDBAs . get ( bdaId ) ; if ( bda == null ) { hasBeans = false ; } else { hasBeans = ...
Does the specified BDA or any of BDAs accessible by it have any beans or an extension which might add beans .
35,467
private BeanDeploymentArchive createBDAOntheFly ( Class < ? > beanClass ) throws CDIException { BeanDeploymentArchive bdaToReturn = findCandidateBDAtoAddThisClass ( beanClass ) ; if ( bdaToReturn != null ) { return bdaToReturn ; } else { return createNewBdaAndMakeWiring ( beanClass ) ; } }
Create a bda and wire it in the deployment graph
35,468
private BeanDeploymentArchive createNewBdaAndMakeWiring ( Class < ? > beanClass ) { try { OnDemandArchive onDemandArchive = new OnDemandArchive ( cdiRuntime , application , beanClass ) ; WebSphereBeanDeploymentArchive newBda = BDAFactory . createBDA ( this , onDemandArchive , cdiRuntime ) ; ClassLoader beanClassCL = on...
Create a new bda and put the beanClass to the bda and then wire this bda in the deployment according to the classloading hierarchy
35,469
private BeanDeploymentArchive findCandidateBDAtoAddThisClass ( Class < ? > beanClass ) throws CDIException { for ( WebSphereBeanDeploymentArchive wbda : getWebSphereBeanDeploymentArchives ( ) ) { if ( wbda . getClassLoader ( ) == beanClass . getClassLoader ( ) ) { wbda . addToBeanClazzes ( beanClass ) ; return wbda ; }...
Find the bda with the same classloader as the beanClass and then add the beanclasses to it
35,470
private void makeWiring ( WebSphereBeanDeploymentArchive wireFromBda , WebSphereBeanDeploymentArchive wireToBda , ClassLoader wireToBdaCL , ClassLoader wireFromBdaCL ) { while ( wireFromBdaCL != null ) { if ( wireFromBdaCL == wireToBdaCL ) { wireFromBda . addBeanDeploymentArchive ( wireToBda ) ; break ; } else { wireFr...
Make a wiring from the wireFromBda to the wireToBda if the wireFromBda s classloader is the descendant of the wireToBda s classloader
35,471
public void addBeanDeploymentArchive ( WebSphereBeanDeploymentArchive bda ) throws CDIException { deploymentDBAs . put ( bda . getId ( ) , bda ) ; extensionClassLoaders . add ( bda . getClassLoader ( ) ) ; ArchiveType type = bda . getType ( ) ; if ( type != ArchiveType . SHARED_LIB && type != ArchiveType . RUNTIME_EXTE...
Add a BeanDeploymentArchive to this deployment
35,472
public void addBeanDeploymentArchives ( Set < WebSphereBeanDeploymentArchive > bdas ) throws CDIException { for ( WebSphereBeanDeploymentArchive bda : bdas ) { addBeanDeploymentArchive ( bda ) ; } }
Add a Set of BDAs to the deployment
35,473
public void scan ( ) throws CDIException { Collection < WebSphereBeanDeploymentArchive > allBDAs = new ArrayList < WebSphereBeanDeploymentArchive > ( deploymentDBAs . values ( ) ) ; for ( WebSphereBeanDeploymentArchive bda : allBDAs ) { bda . scanForBeanDefiningAnnotations ( true ) ; } for ( WebSphereBeanDeploymentArch...
Scan all the BDAs in the deployment to see if there are any bean classes .
35,474
public void initializeInjectionServices ( ) throws CDIException { Set < ReferenceContext > cdiReferenceContexts = new HashSet < ReferenceContext > ( ) ; for ( WebSphereBeanDeploymentArchive bda : getApplicationBDAs ( ) ) { if ( bda . getType ( ) != ArchiveType . MANIFEST_CLASSPATH && bda . getType ( ) != ArchiveType . ...
Initialize the Resource Injection Service with each BDA s bean classes .
35,475
public void shutdown ( ) { if ( this . bootstrap != null ) { AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { public Void run ( ) { bootstrap . shutdown ( ) ; return null ; } } ) ; this . bootstrap = null ; this . deploymentDBAs . clear ( ) ; this . applicationBDAs . clear ( ) ; this . classloader ...
Shutdown and clean up the whole deployment . The deployment will not be usable after this call has been made .
35,476
boolean isConfigValid ( ConvergedClientConfig config ) { boolean valid = true ; String clientId = config . getClientId ( ) ; String clientSecret = config . getClientSecret ( ) ; String authorizationEndpoint = config . getAuthorizationEndpointUrl ( ) ; String jwksUri = config . getJwkEndpointUrl ( ) ; if ( clientId == n...
Check for some things that will always fail and emit message about bad config . Do here so 1 ) classic oidc messages don t change and 2 ) put error message closer in log to failure .
35,477
protected void cleanOutBifurcatedMessages ( BifurcatedConsumerSessionImpl owner , boolean bumpRedeliveryOnClose ) throws SIResourceException , SISessionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "cleanOutBifurcatedMessages" , new Object [ ] { new I...
When a bifurcated consumer is closed all locked messages owned by that consumer must be unlocked
35,478
protected int getNumberOfLockedMessages ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getNumberOfLockedMessages" ) ; int count = 0 ; synchronized ( this ) { LMEMessage message ; message = firstMsg ; while ( message != null ) { count ++ ; message = message . next ...
Return the number of locked messages that are part of this locked message enumeration . The count will start from thr firstMsg unlike th getRemainingMessageCount which starts from the currentMsg .
35,479
protected void removeMessage ( LMEMessage message ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeMessage" , new Object [ ] { new Integer ( hashCode ( ) ) , message , this } ) ; if ( message == callbackEntryMsg ) callbackEntryMsg = message . previous ; if ( mes...
Remove a message object from the list
35,480
protected void resetCallbackCursor ( ) throws SIResourceException , SISessionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetCallbackCursor" , new Integer ( hashCode ( ) ) ) ; synchronized ( this ) { unlockAllUnread ( ) ; callbackEntryMsg = lastMs...
This is called when a consumeMessages call has completed it returns the LME to a consistent state ready for the next consumeMessages .
35,481
final JsMessage setPropertiesInMessage ( LMEMessage theMessage ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setPropertiesInMessage" , theMessage ) ; boolean copyMade = false ; JsMessageWrapper jsMessageWrapper = ( JsMessageWrapper ) theMessage . message ; JsMessag...
Sets the redelivered count and the message wait time if required .
35,482
protected void unlockAll ( boolean closingSession ) throws SIResourceException , SIMPMessageNotLockedException , SISessionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "unlockAll" , new Object [ ] { new Integer ( hashCode ( ) ) , this } ) ; int unlock...
Unlock all the messages in the list
35,483
private void unlockAllUnread ( ) throws SIResourceException , SISessionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "unlockAllUnread" , new Object [ ] { new Integer ( hashCode ( ) ) , this } ) ; int unlockedMessages = 0 ; synchronized ( this ) { mess...
Method to unlock all messages which haven t been read
35,484
public boolean containsValue ( Token value , Transaction transaction ) throws ObjectManagerException { try { for ( Iterator iterator = entrySet ( ) . iterator ( ) ; ; ) { Entry entry = ( Entry ) iterator . next ( transaction ) ; Token entryValue = entry . getValue ( ) ; if ( value == entryValue ) { return true ; } } } ...
Determines if the Map contains the Token
35,485
public long countAllMessagesOnStream ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "countAllMessagesOnStream" ) ; long count = 0 ; _targetStream . setCursor ( 0 ) ; TickRange tr = _targetStream . getNext ( ) ; while ( tr . endstamp < RangeList . INFINITY ) { if ( ...
Counts the number of messages in the value state on the stream .
35,486
public final void incrementUnlockCount ( long tick ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "incrementUnlockCount" , Long . valueOf ( tick ) ) ; _targetStream . setCursor ( tick ) ; TickRange tickRange = _targetStream . getNext ( ) ; if ( tickRange . type == Ti...
sets the unlock count of the value tick s msg .
35,487
public void processRequestAck ( long tick , long dmeVersion ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processRequestAck" , new Object [ ] { Long . valueOf ( tick ) , Long . valueOf ( dmeVersion ) } ) ; if ( dmeVersion >= _latestDMEVersion ) { _targetStream . se...
A ControlRequestAck message tells the RME to slow down its get repetition timeout since we now know that the DME has received the request .
35,488
public void processResetRequestAck ( long dmeVersion , SendDispatcher sendDispatcher ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "processResetRequestAck" , Long . valueOf ( dmeVersion ) ) ; if ( dmeVersion >= _latestDMEVersion ) { if ( dmeVersion > _latestDMEVersi...
A ControlResetRequestAck message tells the RME to start re - sending get requests with an eager timeout since the DME has crashed and recovered .
35,489
public AnycastInputHandler getAnycastInputHandler ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getAnycastInputHandler" ) ; SibTr . exit ( tc , "getAnycastInputHandler" , _parent ) ; } return _parent ; }
Returns the AnycastInputHandler associated with this AIStream
35,490
public void messagingEngineStarting ( final JsMessagingEngine messagingEngine ) { final String methodName = "messagingEngineStarting" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } try { addMessagingEngine ( messagingEn...
Called to indicate that a messaging engine has been started . Adds it to the set of active messaging engines .
35,491
public void messagingEngineStopping ( final JsMessagingEngine messagingEngine , final int mode ) { final String methodName = "messagingEngineStopping" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { messagingEngine , mode } )...
Called to indicate that a messaging engine is stopping . Removes it from the set of active messaging engines and closes any open connection .
35,492
private SQLException classNotFound ( Object interfaceNames , Set < String > packagesSearched , String dsId , Throwable cause ) { if ( cause instanceof SQLException ) return ( SQLException ) cause ; String sharedLibId = sharedLib . id ( ) ; Collection < String > driverJARs = getClasspath ( sharedLib , false ) ; String m...
Returns an exception to raise when the data source class is not found .
35,493
public ConnectionPoolDataSource createConnectionPoolDataSource ( Properties props , String dataSourceID ) throws SQLException { lock . readLock ( ) . lock ( ) ; try { if ( ! isInitialized ) try { lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; if ( ! isInitialized ) { if ( ! loadFromApp ( ) ) class...
Create a ConnectionPoolDataSource
35,494
public DataSource createDataSource ( Properties props , String dataSourceID ) throws SQLException { lock . readLock ( ) . lock ( ) ; try { if ( ! isInitialized ) try { lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; if ( ! isInitialized ) { if ( ! loadFromApp ( ) ) classloader = AdapterUtil . getCl...
Create a DataSource
35,495
public Object getDriver ( String url , Properties props , String dataSourceID ) throws Exception { lock . readLock ( ) . lock ( ) ; try { if ( ! isInitialized ) try { lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; if ( ! isInitialized ) { if ( ! loadFromApp ( ) ) classloader = AdapterUtil . getCla...
Load the Driver instance for the specified URL .
35,496
public static Collection < String > getClasspath ( Library sharedLib , boolean upperCaseFileNamesOnly ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getClasspath" , sharedLib ) ; Collection < String > classpath = new LinkedList < String > ...
Returns a list of file names for the specified library .
35,497
private void modified ( Dictionary < String , ? > newProperties , boolean logMessage ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "modified" , newProperties ) ; boolean replaced = false ; lock . writeLock ( ) . lock ( ) ; try { if ...
Clears the configuration of this JDBCDriverService so that it can lazily initialize with the new configuration on next use .
35,498
private static void setProperty ( Object obj , PropertyDescriptor pd , String value , boolean doTraceValue ) throws Exception { Object param = null ; String propName = pd . getName ( ) ; if ( tc . isDebugEnabled ( ) ) { if ( "URL" . equals ( propName ) || "url" . equals ( propName ) ) { Tr . debug ( tc , "set " + propN...
Handles the setting of any property for which a public single - parameter setter exists on the DataSource and for which the property data type is either a primitive or has a single - parameter String constructor .
35,499
protected void setSharedLib ( Library lib ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "setSharedLib" , lib ) ; sharedLib = lib ; }
Declarative Services method for setting the SharedLibrary service