idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
160,300
private void closeConfig ( Config config ) { if ( config instanceof WebSphereConfig ) { try { ( ( WebSphereConfig ) config ) . close ( ) ; } catch ( IOException e ) { throw new ConfigException ( Tr . formatMessage ( tc , "could.not.close.CWMCG0004E" , e ) ) ; } } }
Close a given config if it s a WebSphereConfig
76
11
160,301
@ Override public SICoreConnection getSICoreConnection ( ) throws IllegalStateException { if ( connectionClosed ) { throw new IllegalStateException ( NLS . getFormattedMessage ( ( "ILLEGAL_STATE_CWSJR1086" ) , new Object [ ] { "getSICoreConnection" } , null ) ) ; } return _coreConnection ; }
Returns the core connection created for and associated with this connection .
82
12
160,302
@ Override synchronized public void close ( ) throws SIConnectionLostException , SIIncorrectCallException , SIResourceException , SIErrorException , SIConnectionDroppedException , SIConnectionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TR...
Closes this connection its associated core connection and any sessions created from it .
303
15
160,303
private static boolean isRunningInWAS ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( TRACE , "isRunningInWAS" ) ; } if ( inWAS == null ) { inWAS = Boolean . TRUE ; } if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( TRAC...
Returns true if running in WAS . The check is to see if com . ibm . tx . jta . Transaction . TransactionManagerFactory is on the classpath .
128
34
160,304
private static final Object getCurrentUOWCoord ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( TRACE , "getCurrentUOWCoord" ) ; } Object currentUOW = null ; if ( isRunningInWAS ( ) ) { currentUOW = EmbeddableTransactionManagerFactory . getUOWCurrent ( ) . getUOWCoor...
This method uses reflection to try and obtain the current UOW if we are not inside WAS null is returned .
154
22
160,305
private PostCreateAction listenForLibraryChanges ( final String libid ) { return new PostCreateAction ( ) { @ Override public void invoke ( AppClassLoader acl ) { listenForLibraryChanges ( libid , acl ) ; } } ; }
create an action that will create a listener when invoked
53
10
160,306
private void listenForLibraryChanges ( String libid , AppClassLoader acl ) { // ensure this loader is removed from the canonical store when the library is updated new WeakLibraryListener ( libid , acl . getKey ( ) . getId ( ) , acl , bundleContext ) { @ Override protected void update ( ) { Object cl = get ( ) ; if ( cl...
create a listener to remove a loader from the canonical store on library update
115
14
160,307
private String getTopic ( BundleEvent bundleEvent ) { StringBuilder topic = new StringBuilder ( BUNDLE_EVENT_TOPIC_PREFIX ) ; switch ( bundleEvent . getType ( ) ) { case BundleEvent . INSTALLED : topic . append ( "INSTALLED" ) ; break ; case BundleEvent . STARTED : topic . append ( "STARTED" ) ; break ; case BundleEven...
Determine the appropriate topic to use for the Bundle Event .
214
13
160,308
public PmiDataInfo [ ] submoduleMembers ( String submoduleName , int level ) { if ( submoduleName == null ) return listLevelData ( level ) ; ArrayList returnData = new ArrayList ( ) ; // special case for category boolean inCategory = false ; if ( submoduleName . startsWith ( "ejb." ) ) inCategory = true ; Iterator allD...
Returns an array of PmiDataInfo for the given submoduleName and level .
299
17
160,309
public PmiDataInfo [ ] listLevelData ( int level ) { ArrayList levelData = new ArrayList ( ) ; Iterator allData = perfData . values ( ) . iterator ( ) ; while ( allData . hasNext ( ) ) { PmiDataInfo dataInfo = ( PmiDataInfo ) allData . next ( ) ; if ( dataInfo . getLevel ( ) <= level ) { levelData . add ( dataInfo ) ; ...
Returns the statistic with level equal to or lower than level
162
11
160,310
public PmiDataInfo [ ] listMyLevelData ( int level ) { ArrayList levelData = new ArrayList ( ) ; Iterator allData = perfData . values ( ) . iterator ( ) ; while ( allData . hasNext ( ) ) { PmiDataInfo dataInfo = ( PmiDataInfo ) allData . next ( ) ; if ( dataInfo . getLevel ( ) == level ) { levelData . add ( dataInfo ) ...
Returns the statistic with level equal to level
116
8
160,311
public int [ ] listStatisticsWithDependents ( ) { if ( dependList == null ) { ArrayList list = new ArrayList ( ) ; Iterator allData = perfData . values ( ) . iterator ( ) ; while ( allData . hasNext ( ) ) { PmiDataInfo dataInfo = ( PmiDataInfo ) allData . next ( ) ; if ( dataInfo . getDependency ( ) != null ) { list . ...
Returns String representation of this object
174
6
160,312
private void scheduleEvictionTask ( long timeoutInMilliSeconds ) { EvictionTask evictionTask = new EvictionTask ( ) ; // Before creating new Timers, which create new Threads, we // must ensure that we are not using any application classloader // as the current thread's context classloader. Otherwise, it // is possible ...
Creates a timer and schedules the eviction task based on the timeout in milliseconds
197
15
160,313
public synchronized Object update ( String key , Object value ) { // evict until size < maxSize while ( isEvictionRequired ( ) && entryLimit > 0 && entryLimit < Integer . MAX_VALUE ) { evictStaleEntries ( ) ; } CacheEntry oldEntry = null ; CacheEntry curEntry = new CacheEntry ( value ) ; if ( primaryTable . containsKey...
Update the value into the Cache using the specified key but do not change the table level of the cache . If the key is not in any table add it to the primaryTable
203
35
160,314
public synchronized void clearAllEntries ( ) { tertiaryTable . putAll ( primaryTable ) ; tertiaryTable . putAll ( secondaryTable ) ; primaryTable . clear ( ) ; secondaryTable . clear ( ) ; evictStaleEntries ( ) ; }
Purge all entries from the Cache . Semantically this should behave the same as the expiration of all entries from the cache .
55
25
160,315
public static WebSphereBeanDeploymentArchive createBDA ( WebSphereCDIDeployment deployment , ExtensionArchive extensionArchive , CDIRuntime cdiRuntime ) throws CDIException { Set < String > additionalClasses = extensionArchive . getExtraClasses ( ) ; Set < String > additionalAnnotations = extensionArchive . getExtraBea...
only for extensions
279
3
160,316
public void setWrapperCacheSize ( int cacheSize ) { wrapperCache . setCachePreferredMaxSize ( cacheSize ) ; int updatedCacheSize = getBeanIdCacheSize ( cacheSize ) ; beanIdCache . setSize ( updatedCacheSize ) ; }
Call to update the BeanIdCache cache size .
56
10
160,317
private int getBeanIdCacheSize ( int cacheSize ) { int beanIdCacheSize = cacheSize ; if ( beanIdCacheSize < ( Integer . MAX_VALUE / 2 ) ) beanIdCacheSize = beanIdCacheSize * 2 ; else beanIdCacheSize = Integer . MAX_VALUE ; return beanIdCacheSize ; }
Calculate the size to be used for the BeanIdCache .
71
14
160,318
public boolean unregister ( BeanId beanId , boolean dropRef ) // f111627 throws CSIException { boolean removed = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "unregister" , new Object [ ] { beanId , new Boolean ( dropRef ) } ) ; // d181569 ByteArray wrapperKey = b...
d181569 - changed signature of method .
405
10
160,319
public void unregisterHome ( J2EEName homeName , EJSHome homeObj ) throws CSIException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "unregisterHome" ) ; J2EEName cacheHomeName ; int numEnumerated = 0 , numRemoved = 0 ; // d103404.2 Enumeration < ? > enumerate = wrapperC...
unregisterHome removes from cache homeObj and all Objects that have homeObj as it s home . It also unregisters these objects from from the orb object adapter .
499
34
160,320
@ Override public void discardObject ( EJBCache wrapperCache , Object key , Object ele ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "discardObject" , new Object [ ] { key , ele } ) ; EJSWrapperCommon wrapperCommon = ( EJSWrapperCommon ) ele ; wrapperCommon . disconnec...
Unregister a wrapper instance when it is castout of the wrapper cache .
137
15
160,321
@ Override public Object faultOnKey ( EJBCache cache , Object key ) throws FaultException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "faultOnKey" , key ) ; ByteArray wrapperKey = ( ByteArray ) key ; EJSWrapperCommon result = null ; // f111627 // Check if the beanId is...
Invoked by the Cache FaultStrategy when an object was not found and needs to be inserted . We create a new wrapper instance to be inserted into the cache . The cache package holds the lock on a bucket when this method is invoked .
513
48
160,322
public boolean isValid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Checking validity of token " + this . getClass ( ) . getName ( ) ) ; if ( token != null ) { // return if this token is still valid long currentTime = System . currentTimeMillis ( ) ; long expiratio...
Validates the token including expiration signature etc .
271
9
160,323
public String getPrincipal ( ) { String [ ] accessIDArray = getAttributes ( "u" ) ; if ( accessIDArray != null && accessIDArray . length > 0 ) return accessIDArray [ 0 ] ; else return null ; }
Gets the principal that this Token belongs to . If this is an authorization token this principal string must match the authentication token principal string or the message will be rejected .
52
33
160,324
public String getUniqueID ( ) { // return null so that this token does not change the uniqueness, // all static attributes from the default tokens. String [ ] cacheKeyArray = getAttributes ( AttributeNameConstants . WSCREDENTIAL_CACHE_KEY ) ; if ( cacheKeyArray != null && cacheKeyArray [ 0 ] != null ) { if ( TraceCompo...
Returns a unique identifier of the token based upon information the provider considers makes this a unique token . This will be used for caching purposes and may be used in combination with other token unique IDs that are part of the same Subject .
174
45
160,325
public String [ ] getAttributes ( String key ) { if ( token != null ) return token . getAttributes ( key ) ; else return null ; }
Gets the attribute value based on the named value .
31
11
160,326
@ Override public long getMaximumTimeInStore ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMaximumTimeInStore" ) ; long maxTime = getMessageItem ( ) . getMaximumTimeInStore ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr ...
Return the maximum time this reference should spend in a ReferenceStream .
119
13
160,327
private void resetEvents ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetEvents" ) ; // Reset all callbacks PRE_COMMIT_ADD = null ; PRE_COMMIT_REMOVE = null ; POST_COMMIT_ADD_1 = null ; POST_COMMIT_ADD_2 = null ; POST_COMMIT_REMOVE_1 = null ; POST_COMMIT_REMOV...
Reset all callbacks to null .
318
8
160,328
@ Override public SIBUuid12 getProducerConnectionUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getProducerConnectionUuid" ) ; SibTr . exit ( tc , "getProducerConnectionUuid" ) ; } return getMessageItem ( ) . getProducerConnectionUuid ( ) ; }
Returns the producerConnectionUuid .
94
7
160,329
private MessageItem getMessageItem ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMessageItem" ) ; MessageItem msg = null ; try { msg = ( MessageItem ) getReferredItem ( ) ; } catch ( MessageStoreException e ) { // FFDC FFDCFilter . processException ( e , "com....
Returns the referenced message item
256
5
160,330
public static void setTextInfoTranslationEnabled ( boolean textInfoTranslationEnabled , Locale locale ) { com . ibm . ws . pmi . stat . StatsImpl . setEnableNLS ( textInfoTranslationEnabled , locale ) ; }
This method allows translation of the textual information . By default translation is enabled using the default Locale .
50
20
160,331
private final static void ELCheckType ( final Object obj , final Class < ? > type ) throws ELException { if ( String . class . equals ( type ) ) { ELSupport . coerceToString ( obj ) ; } if ( ELArithmetic . isNumberType ( type ) ) { ELSupport . coerceToNumber ( obj , type ) ; } if ( Character . class . equals ( type ) |...
method used to replace ELSupport . checkType
166
9
160,332
public static String getProductVersion ( RepositoryResource installResource ) { String resourceVersion = null ; try { Collection < ProductDefinition > pdList = new ArrayList < ProductDefinition > ( ) ; for ( ProductInfo pi : ProductInfo . getAllProductInfo ( ) . values ( ) ) { pdList . add ( new ProductInfoProductDefin...
Gets the version of the resource using the getAppliesToVersions function .
145
16
160,333
public static boolean isPublicAsset ( ResourceType resourceType , RepositoryResource installResource ) { if ( resourceType . equals ( ResourceType . FEATURE ) || resourceType . equals ( ResourceType . ADDON ) ) { EsaResource esar = ( ( EsaResource ) installResource ) ; if ( esar . getVisibility ( ) . equals ( Visibilit...
Checks if Feature or Addon has visibility public or install OR checks if the resource is a Product sample or open source to see if it is a public asset .
143
33
160,334
public static Map < String , Collection < String > > writeResourcesToDiskRepo ( Map < String , Collection < String > > downloaded , File toDir , Map < String , List < List < RepositoryResource > > > installResources , String productVersion , EventManager eventManager , boolean defaultRepo ) throws InstallException { in...
The function writes the resources to the downloaded disk repo
248
10
160,335
@ Reference ( cardinality = ReferenceCardinality . MULTIPLE ) protected void setJaasLoginModuleConfig ( JAASLoginModuleConfig lmc , Map < String , Object > props ) { String pid = ( String ) props . get ( KEY_SERVICE_PID ) ; loginModuleMap . put ( pid , lmc ) ; }
SINCE THIS IS A STATIC REFERENCE DS provides enough synchronization so that we don t need to synchronize on the map .
74
28
160,336
public void init ( HttpInboundServiceContext context ) { this . message = context . getRequest ( ) ; if ( this . useEE7Streams ) { this . body = new HttpInputStreamEE7 ( context ) ; } else { this . body = new HttpInputStreamImpl ( context ) ; } }
Initialize with a new connection .
69
7
160,337
public static Metadata < Extension > loadExtension ( String extensionClass , ClassLoader classloader ) { Class < ? extends Extension > serviceClass = loadClass ( Extension . class , extensionClass , classloader ) ; if ( serviceClass == null ) { return null ; } Extension serviceInstance = prepareInstance ( serviceClass ...
Create the extension and return a metadata for the extension
96
10
160,338
public static < S > Class < ? extends S > loadClass ( Class < S > expectedType , String serviceClassName , ClassLoader classloader ) { Class < ? > clazz = null ; Class < ? extends S > serviceClass = null ; try { clazz = classloader . loadClass ( serviceClassName ) ; serviceClass = clazz . asSubclass ( expectedType ) ; ...
load the class and then casts to the specified sub class
239
11
160,339
public static < S > S prepareInstance ( Class < ? extends S > serviceClass ) { try { final Constructor < ? extends S > constructor = serviceClass . getDeclaredConstructor ( ) ; AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { @ Override public Void run ( ) { constructor . setAccessible ( true ) ; r...
Creates an object of the service class
545
8
160,340
private static boolean isVisible ( ClassLoader loaderA , ClassLoader loaderB ) { if ( loaderB == loaderA || loaderB . getParent ( ) == loaderA ) { return true ; } return false ; }
return true if loaderA is visible to loaderB
46
10
160,341
public static ClassLoader getAndSetLoader ( ClassLoader newCL ) { ThreadContextAccessor tca = ThreadContextAccessor . getThreadContextAccessor ( ) ; //This could be a ClassLoader or the special type UNCHANGED. Object maybeOldCL = tca . pushContextClassLoaderForUnprivileged ( newCL ) ; if ( maybeOldCL instanceof ClassLo...
This method sets the thread context classloader and returns whatever was the TCCL before it was updated .
101
21
160,342
public static boolean isWeldProxy ( Object obj ) { Class < ? > clazz = obj . getClass ( ) ; boolean result = isWeldProxy ( clazz ) ; return result ; }
Return whether the object is a weld proxy
42
8
160,343
@ Override public < T > void aroundInject ( final InjectionContext < T > injectionContext ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Annotations: " + injectionContext . getAnnotatedType ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnable...
Perform Injection . For EE
163
7
160,344
@ Override public void readSet ( int requestNumber , SIMessageHandle [ ] msgHandles ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readSet" , new Object [ ] { requestNumber , msgHandles } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnable...
This method will return a set of messages currently locked by the messaging engine .
646
15
160,345
@ Override public void readAndDeleteSet ( int requestNumber , SIMessageHandle [ ] msgHandles , int tran ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readAndDeleteSet" , new Object [ ] { requestNumber , msgHandles , tran } ) ; if ( TraceComponent . isAnyTrac...
This method will return and delete a set of messages currently locked by the messaging engine .
796
17
160,346
public String getCodeSource ( ProtectionDomain pd ) { CodeSource cs = pd . getCodeSource ( ) ; String csStr = null ; if ( cs == null ) { csStr = "null code source" ; } else { URL url = cs . getLocation ( ) ; if ( url == null ) { csStr = "null code URL" ; } else { csStr = url . toString ( ) ; } } return csStr ; }
Find the code source based on the protection domain
96
9
160,347
public String permissionToString ( java . security . CodeSource cs , ClassLoader classloaderClass , PermissionCollection col ) { StringBuffer buf = new StringBuffer ( "ClassLoader: " ) ; if ( classloaderClass == null ) { buf . append ( "Primordial Classloader" ) ; } else { buf . append ( classloaderClass . getClass ( )...
Print out permissions granted to a CodeSource .
251
9
160,348
boolean isOffendingClass ( Class < ? > [ ] classes , int j , ProtectionDomain pd2 , Permission inPerm ) { // Return true if ... return ( ! classes [ j ] . getName ( ) . startsWith ( "java" ) ) && // as long as not // starting with // java ( classes [ j ] . getName ( ) . indexOf ( "com.ibm.ws.kernel.launch.internal.NoRe...
isOffendingClass determines the offending class from the classes defined in the stack .
218
16
160,349
protected void cleanup ( ) { final String methodName = "cleanup" ; if ( TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } super . cleanup ( ) ; if ( _successfulMessages . size ( ) > 0 ) { try { deleteMessages ( getMessageHandles ( _successfulMessages ) , null ) ; } catch ( final ResourceExc...
Invoked after all messages in the batch have been delivered . Deletes any successful messages .
194
18
160,350
public String getContextName ( ) { ExternalContext ctx = _MyFacesExternalContextHelper . firstInstance . get ( ) ; if ( ctx == null ) { throw new UnsupportedOperationException ( ) ; } return ctx . getContextName ( ) ; }
Returns the name of the underlying context
57
7
160,351
@ Override public boolean addTransformer ( final ClassFileTransformer cft ) { transformers . add ( cft ) ; // Also recursively register with parent(s), until a non-AppClassLoader or GlobalSharedLibrary loader is encountered. if ( parent instanceof AppClassLoader ) { if ( Util . isGlobalSharedLibraryLoader ( ( ( AppClas...
Spring method to register the given ClassFileTransformer on this ClassLoader
162
14
160,352
@ Override public Bundle getBundle ( ) { return parent instanceof GatewayClassLoader ? ( ( GatewayClassLoader ) parent ) . getBundle ( ) : parent instanceof LibertyLoader ? ( ( LibertyLoader ) parent ) . getBundle ( ) : null ; }
Returns the Bundle of the Top Level class loader
57
9
160,353
@ FFDCIgnore ( value = { IllegalArgumentException . class } ) private void definePackage ( ByteResourceInformation byteResourceInformation , String packageName ) { // If the package is in a JAR then we can load the JAR manifest to see what package definitions it's got Manifest manifest = byteResourceInformation . getMa...
This method will define the package using the byteResourceInformation for a class to get the URL for this package to try to load a manifest . If a manifest can t be loaded from the URL it will create the package with no package versioning or sealing information .
215
52
160,354
@ FFDCIgnore ( ClassNotFoundException . class ) private Class < ? > findClassCommonLibraryClassLoaders ( String name ) throws ClassNotFoundException { for ( LibertyLoader cl : delegateLoaders ) { try { return cl . findClass ( name ) ; } catch ( ClassNotFoundException e ) { // Ignore. Will throw at the end if class is n...
Search for the class using the common library classloaders .
107
12
160,355
private URL findResourceCommonLibraryClassLoaders ( String name ) { for ( LibertyLoader cl : delegateLoaders ) { URL url = cl . findResource ( name ) ; if ( url != null ) { return url ; } } // If we reached here, then the resource was not found. return null ; }
Search for the resource using the common library classloaders .
65
12
160,356
private CompositeEnumeration < URL > findResourcesCommonLibraryClassLoaders ( String name , CompositeEnumeration < URL > enumerations ) throws IOException { for ( LibertyLoader cl : delegateLoaders ) { enumerations . add ( cl . findResources ( name ) ) ; } return enumerations ; }
Search for the resources using the common library classloaders .
64
12
160,357
private void copyLibraryElementsToClasspath ( Library library ) { Collection < File > files = library . getFiles ( ) ; addToClassPath ( library . getContainers ( ) ) ; if ( files != null && ! ! ! files . isEmpty ( ) ) { for ( File file : files ) { nativeLibraryFiles . add ( file ) ; } } for ( Fileset fileset : library ...
Takes the Files and Folders from the Library and adds them to the various classloader classpaths
120
21
160,358
private static boolean checkLib ( final File f , String basename ) { boolean fExists = System . getSecurityManager ( ) == null ? f . exists ( ) : AccessController . doPrivileged ( new PrivilegedAction < Boolean > ( ) { @ Override public Boolean run ( ) { return f . exists ( ) ; } } ) ; return fExists && ( f . getName (...
Check if the given file s name matches the given library basename .
119
14
160,359
public static void removeCompositeComponentForResolver ( FacesContext facesContext ) { List < UIComponent > list = ( List < UIComponent > ) facesContext . getAttributes ( ) . get ( CURRENT_COMPOSITE_COMPONENT_KEY ) ; if ( list != null ) { list . remove ( list . size ( ) - 1 ) ; } }
Removes the composite component from the attribute map of the FacesContext .
83
14
160,360
public void processHttpChainWork ( boolean enableEndpoint , boolean isPause ) { if ( enableEndpoint ) { // enable the endpoint if it is currently disabled // it's ok if the endpoint is stopped, the config update will occur @ next start endpointState . compareAndSet ( DISABLED , ENABLED ) ; if ( httpPort >= 0 ) { httpCh...
Process HTTP chain work .
252
5
160,361
@ FFDCIgnore ( Exception . class ) final void shutdownFramework ( ) { Tr . audit ( tc , "httpChain.error.shutdown" , name ) ; try { Bundle bundle = bundleContext . getBundle ( Constants . SYSTEM_BUNDLE_LOCATION ) ; if ( bundle != null ) bundle . stop ( ) ; } catch ( Exception e ) { // do not FFDC this. // exceptions du...
When an error occurs during startup and the config variable fail . on . error . enabled is true then this method is used to stop the root bundle thus bringing down the OSGi framework .
104
37
160,362
@ Trivial @ Reference ( name = "sslOptions" , service = ChannelConfiguration . class , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY , cardinality = ReferenceCardinality . OPTIONAL ) protected void setSslOptions ( ServiceReference < ChannelConfiguration > service ) { if ( TraceCompo...
The specific sslOptions is selected by a filter set through metatype that matches a specific user - configured option set or falls back to a default .
150
31
160,363
@ Trivial @ Reference ( name = "remoteIp" , service = ChannelConfiguration . class , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY , cardinality = ReferenceCardinality . MANDATORY ) protected void setRemoteIp ( ChannelConfiguration config ) { if ( TraceComponent . isAnyTracingEnable...
The specific remoteIpOptions is selected by a filter set through metatype that matches a specific user - configured option set or falls back to a default .
146
32
160,364
@ Reference ( name = "executorService" , service = ExecutorService . class , policy = ReferencePolicy . DYNAMIC ) protected void setExecutorService ( ServiceReference < ExecutorService > executorService ) { this . executorService . setReference ( executorService ) ; }
DS method for setting the required dynamic executor service reference .
63
12
160,365
@ Trivial private void performAction ( Runnable action , boolean addToQueue ) { ExecutorService exec = executorService . getService ( ) ; if ( exec == null ) { // If we can't find the executor service, we have to run it in place. action . run ( ) ; } else { // If we can find the executor service, we'll add the action t...
Schedule an activity to run off the SCR action thread if the ExecutorService is available
301
19
160,366
synchronized void reset ( double value , int updated ) { ewma = value ; ewmaStddev = value * SINGLE_VALUE_STDDEV ; ewmaVariance = ewmaStddev * ewmaStddev ; consecutiveOutliers = 0 ; lastUpdate = updated ; }
Reset the distribution by throwing away all history and adding a single data point .
70
16
160,367
synchronized void addDataPoint ( double value , int updated ) { // 8/10/2012: Force the standard deviation to 1/3 of the first data point // 8/11:2012: Force it to 1/6th of the first data point (more accurate) if ( ewmaVariance == Double . NEGATIVE_INFINITY ) { reset ( value , updated ) ; return ; } double delta = valu...
Add a throughput observation to the distribution setting lastUpdate
160
10
160,368
static void handleThrowable ( Throwable t ) { if ( t instanceof ThreadDeath ) { throw ( ThreadDeath ) t ; } if ( t instanceof VirtualMachineError ) { throw ( VirtualMachineError ) t ; } // All other instances of Throwable will be silently swallowed }
Checks whether the supplied Throwable is one that needs to be rethrown and swallows all others .
59
22
160,369
protected boolean isEvictionRequired ( ) { boolean evictionRequired = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { int size = primaryTable . size ( ) + secondaryTable . size ( ) + tertiaryTable . size ( ) ; Tr . debug ( tc , "The current cache size is " + size + "( " + primaryTab...
Determine if the cache is &quot ; full&quot ; and entries need to be evicted .
277
24
160,370
private boolean isDelegatedFacesServlet ( String className ) { if ( className == null ) { // The class name can be null if this is e.g., a JSP mapped to // a servlet. return false ; } try { Class < ? > clazz = Class . forName ( className ) ; return DELEGATED_FACES_SERVLET_CLASS . isAssignableFrom ( clazz ) ; } catch ( ...
Checks if the class represented by className implements DelegatedFacesServlet .
113
18
160,371
public static synchronized void unregisterModule ( PmiModule instance ) { if ( disabled ) return ; if ( instance == null ) // || instance.getPath().length<=1) return; return ; // check if the path has null in it. if a module is unregistered twice // the path will have null String [ ] path = instance . getPath ( ) ; if ...
remove module - never remove TYPE_MODULE .
492
10
160,372
protected static ModuleAggregate getModuleAggregate ( String moduleID ) { ModuleAggregate aggregate = ( ModuleAggregate ) moduleAggregates . get ( moduleID ) ; if ( aggregate != null ) return aggregate ; // need to create it - synchronized synchronized ( moduleAggregates ) { aggregate = ( ModuleAggregate ) moduleAggreg...
create it if not there - synchronized
138
7
160,373
public static ModuleItem findModuleItem ( String [ ] path ) { if ( disabled ) return null ; if ( path == null || path [ 0 ] . equals ( APPSERVER_MODULE ) ) { return moduleRoot ; } return moduleRoot . find ( path , 0 ) ; }
find a ModuleItem
61
4
160,374
public static StatLevelSpec [ ] getInstrumentationLevel ( StatDescriptor sd , boolean recursive ) { if ( disabled ) return null ; ModuleItem item = findModuleItem ( sd . getPath ( ) ) ; if ( item == null ) { // wrong moduleName return null ; } else { if ( ! recursive ) { StatLevelSpec [ ] pld = new StatLevelSpec [ 1 ] ...
6 . 0 API
220
4
160,375
public static int getInstrumentationLevel ( String [ ] path ) { if ( disabled ) return LEVEL_UNDEFINED ; DataDescriptor dd = new DataDescriptor ( path ) ; ModuleItem item = findModuleItem ( dd ) ; if ( item == null ) { // wrong moduleName return LEVEL_UNDEFINED ; } else { return item . getInstance ( ) . getInstrumentat...
get instrumenation level based on the path during runtime
93
11
160,376
public static String getInstrumentationLevelString ( ) { if ( disabled ) return null ; Map modules = moduleRoot . children ; if ( modules == null ) { return "" ; } else { PerfLevelDescriptor [ ] plds = new PerfLevelDescriptor [ modules . size ( ) ] ; Iterator values = modules . values ( ) . iterator ( ) ; int i = 0 ; w...
return the top level modules s PerfLevelDescriptor in String
183
14
160,377
public JwtBuilder audience ( List < String > newaudiences ) throws InvalidClaimException { // this.AUDIENCE // if (newaudiences != null && !newaudiences.isEmpty()) { // // ArrayList<String> audiences = new ArrayList<String>(); // for (String aud : newaudiences) { // if (aud != null && !aud.trim().isEmpty() // && !audie...
Sets audience claim . This claim in the JWT identifies the recipients that the token is intended for .
269
21
160,378
public JwtBuilder signWith ( String algorithm , Key key ) throws KeyException { builder = builder . signWith ( algorithm , key ) ; return this ; }
Signing key and algorithm information .
33
7
160,379
public JwtBuilder claim ( String name , Object value ) throws InvalidClaimException { // if (isValidClaim(name, value)) { // if (name.equals(Claims.AUDIENCE)) { // if (value instanceof ArrayList) { // this.audience((ArrayList) value); // } else if (value instanceof String) { // String[] auds = ((String) value).split(" ...
Sets the specified claim .
724
6
160,380
public JwtBuilder claim ( Map < String , Object > map ) throws InvalidClaimException { // if (map == null) { // String err = Tr.formatMessage(tc, "JWT_INVALID_CLAIMS_ERR");// "JWT_INVALID_CLAIMS_ERR"; // throw new InvalidClaimException(err); // } builder = builder . claim ( map ) ; return this ; //return copyClaimsMap(...
Sets the specified claims .
112
6
160,381
public JwtBuilder claimFrom ( String jsonOrJwt , String claim ) throws InvalidClaimException , InvalidTokenException { // if (JwtUtils.isNullEmpty(claim)) { // String err = Tr.formatMessage(tc, "JWT_INVALID_CLAIM_ERR", // new Object[] { claim }); // throw new InvalidClaimException(err); // } // if (isValidToken(jsonOrJ...
Retrieves the specified claim from the given json or jwt string .
418
15
160,382
protected Dispatchable getThreadContext ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getThreadContext" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getThreadContext" ) ; return null ; }
Not needed for receive listener data invocations
89
8
160,383
protected synchronized void invoke ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "invoke" ) ; try { // Pass details to implementor's conversation receive listener. if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JFapUtils . debugT...
Invokes the dataReceived method . If the callback throws an exception than the connection associated with it is invalidated .
397
24
160,384
protected synchronized void reset ( Connection connection , ReceiveListener listener , WsByteBuffer data , int size , int segmentType , int requestNumber , int priority , boolean allocatedFromPool , boolean partOfExchange , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabl...
Resets the state of this invocation object - used by the pooling code .
247
16
160,385
protected synchronized void repool ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "repool" ) ; // begin F181705.5 connection = null ; listener = null ; data = null ; conversation = null ; // end F181705.5 owningPool . add ( this ) ; setDispatchable ( null ) ...
Returns this object to its associated object pool .
130
9
160,386
public static void setCookieForRequestParameter ( HttpServletRequest request , HttpServletResponse response , String id , String state , boolean isHttpsRequest , ConvergedClientConfig clientCfg ) { //OidcClientConfigImpl clientCfg = activatedOidcClientImpl.getOidcClientConfig(request, id); Map < String , String [ ] > m...
set the code cookie during authentication
518
6
160,387
public static MultivaluedMap < String , String > getStructuredParams ( String query , String sep , boolean decode , boolean decodePlus ) { MultivaluedMap < String , String > map = new MetadataMap <> ( new LinkedHashMap < String , List < String > > ( ) ) ; getStructuredParams ( map , query , sep , decode , decodePlus ) ...
Retrieve map of query parameters from the passed in message
88
11
160,388
public static List < MediaType > intersectMimeTypes ( List < MediaType > requiredMediaTypes , List < MediaType > userMediaTypes , boolean addRequiredParamsIfPossible ) { return intersectMimeTypes ( requiredMediaTypes , userMediaTypes , addRequiredParamsIfPossible , false ) ; }
intersect two mime types
66
6
160,389
protected void addNameToApplicationMap ( String name ) { String appName = getApplicationName ( ) ; // If it is a base metric, the name will be null if ( appName == null ) return ; ConcurrentLinkedQueue < String > list = applicationMap . get ( appName ) ; if ( list == null ) { ConcurrentLinkedQueue < String > newList = ...
Adds the metric name to an application map . This map is not a complete list of metrics owned by an application produced metrics are managed in the MetricsExtension
130
32
160,390
@ Override public SortedSet < String > getNames ( ) { return Collections . unmodifiableSortedSet ( new TreeSet < String > ( metrics . keySet ( ) ) ) ; }
Returns a set of the names of all the metrics in the registry .
42
14
160,391
@ Override public SortedMap < String , Counter > getCounters ( MetricFilter filter ) { return getMetrics ( Counter . class , filter ) ; }
Returns a map of all the counters in the registry and their names which match the given filter .
35
19
160,392
@ Override public SortedMap < String , Histogram > getHistograms ( MetricFilter filter ) { return getMetrics ( Histogram . class , filter ) ; }
Returns a map of all the histograms in the registry and their names which match the given filter .
37
20
160,393
@ Override public SortedMap < String , Meter > getMeters ( MetricFilter filter ) { return getMetrics ( Meter . class , filter ) ; }
Returns a map of all the meters in the registry and their names which match the given filter .
35
19
160,394
@ Override public SortedMap < String , Timer > getTimers ( MetricFilter filter ) { return getMetrics ( Timer . class , filter ) ; }
Returns a map of all the timers in the registry and their names which match the given filter .
37
19
160,395
public synchronized int addElement ( E theElement ) { if ( theElement == null ) { return - 1 ; } if ( elementCount == currentCapacity ) { // try to expand the table to handle the new value, if that fails // then it will throw an illegalstate exception expandTable ( ) ; } int theIndex = occupiedSlots . nextClearBit ( 0 ...
Add an element to the LookupTable . Returns the index value which can be used to look up the element in the LookupTable .
142
28
160,396
public synchronized Object removeElement ( int theIndex ) { if ( theIndex < 0 || theIndex > currentCapacity - 1 ) { throw new IllegalArgumentException ( "Index is out of range." ) ; } Object theElement = theElementArray [ theIndex ] ; if ( theElement != null ) { theElementArray [ theIndex ] = null ; elementCount -- ; o...
Remove the object from the LookupTable which is referenced by the supplied Index value .
95
17
160,397
public int findElement ( Object element ) { for ( int i = 0 ; i < currentCapacity ; i ++ ) { if ( element == theElementArray [ i ] ) { return i ; } } return - 1 ; }
Finds a supplied object in the LookupTable and returns its index .
48
15
160,398
@ SuppressWarnings ( "unchecked" ) private void expandTable ( ) { int newCapacity = currentCapacity + increment ; if ( newCapacity < currentCapacity ) { throw new IllegalStateException ( "Attempt to expand LookupTable beyond maximum capacity" ) ; } E [ ] theNewArray = ( E [ ] ) new Object [ newCapacity ] ; System . arr...
Expands the lookup table to accommodate more elements . Does this by adding the expansion increment to the current capacity .
122
22
160,399
public void initialize ( Map < String , Object > configProps ) throws WIMException { reposId = ( String ) configProps . get ( KEY_ID ) ; reposRealm = ( String ) configProps . get ( REALM ) ; if ( String . valueOf ( configProps . get ( ConfigConstants . CONFIG_PROP_SUPPORT_CHANGE_LOG ) ) . equalsIgnoreCase ( ConfigConst...
Function that is invoked when the LdapAdapter is initialized . It extracts the repository configuration details and sets itself up with the required properties .
228
28