idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
36,900
protected void setLayoutToPrimary ( int segmentLength , int priority , boolean isPooled , boolean isExchange , int packetNumber , int segmentType , SendListener sendListener ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLayoutToPrimary" , new Object [ ] { "" + segmentLength , "" + priority , "" + i...
Sets the layout to use for this transmission to be a primary header only .
36,901
protected void setLayoutToConversation ( int segmentLength , int priority , boolean isPooled , boolean isExchange , int packetNumber , int segmentType , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLayou...
Set layout for transmission to build to have a conversation header .
36,902
protected void setLayoutToStartSegment ( int segmentLength , int priority , boolean isPooled , boolean isExchange , int packetNumber , int segmentType , int conversationId , int requestNumber , long totalLength ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLayoutToStartSegment" , new Object [ ] { "...
Set next transmission being built to have a segment start layout
36,903
protected void setLayoutToMiddleSegment ( int segmentLength , int priority , boolean isPooled , boolean isExchange , int packetNumber , int conversationId , int requestNumber ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLayoutToMiddleSegment" , new Object [ ] { "" + segmentLength , "" + priority ,...
Set next transmission being built to have a segment middle layout
36,904
protected void setLayoutToEndSegment ( int segmentLength , int priority , boolean isPooled , boolean isExchange , int packetNumber , int conversationId , int requestNumber , Conversation conversation , SendListener sendListener ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLayoutToSegmentEnd" , new...
Set next transmission being built to have a segment end layout
36,905
protected boolean isPooledBuffers ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isPooledBuffers" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isPooledBuffers" , "" + primaryHeaderFields . isPooled ) ; return primaryHeaderFields . isPooled ; }
Returns true iff this transmission should be received into pooled buffers .
36,906
protected boolean isUserRequest ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isUserRequest" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isUserRequest" , "" + isUserRequest ) ; return isUserRequest ; }
Returns true iff this transmission is a user request .
36,907
protected boolean isTerminal ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isTermainl" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isTermainl" , "" + isTerminal ) ; return isTerminal ; }
Returns true if this transmission should stop this connection from writing any more data to the socket .
36,908
private boolean buildHeader ( HeaderFields headerFields , WsByteBuffer xmitBuffer ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "buildHeader" , new Object [ ] { headerFields , xmitBuffer } ) ; if ( tc . isDebugEnabled ( ) ) JFapUtils . debugTraceWsByteBufferInfo ( this , tc , xmitBuffer , "xmitBuffer" ...
Builds a header from a description of the header fields . The header is incrementally built into the supplied transmission buffer . This may require use of a scratch space in the event that there is insufficient room in the transmission buffer on the first attempt .
36,909
private boolean buildPayload ( WsByteBuffer xmitBuffer ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "buildPayload" , xmitBuffer ) ; if ( tc . isDebugEnabled ( ) ) JFapUtils . debugTraceWsByteBufferInfo ( this , tc , xmitBuffer , "xmitBuffer" ) ; boolean payloadFinished = false ; int amountCopied , amo...
Builds a transmission payload into the supplied buffer . This may be done incrementally by multiple invocations in the case that the supplied buffer is smaller than the payload being built .
36,910
@ Path ( "/verifyInjectedOptionalCustomMissing" ) @ Produces ( MediaType . APPLICATION_JSON ) public JsonObject verifyInjectedOptionalCustomMissing ( ) { boolean pass = false ; String msg ; Optional < Long > customValue = custom . getValue ( ) ; if ( customValue == null ) { msg = "custom-missing value is null, FAIL" ; ...
Verify that values exist and that types match the corresponding Claims enum
36,911
public static void addExtendedProperty ( String propName , String dataType , boolean multiValued , Object defaultValue ) { if ( dataType == null || "null" . equalsIgnoreCase ( dataType ) ) return ; if ( extendedPropertiesDataType . containsKey ( propName ) ) { Tr . warning ( tc , WIMMessageKey . DUPLICATE_PROPERTY_EXTE...
Allows for an extended property or a property not pre - defined as part of this PersonAccount entity type to be added to the PersonAccount entity
36,912
private static String depluralize ( String s ) { if ( s . endsWith ( "ies" ) ) { return s . substring ( 0 , s . length ( ) - 3 ) + 'y' ; } if ( s . endsWith ( "s" ) ) { return s . substring ( 0 , s . length ( ) - 1 ) ; } return s ; }
Convert a string like abcs to abc .
36,913
private static String hyphenatedToCamelCase ( String s ) { Matcher m = Pattern . compile ( "(?:^|-)([a-z])" ) . matcher ( s ) ; StringBuilder b = new StringBuilder ( ) ; int last = 0 ; for ( ; m . find ( ) ; last = m . end ( ) ) { b . append ( s , last , m . start ( ) ) . append ( Character . toUpperCase ( m . group ( ...
Convert a string like abc - def - ghi to AbcDefGhi .
36,914
private static String upperCaseFirstChar ( String s ) { return Character . toUpperCase ( s . charAt ( 0 ) ) + s . substring ( 1 ) ; }
Convert a string like abcDef to AbcDef .
36,915
private static List < TypeMirror > getAnnotationClassValues ( Element member , Annotation annotation , String annotationMemberName ) { for ( AnnotationMirror annotationMirror : member . getAnnotationMirrors ( ) ) { if ( ( ( TypeElement ) annotationMirror . getAnnotationType ( ) . asElement ( ) ) . getQualifiedName ( ) ...
Return a List of TypeMirror for an annotation on a member . This is a workaround for JDK - 6519115 which causes MirroredTypeException to be thrown rather than MirroredTypesException .
36,916
public ViewScopeContextualStorage getContextualStorage ( BeanManager beanManager , String viewScopeId ) { ViewScopeContextualStorage contextualStorage = storageMap . get ( viewScopeId ) ; if ( contextualStorage == null ) { synchronized ( this ) { contextualStorage = storageMap . get ( viewScopeId ) ; if ( contextualSto...
This method will return the ViewScopeContextualStorage or create a new one if no one is yet assigned to the current windowId .
36,917
public AuthConfigProvider setProvider ( ProviderService providerService ) { AuthConfigProvider authConfigProvider = null ; if ( providerService != null ) { authConfigProvider = providerService . getAuthConfigProvider ( this ) ; registerConfigProvider ( authConfigProvider , null , null , null ) ; } else { removeRegistra...
Called when a Liberty user defined feature provider is set or unset
36,918
protected BeanO doActivation ( EJBThreadData threadData , ContainerTx tx , BeanId beanId , boolean takeInvocationRef ) throws RemoteException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "doActivation" , new Object [ ] { tx , beanId , new Boolean ( takeInvocationRef )...
Internal method used by subclasses to activate a bean
36,919
public Entry < BatchPartitionWorkUnit , Future < ? > > startPartition ( PartitionPlanConfig partitionPlanConfig , Step step , PartitionReplyQueue partitionReplyQueue , boolean isRemoteDispatch ) { BatchPartitionWorkUnit workUnit = createPartitionWorkUnit ( partitionPlanConfig , step , partitionReplyQueue , isRemoteDisp...
Create the BatchPartitionWorkUnit and start the sub - job partition thread .
36,920
protected void setConversation ( Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setConversation" , conversation ) ; con = conversation ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this ,...
Sets the Conversation object
36,921
protected CommsByteBuffer jfapExchange ( CommsByteBuffer buffer , int sendSegmentType , int priority , boolean canPoolOnReceive ) throws SIConnectionDroppedException , SIConnectionLostException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "jfapExchange" , new Object ...
Wraps the JFAP Channel exchange method to allow tracing retrieval of Unique request numbers and setting of message priority .
36,922
protected void jfapSend ( CommsByteBuffer buffer , int sendSegType , int priority , boolean canPoolOnReceive , ThrottlingPolicy throttlingPolicy ) throws SIConnectionDroppedException , SIConnectionLostException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "jfa...
Wraps the JFAP Channel send method to allow tracing retrieval of Unique request numbers and setting of message priority .
36,923
private short getClientCapabilities ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getClientCapabilities" ) ; short capabilities = CommsConstants . CAPABILITIES_DEFAULT ; boolean nonJavaBootstrap = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . C...
Works out the capabilities that will be sent to the peer as part of the initial handshake . This also takes into account any overrides from the SIB properties file .
36,924
public void defaultChecker ( CommsByteBuffer buffer , short exceptionCode ) throws SIErrorException { if ( exceptionCode != CommsConstants . SI_NO_EXCEPTION ) { throw new SIErrorException ( buffer . getException ( con ) ) ; } }
The default checker . Should always be called last after all the checkers .
36,925
protected void invalidateConnection ( boolean notifyPeer , Throwable throwable , String debugReason ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "invalidateConnection" , new Object [ ] { new Boolean ( notifyPeer ) , throwable , debugReason } ) ; if ( con != null ) ...
Utility method to invalidate Connection . Parameters passed to ConnectionInterface . invalidate
36,926
SibRaListener createListener ( final SIDestinationAddress destination , MessageEndpointFactory messageEndpointFactory ) throws ResourceException { final String methodName = "createListener" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new ...
Creates a new listener to the given destination .
36,927
SibRaDispatcher createDispatcher ( final AbstractConsumerSession session , final Reliability unrecoveredReliability , final int maxFailedDeliveries , final int sequentialFailureThreshold ) throws ResourceException { final String methodName = "createDispatcher" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . ...
Gets a dispatcher for the given session and messages .
36,928
void closeDispatcher ( final SibRaDispatcher dispatcher ) { final String methodName = "closeDispatcher" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } dispatcher . close ( ) ; _dispatcherCount . decrementAndGet ( ) ; if ( TraceComponent ...
Closes the given dispatcher .
36,929
void close ( ) { final String methodName = "close" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } close ( false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , methodName ...
Closes the connection and any associated listeners and dispatchers
36,930
void close ( boolean alreadyClosed ) { final String methodName = "close" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , alreadyClosed ) ; } _closed = true ; if ( ! alreadyClosed ) { for ( final Iterator iterator = _listeners . values ( ) . i...
Closes this connection and any associated listeners and dispatchers .
36,931
SICoreConnection createConnection ( SICoreConnectionFactory factory , String name , String password , Map properties , String busName ) throws SIException , SIErrorException , Exception { final String methodName = "createConnection" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr...
Creates this connection using either the Auth Alias supplied or if the property is set the WAS server subject .
36,932
private String getUnavailableServices ( ) { StringBuilder missingServices = new StringBuilder ( ) ; if ( tokenService . getReference ( ) == null ) { missingServices . append ( "tokenService, " ) ; } if ( tokenManager . getReference ( ) == null ) { missingServices . append ( "tokenManager, " ) ; } if ( authenticationSer...
Construct a String that lists all of the missing services . This is very useful for debugging .
36,933
private void updateSecurityReadyState ( ) { if ( ! activated ) { return ; } String unavailableServices = getUnavailableServices ( ) ; if ( unavailableServices == null ) { Tr . info ( tc , "SECURITY_SERVICE_READY" ) ; securityReady = true ; Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; p...
Security is ready when all of these required services have been registered .
36,934
private void parseDirectoryFiles ( WsResource directory , ServerConfiguration configuration ) throws ConfigParserException , ConfigValidationException { if ( directory != null ) { File [ ] defaultFiles = getChildXMLFiles ( directory ) ; if ( defaultFiles == null ) return ; Arrays . sort ( defaultFiles , new AlphaCompar...
Parse all of the config files in a directory in platform insensitive alphabetical order
36,935
public ServletContext findContext ( String path ) { WebGroup g = ( WebGroup ) requestMapper . map ( path ) ; if ( g != null ) return g . getContext ( ) ; else return null ; }
Method findContext .
36,936
private void addWlpInformation ( Asset asset ) { WlpInformation wlpInfo = asset . getWlpInformation ( ) ; if ( wlpInfo == null ) { wlpInfo = new WlpInformation ( ) ; asset . setWlpInformation ( wlpInfo ) ; } if ( wlpInfo . getAppliesToFilterInfo ( ) == null ) { wlpInfo . setAppliesToFilterInfo ( new ArrayList < Applies...
For historic reasons when an asset is read back from the repository the wlpInformation and ATFI should always be present . This method does that .
36,937
public Discriminator getDiscriminator ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getDiscriminator" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getDiscriminator" , discriminator ) ; return discriminator ; }
Returns the discriminator for this channel .
36,938
private Object getResult ( ) throws InterruptedException , ExecutionException { if ( ivCancelled ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getResult: throwing CancellationException" ) ; } throw new CancellationException ( ) ; } if ( ivException != null ) { if ( T...
This get method returns the result of the async method call . This method must not be called unless ivGate indicates that results are available .
36,939
private Object getResult ( long timeout , TimeUnit unit ) throws InterruptedException , ExecutionException , TimeoutException { if ( ivCancelled ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getResult: throwing CancellationException" ) ; } throw new CancellationExcep...
This get method returns the result of the asynch method call . This method must not be called unless ivGate indicates that results are available .
36,940
public boolean isCancelled ( ) { boolean cancelled = ivCancelled ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "isCancelled: " + cancelled + " Future object: " + this ) ; } return ( cancelled ) ; }
This method allows clients to check the Future object to see if the asynch method was canceled before it got a chance to execute .
36,941
void setResult ( Future < ? > theFuture ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setResult: " + Util . identity ( theFuture ) + " Future object: " + this ) ; } ivFuture = theFuture ; done ( ) ; }
did not throw an exception .
36,942
void setException ( Throwable theException ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setException - Future object: " + this , theException ) ; } ivException = theException ; done ( ) ; }
The async method ended with an exception
36,943
public Object saveState ( FacesContext context ) { if ( ! initialStateMarked ( ) ) { Object values [ ] = new Object [ 2 ] ; values [ 0 ] = _maximum ; values [ 1 ] = _minimum ; return values ; } return null ; }
RESTORE & SAVE STATE
36,944
public void logout ( Subject subject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "logout" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , CLASS_NAME + "logout" ) ; } }
Logout method is used only for auditing purpose
36,945
public void setMessagingAuthenticationService ( MessagingAuthenticationService messagingAuthenticationService ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "setMessagingAuthenticationService" , messagingAuthenticationService ) ; } this . messagingAuth...
Set the MessagingAuthenticationService
36,946
public void deactivate ( ComponentContext cc ) throws IOException { ConfigProviderResolver . setInstance ( null ) ; shutdown ( ) ; scheduledExecutorServiceRef . deactivate ( cc ) ; }
Deactivate a context and set the instance to null
36,947
public void shutdown ( ) { synchronized ( configCache ) { Set < ClassLoader > allClassLoaders = new HashSet < > ( ) ; allClassLoaders . addAll ( configCache . keySet ( ) ) ; for ( ClassLoader classLoader : allClassLoaders ) { close ( classLoader ) ; } configCache . clear ( ) ; appClassLoaderMap . clear ( ) ; } }
Close down all the configs
36,948
private void close ( ClassLoader classLoader ) { synchronized ( configCache ) { ConfigWrapper config = configCache . remove ( classLoader ) ; if ( config != null ) { Set < String > applicationNames = config . getApplications ( ) ; for ( String app : applicationNames ) { appClassLoaderMap . remove ( app ) ; } config . c...
Completely close a config for a given classloader
36,949
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
36,950
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 .
36,951
synchronized public void close ( ) throws SIConnectionLostException , SIIncorrectCallException , SIResourceException , SIErrorException , SIConnectionDroppedException , SIConnectionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "clos...
Closes this connection its associated core connection and any sessions created from it .
36,952
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 .
36,953
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 .
36,954
private PostCreateAction listenForLibraryChanges ( final String libid ) { return new PostCreateAction ( ) { public void invoke ( AppClassLoader acl ) { listenForLibraryChanges ( libid , acl ) ; } } ; }
create an action that will create a listener when invoked
36,955
private void listenForLibraryChanges ( String libid , AppClassLoader acl ) { new WeakLibraryListener ( libid , acl . getKey ( ) . getId ( ) , acl , bundleContext ) { protected void update ( ) { Object cl = get ( ) ; if ( cl instanceof AppClassLoader && aclStore != null ) aclStore . remove ( ( AppClassLoader ) cl ) ; de...
create a listener to remove a loader from the canonical store on library update
36,956
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 .
36,957
public PmiDataInfo [ ] submoduleMembers ( String submoduleName , int level ) { if ( submoduleName == null ) return listLevelData ( level ) ; ArrayList returnData = new ArrayList ( ) ; boolean inCategory = false ; if ( submoduleName . startsWith ( "ejb." ) ) inCategory = true ; Iterator allData = perfData . values ( ) ....
Returns an array of PmiDataInfo for the given submoduleName and level .
36,958
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
36,959
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
36,960
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
36,961
private void scheduleEvictionTask ( long timeoutInMilliSeconds ) { EvictionTask evictionTask = new EvictionTask ( ) ; SwapTCCLAction swapTCCL = new SwapTCCLAction ( ) ; AccessController . doPrivileged ( swapTCCL ) ; try { timer = new Timer ( true ) ; long period = timeoutInMilliSeconds / 3 ; long delay = period ; timer...
Creates a timer and schedules the eviction task based on the timeout in milliseconds
36,962
public synchronized Object update ( String key , Object value ) { while ( isEvictionRequired ( ) && entryLimit > 0 && entryLimit < Integer . MAX_VALUE ) { evictStaleEntries ( ) ; } CacheEntry oldEntry = null ; CacheEntry curEntry = new CacheEntry ( value ) ; if ( primaryTable . containsKey ( key ) ) { oldEntry = ( Cach...
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
36,963
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 .
36,964
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
36,965
public void setWrapperCacheSize ( int cacheSize ) { wrapperCache . setCachePreferredMaxSize ( cacheSize ) ; int updatedCacheSize = getBeanIdCacheSize ( cacheSize ) ; beanIdCache . setSize ( updatedCacheSize ) ; }
Call to update the BeanIdCache cache size .
36,966
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 .
36,967
public boolean unregister ( BeanId beanId , boolean dropRef ) throws CSIException { boolean removed = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "unregister" , new Object [ ] { beanId , new Boolean ( dropRef ) } ) ; ByteArray wrapperKey = beanId . getByteArray (...
d181569 - changed signature of method .
36,968
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 ; Enumeration < ? > enumerate = wrapperCache . enumer...
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 .
36,969
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 . disconnect ( ) ; if ...
Unregister a wrapper instance when it is castout of the wrapper cache .
36,970
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 ; BeanId beanId = wrapperKey . getBeanId ( ) ; tr...
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 .
36,971
public boolean isValid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Checking validity of token " + this . getClass ( ) . getName ( ) ) ; if ( token != null ) { long currentTime = System . currentTimeMillis ( ) ; long expiration = getExpiration ( ) ; long timeleft =...
Validates the token including expiration signature etc .
36,972
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 .
36,973
public String getUniqueID ( ) { String [ ] cacheKeyArray = getAttributes ( AttributeNameConstants . WSCREDENTIAL_CACHE_KEY ) ; if ( cacheKeyArray != null && cacheKeyArray [ 0 ] != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Found cache key in Authz token: " + c...
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 .
36,974
public String [ ] getAttributes ( String key ) { if ( token != null ) return token . getAttributes ( key ) ; else return null ; }
Gets the attribute value based on the named value .
36,975
public long getMaximumTimeInStore ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMaximumTimeInStore" ) ; long maxTime = getMessageItem ( ) . getMaximumTimeInStore ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc...
Return the maximum time this reference should spend in a ReferenceStream .
36,976
private void resetEvents ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetEvents" ) ; 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_REMOVE_2 = null ; POST_COMMI...
Reset all callbacks to null .
36,977
public SIBUuid12 getProducerConnectionUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getProducerConnectionUuid" ) ; SibTr . exit ( tc , "getProducerConnectionUuid" ) ; } return getMessageItem ( ) . getProducerConnectionUuid ( ) ; }
Returns the producerConnectionUuid .
36,978
private MessageItem getMessageItem ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMessageItem" ) ; MessageItem msg = null ; try { msg = ( MessageItem ) getReferredItem ( ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , "com.ibm.ws.s...
Returns the referenced message item
36,979
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 .
36,980
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
36,981
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 .
36,982
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 .
36,983
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
36,984
@ 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 .
36,985
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 .
36,986
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
36,987
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
36,988
public static < S > S prepareInstance ( Class < ? extends S > serviceClass ) { try { final Constructor < ? extends S > constructor = serviceClass . getDeclaredConstructor ( ) ; AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { public Void run ( ) { constructor . setAccessible ( true ) ; return null ...
Creates an object of the service class
36,989
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
36,990
public static ClassLoader getAndSetLoader ( ClassLoader newCL ) { ThreadContextAccessor tca = ThreadContextAccessor . getThreadContextAccessor ( ) ; Object maybeOldCL = tca . pushContextClassLoaderForUnprivileged ( newCL ) ; if ( maybeOldCL instanceof ClassLoader ) { return ( ClassLoader ) maybeOldCL ; } else { return ...
This method sets the thread context classloader and returns whatever was the TCCL before it was updated .
36,991
public static boolean isWeldProxy ( Object obj ) { Class < ? > clazz = obj . getClass ( ) ; boolean result = isWeldProxy ( clazz ) ; return result ; }
Return whether the object is a weld proxy
36,992
public < T > void aroundInject ( final InjectionContext < T > injectionContext ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Annotations: " + injectionContext . getAnnotatedType ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { T...
Perform Injection . For EE
36,993
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 . isDebugEnabled ( ) ) Sib...
This method will return a set of messages currently locked by the messaging engine .
36,994
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 . isAnyTracingEnabled ...
This method will return and delete a set of messages currently locked by the messaging engine .
36,995
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
36,996
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 .
36,997
boolean isOffendingClass ( Class < ? > [ ] classes , int j , ProtectionDomain pd2 , Permission inPerm ) { return ( ! classes [ j ] . getName ( ) . startsWith ( "java" ) ) && ( classes [ j ] . getName ( ) . indexOf ( "com.ibm.ws.kernel.launch.internal.NoRethrowSecurityManager" ) == - 1 ) && ( classes [ j ] . getName ( )...
isOffendingClass determines the offending class from the classes defined in the stack .
36,998
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 .
36,999
public String getContextName ( ) { ExternalContext ctx = _MyFacesExternalContextHelper . firstInstance . get ( ) ; if ( ctx == null ) { throw new UnsupportedOperationException ( ) ; } return ctx . getContextName ( ) ; }
Returns the name of the underlying context