idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
37,900 | public boolean isMonitorable ( Class < ? > clazz ) { if ( notMonitorable . contains ( clazz ) ) { return false ; } else if ( monitorable . contains ( clazz ) ) { return true ; } boolean isMonitorable = true ; if ( ! instrumentation . isModifiableClass ( clazz ) ) { isMonitorable = false ; } else if ( clazz . isInterface ( ) ) { isMonitorable = false ; } else if ( clazz . isArray ( ) ) { isMonitorable = false ; } else if ( Proxy . isProxyClass ( clazz ) ) { isMonitorable = false ; } else if ( clazz . isPrimitive ( ) ) { isMonitorable = false ; } else if ( isExcludedClass ( Type . getInternalName ( clazz ) ) ) { isMonitorable = false ; } else if ( ! includeBootstrap && clazz . getClassLoader ( ) == null ) { isMonitorable = false ; } if ( ! isMonitorable ) { synchronized ( notMonitorable ) { notMonitorable . add ( clazz ) ; } } else { monitorable . add ( clazz ) ; } return isMonitorable ; } | Determine of the specified class can be monitored via the probes infrastructure . |
37,901 | boolean checkPrefix ( char [ ] chars , int [ ] cursor ) { if ( chars . length > cursor [ 0 ] && chars [ cursor [ 0 ] ] == MatchSpace . NONWILD_MARKER ) return false ; if ( prefix == null ) return true ; if ( cursor [ 1 ] - cursor [ 0 ] < prefix . minlen ) return false ; for ( int i = 0 ; i < prefix . items . length ; i ++ ) { Object item = prefix . items [ i ] ; if ( item == Pattern . matchOne ) if ( ! topicSkipForward ( chars , cursor ) ) return false ; else ; else if ( ! matchForward ( chars , ( char [ ] ) item , cursor ) ) return false ; } return cursor [ 0 ] == cursor [ 1 ] || chars [ cursor [ 0 ] ] == MatchSpace . SUBTOPIC_SEPARATOR_CHAR ; } | Override checkPrefix to implement topic semantics |
37,902 | static boolean topicSkipForward ( char [ ] chars , int [ ] cursor ) { if ( cursor [ 0 ] == cursor [ 1 ] ) return false ; while ( cursor [ 0 ] < cursor [ 1 ] && chars [ cursor [ 0 ] ] != MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) cursor [ 0 ] ++ ; return true ; } | Skip forward to the next separator character |
37,903 | boolean checkSuffix ( char [ ] chars , int [ ] cursor ) { if ( suffix == null ) return true ; if ( cursor [ 1 ] - cursor [ 0 ] < suffix . minlen ) return false ; int last = suffix . items . length - 1 ; for ( int i = last ; i >= 0 ; i -- ) { Object item = suffix . items [ i ] ; if ( item == Pattern . matchOne ) if ( ! topicSkipBackward ( chars , cursor ) ) return false ; else ; else if ( ! matchBackward ( chars , ( char [ ] ) item , cursor ) ) return false ; } return cursor [ 0 ] < cursor [ 1 ] && chars [ cursor [ 1 ] - 1 ] == MatchSpace . SUBTOPIC_SEPARATOR_CHAR ; } | Override checkSuffix to implement topic semantics |
37,904 | static boolean topicSkipBackward ( char [ ] chars , int [ ] cursor ) { if ( cursor [ 0 ] == cursor [ 1 ] ) return false ; while ( cursor [ 0 ] < cursor [ 1 ] && chars [ cursor [ 1 ] - 1 ] != MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) cursor [ 1 ] -- ; return true ; } | Skip backward to the next separator character |
37,905 | static boolean matchBackward ( char [ ] chars , char [ ] pattern , int [ ] cursor ) { int start = cursor [ 1 ] - pattern . length ; if ( start < cursor [ 0 ] ) return false ; if ( ! matchForward ( chars , pattern , new int [ ] { start , cursor [ 1 ] } ) ) return false ; cursor [ 1 ] = start ; return true ; } | Match characters in a backward direction |
37,906 | public static Object parsePattern ( String pattern ) { char [ ] accum = new char [ pattern . length ( ) ] ; int finger = 0 ; List tokens = new ArrayList ( ) ; boolean trivial = true ; for ( int i = 0 ; i < pattern . length ( ) ; i ++ ) { char c = pattern . charAt ( i ) ; if ( c == '*' ) { finger = flush ( accum , finger , tokens ) ; tokens . add ( matchOne ) ; trivial = false ; } else if ( c == MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) { if ( i == pattern . length ( ) - 1 ) { accum [ finger ++ ] = c ; } else { if ( pattern . charAt ( i + 1 ) == MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) { finger = flush ( accum , finger , tokens ) ; tokens . add ( matchMany ) ; trivial = false ; i ++ ; if ( pattern . charAt ( i + 1 ) == '.' ) { i ++ ; if ( ( i + 1 ) < pattern . length ( ) && pattern . charAt ( i + 1 ) == MatchSpace . SUBTOPIC_SEPARATOR_CHAR ) { i ++ ; } } } else if ( pattern . charAt ( i + 1 ) == '.' ) { i ++ ; } else { accum [ finger ++ ] = c ; } } } else accum [ finger ++ ] = c ; } if ( trivial ) return new String ( accum , 0 , finger ) ; flush ( accum , finger , tokens ) ; return new TopicPattern ( tokens . iterator ( ) ) ; } | Parse a string topic pattern into a TopicPattern object |
37,907 | public static StringArrayWrapper create ( String [ ] data , String bigDestName ) throws JMSException { int size = 0 ; if ( data != null ) size = data . length ; List fakedFullMsgPath = new ArrayList ( size + 1 ) ; if ( size > 0 ) { for ( int i = 0 ; i < size ; i ++ ) { String destName = data [ i ] ; String busName = null ; SIDestinationAddress sida ; if ( destName . indexOf ( BUS_SEPARATOR ) != - 1 ) { busName = destName . substring ( destName . indexOf ( BUS_SEPARATOR ) + 1 ) ; destName = destName . substring ( 0 , destName . indexOf ( BUS_SEPARATOR ) ) ; } try { sida = JmsServiceFacade . getSIDestinationAddressFactory ( ) . createSIDestinationAddress ( destName , busName ) ; fakedFullMsgPath . add ( sida ) ; } catch ( Exception e ) { JMSException jmse = new JMSException ( e . getMessage ( ) ) ; jmse . setLinkedException ( e ) ; jmse . initCause ( e ) ; } } if ( bigDestName != null ) { try { SIDestinationAddress sida = ( ( SIDestinationAddressFactory ) JmsServiceFacade . getSIDestinationAddressFactory ( ) ) . createSIDestinationAddress ( bigDestName , null ) ; fakedFullMsgPath . add ( sida ) ; } catch ( Exception e ) { JMSException jmse = new JMSException ( e . getMessage ( ) ) ; jmse . setLinkedException ( e ) ; jmse . initCause ( e ) ; } } } StringArrayWrapper newSAW = new StringArrayWrapper ( fakedFullMsgPath ) ; return newSAW ; } | This method is used for unit test purposes to simulate the creation of a StringArrayWrapper whose destinations are all on the local bus . |
37,908 | public String [ ] getArray ( ) { String [ ] newArray = null ; newArray = new String [ fullMsgPath . size ( ) - 1 ] ; for ( int i = 0 ; i < newArray . length ; i ++ ) { newArray [ i ] = ( ( SIDestinationAddress ) fullMsgPath . get ( i ) ) . getDestinationName ( ) ; } return newArray ; } | Returns a list of the destination names not including the big destination name . |
37,909 | public void createDestinationLocalization ( DestinationDefinition destinationDefinition , LocalizationDefinition destinationLocalizationDefinition , Set destinationLocalizingMEs , boolean isTemporary ) throws SIResourceException , SIMPDestinationAlreadyExistsException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createDestinationLocalization" , new Object [ ] { destinationDefinition , destinationLocalizationDefinition , destinationLocalizingMEs , new Boolean ( isTemporary ) } ) ; destinationManager . createDestinationLocalization ( destinationDefinition , destinationLocalizationDefinition , destinationLocalizingMEs , false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createDestinationLocalization" ) ; } | Method only called by unit tests to create destinations |
37,910 | public void introspect ( PrintWriter writer ) { RuntimeMXBean runtime = ManagementFactory . getRuntimeMXBean ( ) ; introspectUptime ( runtime , writer ) ; introspectVendorVersion ( runtime , writer ) ; introspectInputArguments ( runtime , writer ) ; Map < String , String > props = introspectSystemProperties ( runtime , writer ) ; introspectDirsFromSystemProperties ( runtime , writer , "java.ext.dirs" , props ) ; introspectDirsFromSystemProperties ( runtime , writer , "java.endorsed.dirs" , props ) ; } | Grab a snapshot of the current system properties . |
37,911 | public ArrayList getProperties ( ) { ArrayList properties = new ArrayList ( ) ; if ( configEntry . properties != null ) { Iterator it = configEntry . properties . values ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Property property = new Property ( ( com . ibm . ws . cache . config . Property ) it . next ( ) ) ; properties . add ( property ) ; } } return properties ; } | This method returns a list of properties defined on a cache - entry |
37,912 | public CacheId [ ] getCacheIds ( ) { CacheId [ ] cacheIds = new CacheId [ configEntry . cacheIds . length ] ; for ( int i = 0 ; i < configEntry . cacheIds . length ; i ++ ) { cacheIds [ i ] = new CacheId ( configEntry . cacheIds [ i ] ) ; } return cacheIds ; } | This method returns an array of CacheId objects that contain cache ID generation rules used to produce a valid cache ID . |
37,913 | public DependencyId [ ] getDependencyIds ( ) { DependencyId [ ] depIds = new DependencyId [ configEntry . dependencyIds . length ] ; for ( int i = 0 ; i < configEntry . dependencyIds . length ; i ++ ) { depIds [ i ] = new DependencyId ( configEntry . dependencyIds [ i ] ) ; } return depIds ; } | This method returns an array of DependencyId objects that specified addditional cache indentifers that associated multiple cache entries to the same group identiifier . |
37,914 | public Invalidation [ ] getInvalidations ( ) { Invalidation [ ] invalidations = new Invalidation [ configEntry . invalidations . length ] ; for ( int i = 0 ; i < configEntry . invalidations . length ; i ++ ) { invalidations [ i ] = new Invalidation ( configEntry . invalidations [ i ] ) ; } return invalidations ; } | This method returns an array of Invalidation objects that written custom Java code or through rules that are defined in the cache policy of each entry . |
37,915 | private void closeSocketChannel ( SocketChannel sc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { try { Tr . event ( this , tc , "Closing connection, local: " + sc . socket ( ) . getLocalSocketAddress ( ) + " remote: " + sc . socket ( ) . getRemoteSocketAddress ( ) ) ; } catch ( Throwable t ) { } } try { sc . close ( ) ; } catch ( IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "IOException caught while closing connection " + ioe ) ; } } } | Handle closing the socket channel with appropriate debug and error protection . |
37,916 | public static Class < ? > [ ] toTypeArray ( String [ ] s ) throws ClassNotFoundException { if ( s == null ) return null ; Class < ? > [ ] c = new Class [ s . length ] ; for ( int i = 0 ; i < s . length ; i ++ ) { c [ i ] = forName ( s [ i ] ) ; } return c ; } | Converts an array of Class names to Class types . |
37,917 | public static String [ ] toTypeNameArray ( Class < ? > [ ] c ) { if ( c == null ) return null ; String [ ] s = new String [ c . length ] ; for ( int i = 0 ; i < c . length ; i ++ ) { s [ i ] = c [ i ] . getName ( ) ; } return s ; } | Converts an array of Class types to Class names . |
37,918 | public boolean add ( Object o ) { synchronized ( pool ) { if ( index < pool . length ) { pool [ index ++ ] = o ; return true ; } } return false ; } | Returns true if the object was added back to the pool |
37,919 | protected synchronized Dispatchable getThreadContext ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getThreadContext" ) ; int currentPos = data . position ( ) ; int currentLimit = data . limit ( ) ; Dispatchable dis = null ; try { dis = listener . getThreadContext ( conversation , data , segmentType ) ; } catch ( Throwable t ) { FFDCFilter . processException ( t , "com.ibm.ws.sib.jfapchannel.impl.rldispatcher.ConversationReceiveListenerDataReceivedInvocation.getThreadContext" , JFapChannelConstants . CRLDATARECEIVEDINVOKE_GETTHREADCONTEXT_01 , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . debug ( this , tc , "exception thrown by getThreadContext" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) SibTr . exception ( this , tc , t ) ; connection . invalidate ( true , t , "exception thrown from getThreadContext - " + t . getMessage ( ) ) ; throw new SIErrorException ( TraceNLS . getFormattedMessage ( JFapChannelConstants . MSG_BUNDLE , "CRLDRI_INTERNAL_SICJ0065" , null , "CRLDRI_INTERNAL_SICJ0065" ) ) ; } data . position ( currentPos ) ; data . limit ( currentLimit ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getThreadContext" , dis ) ; return dis ; } | This method will ask the receive listener for the thread context . |
37,920 | public void setLogDataDirectory ( String logDataDirectory ) { LogState state = ivLog . setDataDirectory ( logDataDirectory ) ; if ( state != null ) { updateLogConfiguration ( state ) ; state . copyTo ( ivLog ) ; } } | Setters for Log Data |
37,921 | private void updateTraceConfiguration ( TraceState state ) { if ( DIRECTORY_TYPE . equals ( state . ivStorageType ) ) { LogRepositoryComponent . setTraceDirectoryDestination ( state . ivDataDirectory , state . ivPurgeBySizeEnabled , state . ivPurgeByTimeEnabled , state . ivFileSwitchEnabled , state . ivBufferingEnabled , state . ivPurgeMaxSize * ONE_MEG , state . ivPurgeMinTime * MILLIS_IN_HOURS , state . ivFileSwitchTime , state . ivOutOfSpaceAction ) ; } else if ( MEMORYBUFFER_TYPE . equals ( state . ivStorageType ) ) { LogRepositoryComponent . setTraceMemoryDestination ( state . ivDataDirectory , state . ivMemoryBufferSize * ONE_MEG ) ; } else { throw new IllegalArgumentException ( "Unknown value for trace storage type: " + state . ivStorageType ) ; } } | update all info for Trace Repository |
37,922 | public void setTraceMemory ( String dataDirectory , long memoryBufferSize ) { TraceState state = ( TraceState ) ivTrace . clone ( ) ; state . ivStorageType = MEMORYBUFFER_TYPE ; state . ivDataDirectory = dataDirectory ; state . ivMemoryBufferSize = memoryBufferSize ; updateTraceConfiguration ( state ) ; state . copyTo ( ivTrace ) ; } | Modify the trace to use a memory buffer |
37,923 | private static HttpServletRequest getWrappedServletRequestObject ( HttpServletRequest sr ) { if ( sr instanceof HttpServletRequestWrapper ) { HttpServletRequestWrapper w = ( HttpServletRequestWrapper ) sr ; sr = ( HttpServletRequest ) w . getRequest ( ) ; while ( sr instanceof HttpServletRequestWrapper ) sr = ( HttpServletRequest ) ( ( HttpServletRequestWrapper ) sr ) . getRequest ( ) ; } return sr ; } | Drill down through any possible HttpServletRequestWrapper objects . |
37,924 | public static FileSharedServerLeaseLog getFileSharedServerLeaseLog ( String logDirStem , String localRecoveryIdentity , String recoveryGroup ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "FileSharedServerLeaseLog" , new Object [ ] { logDirStem , localRecoveryIdentity , recoveryGroup } ) ; if ( _serverInstallLeaseLogDir == null ) setLeaseLog ( logDirStem , localRecoveryIdentity , recoveryGroup ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "FileSharedServerLeaseLog" , _fileLeaseLog ) ; return _fileLeaseLog ; } | Access the singleton instance of the FileSystem Lease log . |
37,925 | public static int parseRMICCompatible ( String options ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "parseRMICCompatible: " + options ) ; int flags ; if ( options == null ) { flags = RMIC_COMPATIBLE_DEFAULT ; } else if ( options . equals ( "none" ) ) { flags = 0 ; } else if ( options . isEmpty ( ) || options . equals ( "all" ) ) { flags = - 1 ; } else { flags = 0 ; for ( String option : options . split ( "," ) ) { if ( option . equals ( "values" ) ) { flags |= RMIC_COMPATIBLE_VALUES ; } else if ( option . equals ( "exceptions" ) ) { flags |= RMIC_COMPATIBLE_EXCEPTIONS ; } else { throw new IllegalArgumentException ( "unknown RMIC compatibility option: " + option ) ; } } } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "parseRMICCompatible: " + Integer . toHexString ( flags ) ) ; return flags ; } | Parse an rmic compatibility options string . |
37,926 | public static void registerJIT_StubClassPlugin ( ClassLoader classloader ) { boolean isRegistered = JIT_StubPluginImpl . register ( classloader ) ; if ( ! isRegistered ) { throw new IllegalArgumentException ( "Specified ClassLoader does not support JIT_StubClassPlugin : " + classloader ) ; } } | F1339 - 8988 |
37,927 | synchronized void setStageTopics ( String stageName , String [ ] topics ) { for ( String t : topics ) { if ( t . equals ( "*" ) ) { wildcardStageTopics . put ( "" , stageName ) ; } else if ( t . endsWith ( "/*" ) ) { wildcardStageTopics . put ( t . substring ( 0 , t . length ( ) - 1 ) , stageName ) ; } else { discreteStageTopics . put ( t , stageName ) ; } } clearTopicDataCache ( ) ; } | Set the list of topics to be associated with the specified work stage . |
37,928 | TopicData getTopicData ( Topic topic , String topicName ) { TopicData topicData = null ; if ( topic != null ) { topicData = topic . getTopicData ( ) ; } if ( topicData == null ) { topicData = topicDataCache . get ( topicName ) ; if ( topic != null && topicData != null ) { topic . setTopicDataReference ( topicData . getReference ( ) ) ; } } if ( topicData == null ) { synchronized ( this ) { topicData = buildTopicData ( topicName ) ; if ( topic != null ) { topic . setTopicDataReference ( topicData . getReference ( ) ) ; } } } return topicData ; } | Get the cached information about the specified topic . The cached data will allow us to avoid the expense of finding various and sundry data associated with a specific topic and topic hierarchies . |
37,929 | public boolean accessDenied ( InetAddress remoteAddr ) { String hostname = null ; if ( includeAccess . getActive ( ) || includeAccessNames . getActive ( ) ) { boolean closeSocket = true ; if ( includeAccess . getActive ( ) ) { if ( remoteAddr instanceof Inet6Address ) { if ( includeAccess . findInList6 ( remoteAddr . getAddress ( ) ) ) { closeSocket = false ; } } else { if ( includeAccess . findInList ( remoteAddr . getAddress ( ) ) ) { closeSocket = false ; } } } if ( closeSocket && includeAccessNames . getActive ( ) ) { hostname = remoteAddr . getHostName ( ) ; if ( caseInsensitiveHostnames && ( hostname != null ) ) { hostname = hostname . toLowerCase ( ) ; } if ( includeAccessNames . findInList ( hostname ) ) { closeSocket = false ; } } if ( closeSocket ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Address and host name not in include list, address: " + remoteAddr . getHostAddress ( ) + " host name: " + remoteAddr . getHostName ( ) ) ; return true ; } } if ( excludeAccess . getActive ( ) || excludeAccessNames . getActive ( ) ) { boolean closeSocket = false ; if ( excludeAccess . getActive ( ) ) { if ( remoteAddr instanceof Inet6Address ) { if ( excludeAccess . findInList6 ( remoteAddr . getAddress ( ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Address (IPv6) in exclude list, address: " + remoteAddr . getHostAddress ( ) ) ; return true ; } } else { if ( excludeAccess . findInList ( remoteAddr . getAddress ( ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Address in exclude list, address: " + remoteAddr . getHostAddress ( ) ) ; return true ; } } } if ( closeSocket == false && excludeAccessNames . getActive ( ) ) { hostname = remoteAddr . getHostName ( ) ; if ( caseInsensitiveHostnames && ( hostname != null ) ) { hostname = hostname . toLowerCase ( ) ; } if ( excludeAccessNames . findInList ( hostname ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Host name in exclude list, host name: " + remoteAddr . getHostName ( ) ) ; return true ; } } } return false ; } | Query whether a given client address is denied by this configuration . |
37,930 | final protected void eventPrecommitAdd ( MessageItem msg , final TransactionCommon transaction ) throws SIDiscriminatorSyntaxException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "eventPrecommitAdd" , new Object [ ] { msg , transaction } ) ; if ( ! ( _destination . isToBeDeleted ( ) ) ) { if ( msg . isTransacted ( ) && ( ! ( msg . isToBeStoredAtSendTime ( ) ) ) ) { LockManager reallocationLock = _destination . getReallocationLockManager ( ) ; reallocationLock . lock ( ) ; try { SIBUuid8 fixedME = null ; JsDestinationAddress routingAddr = msg . getMessage ( ) . getRoutingDestination ( ) ; if ( routingAddr != null ) fixedME = routingAddr . getME ( ) ; SIBUuid8 preferredME = null ; if ( msg . preferLocal ( ) ) { if ( _destination . hasLocal ( ) ) preferredME = _messageProcessor . getMessagingEngineUuid ( ) ; } OutputHandler handler = _destination . choosePtoPOutputHandler ( fixedME , preferredME , ! msg . isFromRemoteME ( ) , msg . isForcePut ( ) , null ) ; if ( handler == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { SibTr . debug ( tc , "No suitable OutputHandler found for " + _destination . getName ( ) + " (" + fixedME + ")" ) ; } handleUndeliverableMessage ( _destination , null , msg , SIRCConstants . SIRC0026_NO_LOCALISATIONS_FOUND_ERROR , new String [ ] { _destination . getName ( ) } , transaction ) ; } else { msg . setStreamIsGuess ( handler . isWLMGuess ( ) ) ; handler . put ( msg , transaction , null , true ) ; } } finally { reallocationLock . unlock ( ) ; } } } else { ExceptionDestinationHandlerImpl exceptionDestinationHandlerImpl = ( ExceptionDestinationHandlerImpl ) _messageProcessor . createExceptionDestinationHandler ( null ) ; msg . setStoreAtSendTime ( true ) ; String destName = _destination . getName ( ) ; if ( _destination . isLink ( ) ) destName = ( ( LinkHandler ) _destination ) . getBusName ( ) ; final UndeliverableReturnCode rc = exceptionDestinationHandlerImpl . handleUndeliverableMessage ( msg , transaction , SIRCConstants . SIRC0032_DESTINATION_DELETED_ERROR , new String [ ] { destName , _messageProcessor . getMessagingEngineName ( ) } ) ; if ( rc != UndeliverableReturnCode . OK ) { if ( rc == UndeliverableReturnCode . DISCARD ) { } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "eventPrecommitAdd" , "WsRuntimeException" ) ; throw new WsRuntimeException ( nls . getFormattedMessage ( "DESTINATION_DELETED_ERROR_CWSIP0247" , new Object [ ] { _destination . getName ( ) , rc } , null ) ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "eventPrecommitAdd" ) ; } | Method eventPrecommitAdd . |
37,931 | public void sendAckMessage ( SIBUuid8 sourceMEUuid , SIBUuid12 destUuid , SIBUuid8 busUuid , long ackPrefix , int priority , Reliability reliability , SIBUuid12 stream , boolean consolidate ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendAckMessage" , new Long ( ackPrefix ) ) ; ControlAck ackMsg = createControlAckMessage ( ) ; SIMPUtils . setGuaranteedDeliveryProperties ( ackMsg , _messageProcessor . getMessagingEngineUuid ( ) , sourceMEUuid , stream , null , destUuid , ProtocolType . UNICASTOUTPUT , GDConfig . PROTOCOL_VERSION ) ; ackMsg . setPriority ( priority ) ; ackMsg . setReliability ( reliability ) ; ackMsg . setAckPrefix ( ackPrefix ) ; sendToME ( ackMsg , sourceMEUuid , busUuid , priority + 1 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sendAckMessage" ) ; } | sendAckMessage is called from preCommitCallback after the message has been delivered to the final destination |
37,932 | public void sendNackMessage ( SIBUuid8 sourceMEUuid , SIBUuid12 destUuid , SIBUuid8 busUuid , long startTick , long endTick , int priority , Reliability reliability , SIBUuid12 stream ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendNackMessage" , new Object [ ] { new Long ( startTick ) , new Long ( endTick ) } ) ; ControlNack nackMsg = createControlNackMessage ( ) ; SIMPUtils . setGuaranteedDeliveryProperties ( nackMsg , _messageProcessor . getMessagingEngineUuid ( ) , sourceMEUuid , stream , null , destUuid , ProtocolType . UNICASTOUTPUT , GDConfig . PROTOCOL_VERSION ) ; nackMsg . setPriority ( priority ) ; nackMsg . setReliability ( reliability ) ; nackMsg . setStartTick ( startTick ) ; nackMsg . setEndTick ( endTick ) ; sendToME ( nackMsg , sourceMEUuid , busUuid , priority + 2 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "sendNackMessage " ) ; } | Sends a Nack message back to the originating ME |
37,933 | private ControlNack createControlNackMessage ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createControlNackMessage" ) ; ControlNack nackMsg = null ; try { nackMsg = _cmf . createNewControlNack ( ) ; } catch ( MessageCreateFailedException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.PtoPInputHandler.createControlNackMessage" , "1:1604:1.323" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exception ( tc , e ) ; SibTr . exit ( tc , "createControlNackMessage" , e ) ; } SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.PtoPInputHandler" , "1:1616:1.323" , e } ) ; throw new SIResourceException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.PtoPInputHandler" , "1:1624:1.323" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createControlNackMessage" ) ; return nackMsg ; } | Creates an NACK message for sending |
37,934 | protected ControlRequestFlush createControlRequestFlush ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createControlRequestFlush" ) ; ControlRequestFlush rflushMsg = null ; try { rflushMsg = _cmf . createNewControlRequestFlush ( ) ; } catch ( MessageCreateFailedException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.PtoPInputHandler.createControlRequestFlush" , "1:1717:1.323" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exception ( tc , e ) ; SibTr . exit ( tc , "createControlRequestFlush" , e ) ; } SibTr . error ( tc , "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.PtoPInputHandler" , "1:1729:1.323" , e } ) ; throw new SIResourceException ( nls . getFormattedMessage ( "INTERNAL_MESSAGING_ERROR_CWSIP0002" , new Object [ ] { "com.ibm.ws.sib.processor.impl.PtoPInputHandler" , "1:1737:1.323" , e } , null ) , e ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "createControlRequestFlush" , rflushMsg ) ; return rflushMsg ; } | Creates a REQUESTFLUSH message for sending |
37,935 | private int checkCanExceptionMessage ( DestinationHandler destinationHandler ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkCanExceptionMessage" , new Object [ ] { destinationHandler } ) ; ExceptionDestinationHandlerImpl exceptionDestinationHandler = null ; exceptionDestinationHandler = new ExceptionDestinationHandlerImpl ( destinationHandler ) ; int returnValue = exceptionDestinationHandler . checkCanExceptionMessage ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkCanExceptionMessage" , Integer . valueOf ( returnValue ) ) ; return returnValue ; } | Check whether it will be possible to place a message on the exception destination belonging to a destination . |
37,936 | private int checkTargetAbleToAcceptOrExceptionMessage ( JsDestinationAddress targetDestinationAddr ) throws SITemporaryDestinationNotFoundException , SIResourceException , SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkTargetAbleToAcceptOrExceptionMessage" , targetDestinationAddr ) ; int blockingReason = DestinationHandler . OUTPUT_HANDLER_NOT_FOUND ; if ( targetDestinationAddr != null ) { DestinationHandler targetDestination = _messageProcessor . getDestinationManager ( ) . getDestination ( targetDestinationAddr , false ) ; SIBUuid8 targetDestinationMEUuid = targetDestinationAddr . getME ( ) ; blockingReason = targetDestination . checkCanAcceptMessage ( targetDestinationMEUuid , null ) ; if ( blockingReason != DestinationHandler . OUTPUT_HANDLER_FOUND ) { int linkBlockingReason = checkCanExceptionMessage ( targetDestination ) ; if ( linkBlockingReason == DestinationHandler . OUTPUT_HANDLER_FOUND ) blockingReason = DestinationHandler . OUTPUT_HANDLER_FOUND ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkTargetAbleToAcceptOrExceptionMessage" , Integer . valueOf ( blockingReason ) ) ; return blockingReason ; } | See if a target destination or if necessary its exception destination can handle any more messages . |
37,937 | private int checkLinkAbleToExceptionMessage ( ) throws SIException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkLinkAbleToExceptionMessage" ) ; int blockingReason = DestinationHandler . OUTPUT_HANDLER_NOT_FOUND ; blockingReason = checkCanExceptionMessage ( _destination ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkLinkAbleToExceptionMessage" , Integer . valueOf ( blockingReason ) ) ; return blockingReason ; } | See if a link s exception destination can handle any more messages . |
37,938 | public int checkStillBlocked ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkStillBlocked" ) ; int blockingReason = DestinationHandler . OUTPUT_HANDLER_NOT_FOUND ; if ( ! _isLink ) { blockingReason = DestinationHandler . OUTPUT_HANDLER_FOUND ; } else { boolean checkedTarget = false ; try { blockingReason = checkTargetAbleToAcceptOrExceptionMessage ( _linkBlockingDestination ) ; checkedTarget = true ; } catch ( SIMPNotPossibleInCurrentConfigurationException e ) { checkedTarget = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . exception ( tc , e ) ; } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.PtoPInputHandler.checkStillBlocked" , "1:3720:1.323" , this ) ; } try { if ( blockingReason != DestinationHandler . OUTPUT_HANDLER_FOUND ) { int linkBlockingReason = checkLinkAbleToExceptionMessage ( ) ; if ( linkBlockingReason == DestinationHandler . OUTPUT_HANDLER_FOUND ) blockingReason = DestinationHandler . OUTPUT_HANDLER_FOUND ; else if ( ! checkedTarget ) blockingReason = linkBlockingReason ; } } catch ( SIException e ) { FFDCFilter . processException ( e , "com.ibm.ws.sib.processor.impl.PtoPInputHandler.checkStillBlocked" , "1:3745:1.323" , this ) ; } if ( blockingReason == DestinationHandler . OUTPUT_HANDLER_FOUND ) _linkBlockingDestination = null ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "checkStillBlocked" , new Integer ( blockingReason ) ) ; return blockingReason ; } | See if the condition that led to the link being blocked has been resolved . The block could have been caused by a number of factors such as the routing destination being full or put - disabled or the link exception destination being full etc etc . |
37,939 | void balancedPush ( int state , GBSNode node ) { push ( state , node ) ; if ( node . balance ( ) != 0 ) _bpidx = _cidx ; } | Push a node and associated state onto the stack remembering a height imbalance if there is one . |
37,940 | void processSubFringe ( GBSNode p ) { int t0_depth = _tree . tZeroDepth ( ) ; int ntop = 0 ; int xChild = 0 ; if ( p . hasChild ( ) ) xChild = 1 ; if ( index ( ) > t0_depth ) ntop = index ( ) - ( t0_depth - xChild ) ; innerProcessSubTree ( p , NodeStack . VISIT_RIGHT , ntop ) ; } | Walk through a fringe of the tree . |
37,941 | private void innerProcessSubTree ( GBSNode p , int initialState , int topIndex ) { boolean done = false ; _topIndex = topIndex ; _endp = p ; _endIndex = _idx ; GBSNode q ; int s = initialState ; while ( ! done ) { switch ( s ) { case NodeStack . VISIT_LEFT : s = NodeStack . PROCESS_CURRENT ; q = p . leftChild ( ) ; while ( q != null ) { push ( s , p ) ; p = q ; q = p . leftChild ( ) ; } break ; case NodeStack . PROCESS_CURRENT : s = NodeStack . VISIT_RIGHT ; done = processNode ( p ) ; _endp = p ; _endIndex = _idx ; break ; case NodeStack . VISIT_RIGHT : s = NodeStack . DONE_VISITS ; q = p . rightChild ( ) ; if ( q != null ) { push ( s , p ) ; s = NodeStack . VISIT_LEFT ; p = p . rightChild ( ) ; } break ; case NodeStack . DONE_VISITS : if ( _idx == topIndex ) done = true ; else { s = _state [ _cidx ] ; p = _node [ _cidx ] ; pop ( ) ; } break ; default : throw new RuntimeException ( "Help!, s = " + s + "." ) ; } } } | Walk through an entire sub - tree invoking processNode on each node . |
37,942 | public String stateName ( int state ) { String name = "Unknown state = " + state ; switch ( state ) { case NodeStack . VISIT_LEFT : name = "VISIT_LEFT" ; break ; case NodeStack . PROCESS_CURRENT : name = "PROCESS_CURRENT" ; break ; case NodeStack . VISIT_RIGHT : name = "VISIT_RIGHT" ; break ; case NodeStack . DONE_VISITS : name = "DONE_VISITS" ; break ; } return name ; } | Return the name of a node state |
37,943 | public final static void logException ( TraceComponent compTc , Throwable t , EJBMethodMetaData m , BeanO bean ) { if ( hasBeenLogged ( t ) ) { return ; } BeanId beanId = null ; if ( bean != null ) { beanId = bean . getId ( ) ; } if ( m == null ) { if ( beanId == null ) { Tr . error ( compTc , "NON_APPLICATION_EXCEPTION_CNTR0018E" , t ) ; } else { Tr . error ( compTc , "NON_APPLICATION_EXCEPTION_ON_BEAN_CNTR0021E" , new Object [ ] { t , beanId } ) ; } } else { String methodName = m . getMethodName ( ) ; if ( beanId == null ) { Tr . error ( compTc , "NON_APPLICATION_EXCEPTION_METHOD_CNTR0019E" , new Object [ ] { t , methodName } ) ; } else { Tr . error ( compTc , "NON_APPLICATION_EXCEPTION_METHOD_ON_BEAN_CNTR0020E" , new Object [ ] { t , methodName , beanId } ) ; } } } | d408351 - added new signature with customizable TraceComponent |
37,944 | static public Throwable findRootCause ( Throwable throwable ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "findRootCause: " + throwable ) ; } Throwable root = throwable ; Throwable next = root ; while ( next != null ) { root = next ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "finding cause of: " + root . getClass ( ) . getName ( ) ) ; } if ( root instanceof java . rmi . RemoteException ) { next = ( ( java . rmi . RemoteException ) root ) . detail ; } else if ( root instanceof WsNestedException ) { next = ( ( WsNestedException ) root ) . getCause ( ) ; } else if ( root instanceof TransactionRolledbackLocalException ) { next = ( ( TransactionRolledbackLocalException ) root ) . getCause ( ) ; } else if ( root instanceof AccessLocalException ) { next = ( ( AccessLocalException ) root ) . getCause ( ) ; } else if ( root instanceof NoSuchObjectLocalException ) { next = ( ( NoSuchObjectLocalException ) root ) . getCause ( ) ; } else if ( root instanceof TransactionRequiredLocalException ) { next = ( ( TransactionRequiredLocalException ) root ) . getCause ( ) ; } else if ( root instanceof NamingException ) { next = ( ( NamingException ) root ) . getRootCause ( ) ; } else if ( root instanceof InvocationTargetException ) { next = ( ( InvocationTargetException ) root ) . getTargetException ( ) ; } else if ( root instanceof org . omg . CORBA . portable . UnknownException ) { next = ( ( org . omg . CORBA . portable . UnknownException ) root ) . originalEx ; } else if ( root instanceof InjectionException ) { next = root . getCause ( ) ; } else { next = null ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "findRootCause returning: " + root ) ; return root ; } | Finds the root cause of a Throwable that occured . This routine will continue to look through chained Throwables until it cannot find another chained Throwable and return the last one in the chain as the root cause . |
37,945 | public static Exception Exception ( Throwable cause ) { return ( cause instanceof Exception ) ? ( Exception ) cause : new Exception ( "See nested Throwable" , cause ) ; } | F71894 . 1 |
37,946 | protected ClientBehaviorAttachedObjectTargetImpl createAttachedObjectTarget ( FaceletContext ctx ) { ClientBehaviorAttachedObjectTargetImpl target = new ClientBehaviorAttachedObjectTargetImpl ( ) ; if ( _event != null ) { target . setEvent ( _event . getValueExpression ( ctx , String . class ) ) ; } if ( _name != null ) { target . setName ( _name . getValueExpression ( ctx , String . class ) ) ; } if ( _default != null ) { target . setDefault ( _default . getBoolean ( ctx ) ) ; } if ( _targets != null ) { target . setTargets ( _targets . getValueExpression ( ctx , String . class ) ) ; } return target ; } | Create a new AttachedObjectTarget instance to be added on the target list . |
37,947 | private void registerEndpointMBean ( String name , EndPointInfoImpl ep ) { endpointMBeans . put ( name , registerMBeanAsService ( name , ep ) ) ; } | Register an endpoint MBean and publish it . |
37,948 | private EndPointInfoImpl updateEndpointMBean ( String name , String host , int port ) { EndPointInfoImpl existingEP = endpoints . get ( name ) ; existingEP . updateHost ( host ) ; existingEP . updatePort ( port ) ; return existingEP ; } | Update an existing endpoint MBean which will emit change notifications . |
37,949 | private void destroyEndpointMBeans ( ) { for ( Map . Entry < String , ServiceRegistration < DynamicMBean > > mbean : endpointMBeans . entrySet ( ) ) { String mbeanName = mbean . getKey ( ) ; endpointMBeans . remove ( mbeanName ) ; mbean . getValue ( ) . unregister ( ) ; } } | For each registered MBean unpublish unregister and remove from the map . |
37,950 | public static void destroyEndpoints ( ) { EndPointMgrImpl _this = ( EndPointMgrImpl ) getRef ( ) ; synchronized ( _this . endpoints ) { _this . destroyEndpointMBeans ( ) ; _this . endpoints . clear ( ) ; } } | Destroy all of the defined endpoints . |
37,951 | private void unregisterMBeanInService ( String name ) { ServiceRegistration < DynamicMBean > existingMBean = endpointMBeans . remove ( name ) ; if ( existingMBean != null ) { existingMBean . unregister ( ) ; } } | Remove the MBean from the map of registered MBeans and unregister it . |
37,952 | public void removeEndPoint ( String name ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Deleting endpoint: " + name ) ; } synchronized ( this . endpoints ) { if ( this . endpoints . remove ( name ) != null ) { unregisterMBeanInService ( name ) ; } } } | Delete the endpoint that matches the provided name . |
37,953 | private static String [ ] getTokensArray ( String tokenComposite ) throws ParseException { if ( tokenComposite == null || "" . equals ( tokenComposite ) ) { return null ; } return parseNameTokens ( tokenComposite ) ; } | Takes a string that is a composite of tokens extracts tokens delimited by any whitespace character sequence combination and returns a String array of such tokens . |
37,954 | static public String [ ] parseNameTokens ( String stringValue ) { if ( stringValue == null ) { return null ; } ArrayList < String > list = new ArrayList < String > ( 5 ) ; int length = stringValue . length ( ) ; boolean inSpace = true ; int start = 0 ; for ( int i = 0 ; i < length ; i ++ ) { char ch = stringValue . charAt ( i ) ; if ( Character . isWhitespace ( ch ) ) { if ( ! inSpace ) { list . add ( stringValue . substring ( start , i ) ) ; inSpace = true ; } } else { if ( inSpace ) { start = i ; inSpace = false ; } } } if ( ! inSpace ) { list . add ( stringValue . substring ( start ) ) ; } if ( list . isEmpty ( ) ) { return null ; } return list . toArray ( new String [ list . size ( ) ] ) ; } | Parses a whitespace separated series of name tokens . |
37,955 | public static FlowType getKey ( int ordinal ) { if ( ordinal >= 0 && ordinal < _values . length ) { return _values [ ordinal ] ; } return null ; } | Fetch the FlowType for a particular integer . |
37,956 | public boolean containsChannel ( String channelName ) { boolean found = false ; for ( int i = 0 ; i < channels . length ; i ++ ) { if ( channels [ i ] . getName ( ) . equals ( channelName ) ) { found = true ; break ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "containsChannel: " + channelName + "=" + found ) ; } return found ; } | Check whether this chain contains the input channel name . |
37,957 | private static boolean needsEncoding ( String s , boolean relax , boolean [ ] unreserved ) { int len = s . length ( ) ; for ( int i = 0 ; i < len ; ++ i ) { char c = s . charAt ( i ) ; if ( c == '%' && relax ) { continue ; } if ( c > unreserved . length ) { return true ; } if ( unreserved [ c ] == false ) { return true ; } } return false ; } | Determines if the input string contains any invalid URI characters that require encoding |
37,958 | public Object getWLMEndPointData ( ) { if ( mode != PropertiesType . WLM_EP ) { throw new SIErrorException ( nls . getFormattedMessage ( "INVALID_METHOD_FOR_OBJECT_TYPE_SICO0006" , null , "INVALID_METHOD_FOR_OBJECT_TYPE_SICO0006" ) ) ; } return wlmEndPointData ; } | Returns the WLM endpoint data associated with this instance of connection properties . This is only valid if the instance was created to use the WLM endpoint mode of operation . An IllegalArgumentException will be thrown otherwise . |
37,959 | public static String getContextRootNotFoundMessage ( ) { HttpDispatcher f = instance . get ( ) . get ( ) ; if ( f != null ) return f . appOrContextRootNotFound ; return null ; } | Get the value for the appOrContextRootMissingMessage custom property . return null if it was not set . |
37,960 | public boolean isTrusted ( String hostAddr , String headerName ) { if ( ! wcTrusted ) { return false ; } if ( HttpHeaderKeys . isSensitivePrivateHeader ( headerName ) ) { return isTrustedForSensitiveHeaders ( hostAddr ) ; } if ( ! usePrivateHeaders ) { return isTrustedForSensitiveHeaders ( hostAddr ) ; } if ( restrictPrivateHeaderOrigin == null ) { return true ; } else { boolean trustedOrigin = restrictPrivateHeaderOrigin . contains ( hostAddr . toLowerCase ( ) ) ; if ( ! trustedOrigin ) { trustedOrigin = isTrustedForSensitiveHeaders ( hostAddr ) ; } return trustedOrigin ; } } | Check to see if the source host address is one we allow for specification of private headers |
37,961 | public boolean isTrustedForSensitiveHeaders ( String hostAddr ) { if ( ! useSensitivePrivateHeaders ) { return false ; } if ( restrictSensitiveHeaderOrigin == null ) { return true ; } else { return restrictSensitiveHeaderOrigin . contains ( hostAddr . toLowerCase ( ) ) ; } } | Check to see if the source host address is one we allow for specification of sensitive private headers |
37,962 | public static ExecutorService getExecutorService ( ) { HttpDispatcher f = instance . get ( ) . get ( ) ; if ( f == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "HttpDispatcher instance not found" ) ; } return null ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "HttpDispatcher instance: " + f . toString ( ) ) ; } return f . executorService ; } } | Access the collaboration engine . |
37,963 | public static CHFWBundle getCHFWBundle ( ) { HttpDispatcher f = instance . get ( ) . get ( ) ; if ( f != null ) return f . chfw ; return null ; } | Access the channel framework bundle . |
37,964 | public static WsByteBufferPoolManager getBufferManager ( ) { final CHFWBundle chfw = getCHFWBundle ( ) ; if ( null == chfw ) { return ChannelFrameworkFactory . getBufferManager ( ) ; } return chfw . getBufferManager ( ) ; } | Access the current reference to the bytebuffer pool manager . |
37,965 | public static ChannelFramework getFramework ( ) { final CHFWBundle chfw = getCHFWBundle ( ) ; if ( null == chfw ) { return ChannelFrameworkFactory . getChannelFramework ( ) ; } return chfw . getFramework ( ) ; } | Access the current reference to the channel framework instance . |
37,966 | @ Reference ( name = "workClassifier" , policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . OPTIONAL ) protected void setWorkClassifier ( WorkClassifier service ) { workClassifier = service ; } | DS method for setting the Work Classification service reference . |
37,967 | public static WorkClassifier getWorkClassifier ( ) { HttpDispatcher f = instance . get ( ) . get ( ) ; if ( f != null ) return f . workClassifier ; return null ; } | Access to the WorkClassifier |
37,968 | private static ObjectName createObjectName ( String type , String name , Hashtable < String , String > props ) { props . put ( KEY_TYPE , type ) ; props . put ( KEY_NAME , name ) ; try { return new ObjectName ( DOMAIN_NAME , props ) ; } catch ( MalformedObjectNameException e ) { throw new IllegalArgumentException ( e ) ; } } | Common object name factory method . |
37,969 | public static ObjectName createApplicationObjectName ( String name , String serverName ) { Hashtable < String , String > props = new Hashtable < String , String > ( ) ; props . put ( TYPE_SERVER , serverName ) ; return createObjectName ( TYPE_APPLICATION , name , props ) ; } | Application and module factory methods ... |
37,970 | public static ObjectName createEJBModuleObjectName ( String uri , String appName , String serverName ) { return createModuleObjectName ( ModuleType . EJBModule , uri , appName , serverName ) ; } | EJB factory methods ... |
37,971 | public static ObjectName createWebModuleObjectName ( String moduleURI , String appName , String serverName ) { return createModuleObjectName ( ModuleType . WebModule , moduleURI , appName , serverName ) ; } | Servlet factory methods ... |
37,972 | public static ObjectName createJavaMailObjectName ( String serverName , String mailSessionID , int resourceCounter ) { Hashtable < String , String > props = new Hashtable < String , String > ( ) ; props . put ( TYPE_SERVER , serverName ) ; props . put ( MAIL_SESSION_ID , mailSessionID ) ; props . put ( RESOURCE_ID , TYPE_JAVA_MAIL_RESOURCE + "-" + resourceCounter ) ; ObjectName objectName ; try { objectName = createObjectName ( TYPE_JAVA_MAIL_RESOURCE , NAME_JAVA_MAIL_RESOURCE , props ) ; } catch ( IllegalArgumentException e ) { props . remove ( MAIL_SESSION_ID ) ; objectName = createObjectName ( TYPE_JAVA_MAIL_RESOURCE , NAME_JAVA_MAIL_RESOURCE , props ) ; } return objectName ; } | Java mail factory methods ... |
37,973 | public static ObjectName createResourceObjectName ( String serverName , String resourceType , String keyName ) { ObjectName objectName ; Hashtable < String , String > props = new Hashtable < String , String > ( ) ; props . put ( TYPE_SERVER , serverName ) ; objectName = createObjectName ( resourceType , keyName , props ) ; return objectName ; } | Creates a Resource ObjectName for a Resource MBean |
37,974 | public boolean libraryExists ( String libraryName ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; String localePrefix = getLocalePrefixForLocateResource ( facesContext ) ; final List < String > contracts = facesContext . getResourceLibraryContracts ( ) ; String pathToLib = null ; Boolean libraryFound = null ; if ( libraryName != null && ! ResourceValidationUtils . isValidLibraryName ( libraryName , isAllowSlashesLibraryName ( ) ) ) { return false ; } if ( localePrefix != null ) { pathToLib = localePrefix + '/' + libraryName ; libraryFound = getResourceLoaderCache ( ) . libraryExists ( pathToLib ) ; if ( libraryFound != null ) { return libraryFound . booleanValue ( ) ; } } libraryFound = getResourceLoaderCache ( ) . libraryExists ( libraryName ) ; if ( libraryFound != null ) { return libraryFound . booleanValue ( ) ; } if ( localePrefix != null ) { if ( ! contracts . isEmpty ( ) ) { for ( String contract : contracts ) { for ( ContractResourceLoader loader : getResourceHandlerSupport ( ) . getContractResourceLoaders ( ) ) { if ( loader . libraryExists ( pathToLib , contract ) ) { getResourceLoaderCache ( ) . confirmLibraryExists ( pathToLib ) ; return true ; } } } } for ( ResourceLoader loader : getResourceHandlerSupport ( ) . getResourceLoaders ( ) ) { if ( loader . libraryExists ( pathToLib ) ) { getResourceLoaderCache ( ) . confirmLibraryExists ( pathToLib ) ; return true ; } } } if ( ! contracts . isEmpty ( ) ) { for ( String contract : contracts ) { for ( ContractResourceLoader loader : getResourceHandlerSupport ( ) . getContractResourceLoaders ( ) ) { if ( loader . libraryExists ( libraryName , contract ) ) { getResourceLoaderCache ( ) . confirmLibraryExists ( libraryName ) ; return true ; } } } } for ( ResourceLoader loader : getResourceHandlerSupport ( ) . getResourceLoaders ( ) ) { if ( loader . libraryExists ( libraryName ) ) { getResourceLoaderCache ( ) . confirmLibraryExists ( libraryName ) ; return true ; } } if ( localePrefix != null ) { getResourceLoaderCache ( ) . confirmLibraryNotExists ( pathToLib ) ; } else { getResourceLoaderCache ( ) . confirmLibraryNotExists ( libraryName ) ; } return false ; } | Check if a library exists or not . This is done delegating to each ResourceLoader used because each one has a different prefix and way to load resources . |
37,975 | public Object setValue ( Token object ) { Object result = value ; value = object ; return result ; } | Sets the value for this entry |
37,976 | protected MatchResponse getMatchResponse ( SecurityConstraint securityConstraint , String resourceName , String method ) { CollectionMatch collectionMatch = getCollectionMatch ( securityConstraint . getWebResourceCollections ( ) , resourceName , method ) ; if ( CollectionMatch . RESPONSE_NO_MATCH . equals ( collectionMatch ) ) { return MatchResponse . NO_MATCH_RESPONSE ; } if ( com . ibm . ws . webcontainer . osgi . WebContainer . getServletContainerSpecLevel ( ) >= 31 ) { if ( collectionMatch . isExactMatch ( ) && securityConstraint . isAccessUncovered ( ) && securityConstraint . isFromHttpConstraint ( ) ) { return new MatchResponse ( securityConstraint . getRoles ( ) , securityConstraint . isSSLRequired ( ) , securityConstraint . isAccessPrecluded ( ) , CollectionMatch . RESPONSE_PERMIT ) ; } } return new MatchResponse ( securityConstraint . getRoles ( ) , securityConstraint . isSSLRequired ( ) , securityConstraint . isAccessPrecluded ( ) , collectionMatch ) ; } | Gets the response object that contains the roles the SSL required and access precluded indicators . Gets the response using the standard method algorithm . |
37,977 | public void purge ( ) { synchronized ( this ) { for ( DynamicVirtualHost host : hostMap . values ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Purge host : " + host . hashCode ( ) + ", this : " + this ) ; } host . getHostConfiguration ( ) . setConfiguration ( null ) ; } hostMap . clear ( ) ; } } | Called when the webcontainer is deactivated . This will clean up all maps within the host manager to facilitate garbage collection and clean up . |
37,978 | private void setSsoTokenCredential ( Subject subject , String principalAccessId ) throws CredentialException { try { TokenManager tokenManager = tokenManagerRef . getService ( ) ; SingleSignonToken ssoToken = null ; Set < Token > tokens = subject . getPrivateCredentials ( Token . class ) ; if ( tokens . isEmpty ( ) == false ) { Token ssoLtpaToken = tokens . iterator ( ) . next ( ) ; subject . getPrivateCredentials ( ) . remove ( ssoLtpaToken ) ; ssoToken = tokenManager . createSSOToken ( ssoLtpaToken ) ; } else { Map < String , Object > tokenData = new HashMap < String , Object > ( ) ; tokenData . put ( "unique_id" , principalAccessId ) ; ssoToken = tokenManager . createSSOToken ( tokenData ) ; } subject . getPrivateCredentials ( ) . add ( ssoToken ) ; } catch ( TokenCreationFailedException e ) { throw new CredentialException ( e . getLocalizedMessage ( ) ) ; } } | Create an SSO token for the specified accessId . |
37,979 | public ManagedObject get ( Token token ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) { trace . entry ( this , cclass , "get" , token ) ; trace . exit ( this , cclass , "get returns null" ) ; } return null ; } | Retrieve an object in the store . For MemoryObjectStores this should only be called for a ManagedObject that was lost over a restart so null is returned . |
37,980 | public synchronized void flush ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) { trace . entry ( this , cclass , "flush" ) ; trace . exit ( this , cclass , "flush" ) ; } } | For MemoryObjectstore there is nothing to do . |
37,981 | static void buildEjbWebServiceEndpointInfos ( EndpointInfoBuilder endpointInfoBuilder , EndpointInfoBuilderContext ctx , JaxWsServerMetaData jaxWsServerMetaData , List < EJBEndpoint > ejbEndpoints , JaxWsModuleInfo jaxWsModuleInfo ) throws UnableToAdaptException { Set < String > presentedServices = jaxWsModuleInfo . getEndpointImplBeanClassNames ( ) ; for ( EJBEndpoint ejbEndpoint : ejbEndpoints ) { if ( ! ejbEndpoint . isWebService ( ) ) { continue ; } if ( presentedServices . contains ( ejbEndpoint . getClassName ( ) ) ) { continue ; } String ejbName = ejbEndpoint . getJ2EEName ( ) . getComponent ( ) ; ctx . addContextEnv ( JaxWsConstants . ENV_ATTRIBUTE_ENDPOINT_BEAN_NAME , ejbName ) ; EndpointInfo endpointInfo = endpointInfoBuilder . build ( ctx , ejbEndpoint . getClassName ( ) , EndpointType . EJB ) ; if ( endpointInfo != null ) { jaxWsModuleInfo . addEndpointInfo ( ejbEndpoint . getName ( ) , endpointInfo ) ; jaxWsServerMetaData . putEndpointNameAndJ2EENameEntry ( ejbName , ejbEndpoint . getJ2EEName ( ) ) ; } } } | build Web Service endpoint infos |
37,982 | public static Jose4jRsaJWK getInstance ( int size , String alg , String use , String type ) { String kid = RandomUtils . getRandomAlphaNumeric ( KID_LENGTH ) ; KeyPairGenerator keyGenerator = null ; try { keyGenerator = KeyPairGenerator . getInstance ( "RSA" ) ; } catch ( NoSuchAlgorithmException e ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caught unexpected exception: " + e . getLocalizedMessage ( ) , e ) ; } return null ; } keyGenerator . initialize ( size ) ; KeyPair keypair = keyGenerator . generateKeyPair ( ) ; RSAPublicKey pubKey = ( RSAPublicKey ) keypair . getPublic ( ) ; RSAPrivateKey priKey = ( RSAPrivateKey ) keypair . getPrivate ( ) ; Jose4jRsaJWK jwk = new Jose4jRsaJWK ( pubKey ) ; jwk . setPrivateKey ( priKey ) ; jwk . setAlgorithm ( alg ) ; jwk . setKeyId ( kid ) ; jwk . setUse ( ( use == null ) ? JwkConstants . sig : use ) ; return jwk ; } | generate a new JWK with the specified parameters |
37,983 | public static Jose4jRsaJWK getInstance ( String alg , String use , PublicKey publicKey , PrivateKey privateKey , String kid ) { RSAPublicKey pubKey = ( RSAPublicKey ) publicKey ; RSAPrivateKey priKey = ( RSAPrivateKey ) privateKey ; Jose4jRsaJWK jwk = new Jose4jRsaJWK ( pubKey ) ; jwk . setPrivateKey ( priKey ) ; jwk . setAlgorithm ( alg ) ; jwk . setKeyId ( kid ) ; jwk . setUse ( use == null ? JwkConstants . sig : use ) ; return jwk ; } | alg use publicKey privateKey |
37,984 | private List < Object > reprocessFormParams ( Method method , List < Object > origParams , Message m ) { Form form = null ; boolean hasFormParamAnnotations = false ; Object [ ] newValues = new Object [ origParams . size ( ) ] ; java . lang . reflect . Parameter [ ] methodParams = method . getParameters ( ) ; for ( int i = 0 ; i < methodParams . length ; i ++ ) { if ( Form . class . equals ( methodParams [ i ] . getType ( ) ) ) { form = ( Form ) origParams . get ( i ) ; } if ( methodParams [ i ] . getAnnotation ( FormParam . class ) != null ) { hasFormParamAnnotations = true ; } else { newValues [ i ] = origParams . get ( i ) ; } } if ( ! hasFormParamAnnotations || form == null ) { return origParams ; } for ( int i = 0 ; i < newValues . length ; i ++ ) { if ( newValues [ i ] == null ) { String formFieldName = methodParams [ i ] . getAnnotation ( FormParam . class ) . value ( ) ; List < String > values = form . asMap ( ) . get ( formFieldName ) ; newValues [ i ] = InjectionUtils . createParameterObject ( values , methodParams [ i ] . getType ( ) , methodParams [ i ] . getParameterizedType ( ) , methodParams [ i ] . getAnnotations ( ) , ( String ) origParams . get ( i ) , false , ParameterType . FORM , m ) ; if ( LOG . isLoggable ( Level . FINEST ) ) { LOG . log ( Level . FINEST , "replacing @FormParam value of {0} with {1}" , new Object [ ] { origParams . get ( i ) , newValues [ i ] } ) ; } } } return Arrays . asList ( newValues ) ; } | Liberty change start - CXF - 7860 |
37,985 | private Collection < LibertyVersion > filterVersions ( Collection < LibertyVersion > minimumVersions , String version ) { LibertyVersion versionToMatch = LibertyVersion . valueOf ( version ) ; if ( versionToMatch == null ) { return minimumVersions ; } Collection < LibertyVersion > filteredVersions = new HashSet < LibertyVersion > ( ) ; for ( LibertyVersion versionToTest : minimumVersions ) { if ( versionToTest . matchesToMicros ( versionToMatch ) ) { filteredVersions . add ( versionToTest ) ; } } return filteredVersions ; } | This will filter the supplied versions to make sure they all have the same major minor and micro parts as the supplied version . This may return the original collection . |
37,986 | Map < Object , Object > createOrRestoreMap ( FacesContext context , String prefix , boolean create ) { ExternalContext external = context . getExternalContext ( ) ; Map < String , Object > sessionMap = external . getSessionMap ( ) ; Map < Object , Object > map = ( Map < Object , Object > ) sessionMap . get ( prefix ) ; if ( map == null && create ) { map = new ConcurrentHashMap < Object , Object > ( ) ; sessionMap . put ( prefix , map ) ; } return map ; } | Create a new subkey - wrapper of the session map with the given prefix . This wrapper is used to implement the maps for the flash scope . For more information see the SubKeyMap doc . |
37,987 | public static TSSConfig getTSSConfig ( Map < String , Object > props , Map < OptionsKey , List < TransportAddress > > addrMap , Bundle bundle ) throws Exception { TSSConfig tssConfig = new TSSConfig ( ) ; List < Map < String , Object > > tssConfigs = Nester . nest ( CSIV2_CONFIGURATION , props ) ; if ( ! tssConfigs . isEmpty ( ) ) { Map < String , Object > properties = tssConfigs . get ( 0 ) ; List < Map < String , Object > > mechList = Nester . nest ( COMPOUND_SEC_MECH_TYPE_LIST , properties ) ; TSSCompoundSecMechListConfig mechListConfig = tssConfig . getMechListConfig ( ) ; mechListConfig . setStateful ( ( Boolean ) properties . get ( STATEFUL ) ) ; for ( Map < String , Object > mech : mechList ) { TSSCompoundSecMechConfig cMech = extractCompoundSecMech ( mech , addrMap , bundle ) ; mechListConfig . add ( cMech ) ; } } return tssConfig ; } | Returns a TSSConfig object initialized with the input object as an XML string . |
37,988 | public ZipFileData addFirst ( ZipFileData newFirstData ) { String newFirstPath = newFirstData . path ; Cell dupCell = cells . get ( newFirstPath ) ; if ( dupCell != null ) { throw new IllegalArgumentException ( "Path [ " + newFirstPath + " ] is already stored" ) ; } Cell oldFirstCell = anchor . next ; Cell newFirstCell = new Cell ( newFirstData ) ; cells . put ( newFirstPath , newFirstCell ) ; newFirstCell . putBetween ( anchor , oldFirstCell ) ; return oldFirstCell . data ; } | Add data as new first data . |
37,989 | public ZipFileData addLast ( ZipFileData newLastData ) { String newLastPath = newLastData . path ; Cell dupCell = cells . get ( newLastPath ) ; if ( dupCell != null ) { throw new IllegalArgumentException ( "Path [ " + newLastPath + " ] is already stored" ) ; } Cell oldLastCell = anchor . prev ; Cell newLastCell = new Cell ( newLastData ) ; cells . put ( newLastPath , newLastCell ) ; newLastCell . putBetween ( oldLastCell , anchor ) ; return oldLastCell . data ; } | Add data as new last data . |
37,990 | public ZipFileData addLast ( ZipFileData newLastData , int maximumSize ) { String newLastPath = newLastData . path ; Cell dupCell = cells . get ( newLastPath ) ; if ( dupCell != null ) { throw new IllegalArgumentException ( "Path [ " + newLastPath + " ] is already stored" ) ; } int size = size ( ) ; if ( ( maximumSize == - 1 ) || ( size < maximumSize ) ) { @ SuppressWarnings ( "unused" ) ZipFileData oldLastData = addLast ( newLastData ) ; return null ; } Cell oldFirstCell = anchor . next ; ZipFileData oldFirstData = oldFirstCell . data ; String oldFirstPath = oldFirstData . path ; if ( oldFirstCell != cells . remove ( oldFirstPath ) ) { throw new IllegalStateException ( "Bad cell alignment on path [ " + oldFirstPath + " ]" ) ; } oldFirstCell . data = newLastData ; cells . put ( newLastPath , oldFirstCell ) ; if ( size != 1 ) { oldFirstCell . excise ( ) ; oldFirstCell . putBetween ( anchor . prev , anchor ) ; } return oldFirstData ; } | Add data as the last data of the store . If the addition pushes a cell out of the list answer the data of the cell which was removed . |
37,991 | public void refresh ( ApplicationMonitorConfig config ) { _config . set ( config ) ; UpdateTrigger trigger = config . getUpdateTrigger ( ) ; if ( trigger != UpdateTrigger . DISABLED ) { for ( ApplicationListeners listeners : _appListeners . values ( ) ) { listeners . startListeners ( config . getPollingRate ( ) , config . getUpdateTrigger ( ) == UpdateTrigger . MBEAN ) ; } } else { for ( ApplicationListeners listeners : _appListeners . values ( ) ) { listeners . stopListeners ( false ) ; } } } | Starts the service with properties |
37,992 | @ FFDCIgnore ( value = UnableToAdaptException . class ) public void addApplication ( ApplicationInstallInfo installInfo ) { final Collection < Notification > notificationsToMonitor ; final boolean listenForRootStructuralChanges ; ApplicationMonitoringInformation ami = installInfo . getApplicationMonitoringInformation ( ) ; if ( ami != null ) { notificationsToMonitor = ami . getNotificationsToMonitor ( ) ; listenForRootStructuralChanges = ami . isListeningForRootStructuralChanges ( ) ; } else { notificationsToMonitor = null ; listenForRootStructuralChanges = true ; } try { ApplicationListeners listeners = new ApplicationListeners ( installInfo . getUpdateHandler ( ) , _executorService ) ; if ( notificationsToMonitor != null ) { for ( Notification notificationToMonitor : notificationsToMonitor ) { ApplicationListener listener = new ApplicationListener ( notificationToMonitor , listeners , installInfo ) ; listeners . addListener ( listener ) ; } listeners . addListener ( new RootApplicationListener ( installInfo . getContainer ( ) , listenForRootStructuralChanges , listeners ) ) ; } else { listeners . addListener ( new CompleteApplicationListener ( installInfo . getContainer ( ) , listeners ) ) ; } ApplicationListeners old = _appListeners . put ( installInfo . getPid ( ) , listeners ) ; if ( old != null ) { old . stopListeners ( true ) ; } ApplicationMonitorConfig config = _config . get ( ) ; if ( config . getUpdateTrigger ( ) != UpdateTrigger . DISABLED ) { listeners . startListeners ( config . getPollingRate ( ) , config . getUpdateTrigger ( ) == UpdateTrigger . MBEAN ) ; } } catch ( UnableToAdaptException e ) { AppMessageHelper . get ( installInfo . getHandler ( ) ) . warning ( "APPLICATION_MONITORING_FAIL" , installInfo . getName ( ) ) ; } } | adds an application s information to the update monitor |
37,993 | public void removeApplication ( String pid ) { ApplicationListeners listeners = _appListeners . remove ( pid ) ; if ( listeners != null ) { listeners . stopListeners ( true ) ; } } | Removes an application from the update monitor |
37,994 | public static void traceEJBCallEntry ( String methodDesc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( BeanLifeCycle_EJBCallEntry_Type_Str ) . append ( DataDelimiter ) . append ( BeanLifeCycle_EJBCallEntry_Type ) . append ( DataDelimiter ) . append ( methodDesc ) ; Tr . debug ( tc , sbuf . toString ( ) ) ; } } | This is called by the EJB container server code to write a ejb method callback entry record to the trace log if enabled . |
37,995 | public static void traceEJBCallExit ( String methodDesc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( BeanLifeCycle_EJBCallExit_Type_Str ) . append ( DataDelimiter ) . append ( BeanLifeCycle_EJBCallExit_Type ) . append ( DataDelimiter ) . append ( methodDesc ) ; Tr . debug ( tc , sbuf . toString ( ) ) ; } } | This is called by the EJB container server code to write a ejb method callback exit record to the trace log if enabled . |
37,996 | public static void traceBeanState ( int oldState , String oldString , int newState , String newString ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( BeanLifeCycle_State_Type_Str ) . append ( DataDelimiter ) . append ( BeanLifeCycle_State_Type ) . append ( DataDelimiter ) . append ( oldState ) . append ( DataDelimiter ) . append ( oldString ) . append ( DataDelimiter ) . append ( newState ) . append ( DataDelimiter ) . append ( newString ) . append ( DataDelimiter ) ; Tr . debug ( tc , sbuf . toString ( ) ) ; } } | This is called by the EJB container server code to write a ejb bean state record to the trace log if enabled . |
37,997 | protected synchronized void add ( Object id , int bufferType , int cause , int source , boolean fromDepIdTemplateInvalidation , boolean fireEvent , boolean isAlias ) { final String methodName = "add(Object)" ; if ( id == null ) { return ; } if ( bufferType == EXPLICIT_BUFFER ) { byte info = 0 ; if ( cause != 0 && source != 0 ) { info = ( byte ) cause ; if ( source == CachePerf . REMOTE ) { info = ( byte ) ( info | STATUS_REMOTE ) ; } if ( fromDepIdTemplateInvalidation ) { info = ( byte ) ( info | STATUS_FROM_DEPID_TEMPLATE ) ; } if ( isAlias ) { info = ( byte ) ( info | STATUS_ALIAS ) ; } if ( fireEvent ) { info = ( byte ) ( info | STATUS_FIRE_EVENT ) ; } } this . explicitBuffer . put ( id , new Byte ( info ) ) ; this . scanBuffer . remove ( id ) ; } else if ( bufferType == SCAN_BUFFER ) { if ( ! this . explicitBuffer . containsKey ( id ) ) { this . scanBuffer . add ( id ) ; } } else if ( bufferType == GC_BUFFER ) { this . garbageCollectorBuffer . add ( id ) ; } traceDebug ( methodName , "cacheName=" + this . cod . cacheName + " id=" + id + " bufferType=" + bufferType + " ExplicitBuffer=" + this . explicitBuffer . size ( ) + " ScanBuffer=" + this . scanBuffer . size ( ) + " GCBuffer=" + this . garbageCollectorBuffer . size ( ) + " cause=" + cause + " source=" + source + " fireEvent=" + fireEvent ) ; if ( isFull ( ) || bufferType == GC_BUFFER ) { invokeBackgroundInvalidation ( ! SCAN ) ; } } | Call this method to store a cache id in the one of invalidation buffers . The entry is going to remove from the disk using LPBT . |
37,998 | protected synchronized void add ( ValueSet idSet , int bufferType , int cause , int source , boolean fromDepIdTemplateInvalidation , boolean fireEvent , boolean checkFull ) { final String methodName = "add(ValueSet)" ; if ( idSet == null || idSet . isEmpty ( ) ) { return ; } int size = idSet . size ( ) ; if ( bufferType == EXPLICIT_BUFFER ) { byte info = 0 ; if ( cause != 0 && source != 0 ) { info = ( byte ) cause ; if ( source == CachePerf . REMOTE ) { info = ( byte ) ( info | STATUS_REMOTE ) ; } if ( fromDepIdTemplateInvalidation ) { info = ( byte ) ( info | STATUS_FROM_DEPID_TEMPLATE ) ; } if ( fireEvent ) { info = ( byte ) ( info | STATUS_FIRE_EVENT ) ; } } Iterator it = idSet . iterator ( ) ; while ( it . hasNext ( ) ) { Object entryId = it . next ( ) ; this . explicitBuffer . put ( entryId , new Byte ( info ) ) ; } if ( ! this . scanBuffer . isEmpty ( ) ) { filter ( this . scanBuffer , idSet ) ; } } else if ( bufferType == SCAN_BUFFER ) { if ( ! explicitBuffer . isEmpty ( ) ) { filter ( idSet , this . explicitBuffer ) ; } this . scanBuffer . addAll ( idSet ) ; } else if ( bufferType == GC_BUFFER ) { this . garbageCollectorBuffer . addAll ( idSet ) ; } traceDebug ( methodName , "cacheName=" + this . cod . cacheName + " idSet=" + size + " idSetFilter=" + idSet . size ( ) + " bufferType=" + bufferType + " explicitBuffer=" + this . explicitBuffer . size ( ) + " scanBuffer=" + this . scanBuffer . size ( ) + " GCBuffer=" + this . garbageCollectorBuffer . size ( ) ) ; if ( ( checkFull && isFull ( ) ) || bufferType == GC_BUFFER ) { invokeBackgroundInvalidation ( ! SCAN ) ; } } | Call this method to store a collection of cache ids in the one of invalidation buffers . The entries are going to remove from the disk using LPBT . |
37,999 | protected synchronized Object get ( int bufferType ) { Object id = null ; if ( bufferType == this . EXPLICIT_BUFFER ) { if ( ! this . explicitBuffer . isEmpty ( ) ) { Set s = this . explicitBuffer . keySet ( ) ; Iterator it = s . iterator ( ) ; ExplicitIdData idData = new ExplicitIdData ( ) ; while ( it . hasNext ( ) ) { idData . id = it . next ( ) ; idData . info = ( ( Byte ) this . explicitBuffer . get ( idData . id ) ) . byteValue ( ) ; if ( ( idData . info & HTODInvalidationBuffer . STATUS_ALIAS ) == 0 ) { id = idData ; break ; } } } } else if ( bufferType == this . SCAN_BUFFER ) { if ( ! this . scanBuffer . isEmpty ( ) ) { id = this . scanBuffer . getOne ( ) ; } } else if ( bufferType == this . GC_BUFFER ) { if ( ! this . garbageCollectorBuffer . isEmpty ( ) ) { id = this . garbageCollectorBuffer . get ( 0 ) ; } } return id ; } | Call this method when a cache id is retrieved from one of invalidation buffers . The entry is being used to remove from the disk using LPBT . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.