idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
37,300
private ReturnCode write ( String command , ReturnCode notStartedRC , ReturnCode errorRC ) { SocketChannel channel = null ; try { ServerCommandID commandID = createServerCommand ( command ) ; if ( commandID . getPort ( ) > 0 ) { channel = SelectorProvider . provider ( ) . openSocketChannel ( ) ; channel . connect ( new...
Write a command to the server process .
37,301
public ReturnCode startStatus ( ServerLock lock ) { while ( ! isValid ( ) ) { ReturnCode rc = startStatusWait ( lock ) ; if ( rc != ReturnCode . START_STATUS_ACTION ) { return rc ; } } for ( int i = 0 ; i < BootstrapConstants . MAX_POLL_ATTEMPTS && isValid ( ) ; i ++ ) { ReturnCode rc = write ( STATUS_START_COMMAND , R...
Waits for the server to be fully started .
37,302
private ReturnCode startStatusWait ( ServerLock lock ) { try { Thread . sleep ( BootstrapConstants . POLL_INTERVAL_MS ) ; } catch ( InterruptedException ex ) { Debug . printStackTrace ( ex ) ; return ReturnCode . ERROR_SERVER_START ; } if ( ! lock . testServerRunning ( ) ) { return ReturnCode . ERROR_SERVER_START ; } r...
Wait a bit because the server process could not be contacted and then verify that the server process is still running .
37,303
public ReturnCode stopServer ( boolean force ) { return write ( force ? FORCE_STOP_COMMAND : STOP_COMMAND , ReturnCode . REDUNDANT_ACTION_STATUS , ReturnCode . ERROR_SERVER_STOP ) ; }
Stop the server by issuing a stop instruction to the server listener
37,304
public ReturnCode introspectServer ( String dumpTimestamp , Set < JavaDumpAction > javaDumpActions ) { String command ; if ( javaDumpActions . isEmpty ( ) ) { command = INTROSPECT_COMMAND + DELIM + dumpTimestamp ; } else { StringBuilder commandBuilder = new StringBuilder ( ) . append ( INTROSPECT_JAVADUMP_COMMAND ) . a...
Dump the server by issuing a introspect instruction to the server listener
37,305
public ReturnCode javaDump ( Set < JavaDumpAction > javaDumpActions ) { StringBuilder commandBuilder = new StringBuilder ( JAVADUMP_COMMAND ) ; char sep = DELIM ; for ( JavaDumpAction javaDumpAction : javaDumpActions ) { commandBuilder . append ( sep ) . append ( javaDumpAction . toString ( ) ) ; sep = ',' ; } return w...
Create a java dump of the server JVM by issuing a javadump instruction to the server listener
37,306
public ReturnCode pause ( String targetArg ) { StringBuilder commandBuilder = new StringBuilder ( PAUSE_COMMAND ) ; char sep = DELIM ; if ( targetArg != null ) { commandBuilder . append ( sep ) . append ( targetArg ) ; } return write ( commandBuilder . toString ( ) , ReturnCode . SERVER_INACTIVE_STATUS , ReturnCode . E...
Attempt to Stop the inbound work to a server by issuing a pause request to the server .
37,307
public ReturnCode resume ( String targetArg ) { StringBuilder commandBuilder = new StringBuilder ( RESUME_COMMAND ) ; char sep = DELIM ; if ( targetArg != null ) { commandBuilder . append ( sep ) . append ( targetArg ) ; } return write ( commandBuilder . toString ( ) , ReturnCode . SERVER_INACTIVE_STATUS , ReturnCode ....
Resume Inbound work to a server by issuing a resume request to the server .
37,308
public boolean contain ( OidcTokenImplBase token ) { String key = token . getJwtId ( ) ; if ( key == null ) { return false ; } key = getCacheKey ( token ) ; long currentTimeMilliseconds = ( new Date ( ) ) . getTime ( ) ; synchronized ( primaryTable ) { Long exp = ( Long ) primaryTable . get ( key ) ; if ( exp != null )...
Find and return the object associated with the specified key . Add it if not already present .
37,309
public final ResourceException isValid ( int newAction ) { try { setState ( newAction , true ) ; } catch ( TransactionException exp ) { FFDCFilter . processException ( exp , "com.ibm.ws.rsadapter.spi.WSStateManager.isValid" , "385" , this ) ; return exp ; } return null ; }
If the action is valid return null . Otherwise return a TransactionException with the cause .
37,310
public boolean containsValue ( Object value ) throws ObjectManagerException { if ( getRoot ( ) != null ) return containsValue ( getRoot ( ) , value ) ; return false ; }
Searches this TreeMap for the specified value .
37,311
public Set entrySet ( ) throws ObjectManagerException { return new AbstractSetView ( ) { public long size ( ) { return size ; } public boolean contains ( Object object ) throws ObjectManagerException { if ( object instanceof Map . Entry ) { Map . Entry entry = ( Map . Entry ) object ; Object v1 = get ( entry . getKey (...
Answers a Set of the mappings contained in this TreeMap . Each element in the set is a Map . Entry . The set is backed by this TreeMap so changes to one are relected by the other . The set does not support adding .
37,312
public Object get ( Object key ) throws ObjectManagerException { Entry node = find ( key ) ; if ( node != null ) return node . value ; return null ; }
Answers the value of the mapping with the specified key .
37,313
public SortedMap headMap ( Object endKey ) { if ( comparator == null ) ( ( Comparable ) endKey ) . compareTo ( endKey ) ; else comparator . compare ( endKey , endKey ) ; return makeSubMap ( null , endKey ) ; }
Answers a SortedMap of the specified portion of this TreeMap which contains keys less than the end key . The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other .
37,314
public Collection keyCollection ( ) { if ( keyCollection == null ) { keyCollection = new AbstractCollectionView ( ) { public long size ( ) throws ObjectManagerException { return AbstractTreeMap . this . size ( ) ; } public Iterator iterator ( ) throws ObjectManagerException { return makeTreeMapIterator ( new AbstractMa...
Answers a Collection of the keys contained in this TreeMap . The set is backed by this TreeMap so changes to one are relected by the other . The Collection does not support adding .
37,315
public Object remove ( Object key ) throws ObjectManagerException { Entry node = find ( key ) ; if ( node == null ) return null ; Object result = node . value ; rbDelete ( node ) ; return result ; }
Removes a mapping with the specified key from this TreeMap .
37,316
public SortedMap subMap ( Object startKey , Object endKey ) { if ( comparator == null ) { if ( ( ( Comparable ) startKey ) . compareTo ( endKey ) <= 0 ) return makeSubMap ( startKey , endKey ) ; } else { if ( comparator . compare ( startKey , endKey ) <= 0 ) return makeSubMap ( startKey , endKey ) ; } throw new Illegal...
Answers a SortedMap of the specified portion of this TreeMap which contains keys greater or equal to the start key but less than the end key . The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other .
37,317
public SortedMap tailMap ( Object startKey ) { if ( comparator == null ) ( ( Comparable ) startKey ) . compareTo ( startKey ) ; else comparator . compare ( startKey , startKey ) ; return makeSubMap ( startKey , null ) ; }
Answers a SortedMap of the specified portion of this TreeMap which contains keys greater or equal to the start key . The returned SortedMap is backed by this TreeMap so changes to one are reflected by the other .
37,318
public Collection values ( ) { if ( values == null ) { values = new AbstractCollectionView ( ) { public long size ( ) throws ObjectManagerException { return AbstractTreeMap . this . size ( ) ; } public Iterator iterator ( ) throws ObjectManagerException { return makeTreeMapIterator ( new AbstractMapEntry . Type ( ) { p...
Answers a Collection of the values contained in this TreeMap . The collection is backed by this TreeMap so changes to one are relected by the other . The collection does not support adding .
37,319
public static void assignMongoServers ( LibertyServer libertyServer ) throws Exception { MongoServerSelector mongoServerSelector = new MongoServerSelector ( libertyServer ) ; mongoServerSelector . updateLibertyServerMongos ( ) ; }
Reads a server configuration and replaces the placeholder values with an available host and port as specified in the mongo . properties file
37,320
private Map < String , List < MongoElement > > getMongoElements ( ) throws Exception { for ( MongoElement mongo : serverConfig . getMongos ( ) ) { addMongoElementToMap ( mongo ) ; } for ( MongoDBElement mongoDB : serverConfig . getMongoDBs ( ) ) { if ( mongoDB . getMongo ( ) != null ) { addMongoElementToMap ( mongoDB ....
Creates a mapping of a Mongo server placeholder value to the one or more mongo elements in the server . xml containing that placeholder
37,321
private void updateMongoElements ( String serverPlaceholder , ExternalTestService mongoService ) { Integer [ ] port = { Integer . valueOf ( mongoService . getPort ( ) ) } ; for ( MongoElement mongo : mongoElements . get ( serverPlaceholder ) ) { mongo . setHostNames ( mongoService . getAddress ( ) ) ; mongo . setPorts ...
For the mongo elements containing the given placeholder value the host and port placeholder values in the mongo element are replaced with an actual host and port of an available mongo server .
37,322
private static boolean validateMongoConnection ( ExternalTestService mongoService ) { String method = "validateMongoConnection" ; MongoClient mongoClient = null ; String host = mongoService . getAddress ( ) ; int port = mongoService . getPort ( ) ; File trustStore = null ; MongoClientOptions . Builder optionsBuilder = ...
Creates a connection to the mongo server at the given location using the mongo java client .
37,323
private static SSLSocketFactory getSocketFactory ( File trustStore ) throws KeyStoreException , FileNotFoundException , IOException , NoSuchAlgorithmException , CertificateException , KeyManagementException { KeyStore keystore = KeyStore . getInstance ( "JKS" ) ; InputStream truststoreInputStream = null ; try { trustst...
Returns an SSLSocketFactory needed to connect to an SSL mongo server . The socket factory is created using the testTruststore . jks .
37,324
public static Locale converterTagLocaleFromString ( String name ) { try { Locale locale ; StringTokenizer st = new StringTokenizer ( name , "_" ) ; String language = st . nextToken ( ) ; if ( st . hasMoreTokens ( ) ) { String country = st . nextToken ( ) ; if ( st . hasMoreTokens ( ) ) { String variant = st . nextToken...
Convert locale string used by converter tags to locale .
37,325
public void incrementHeadSequenceNumber ( ConcurrentSubList . Link link ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "incrementheadSequenceNumber" , new Object [ ] { link } ) ; if ( link . next == null ) { headSequenceNumber ++ ...
Increment the headSequenceNumber after removal of a link in a subList . Caller must already be synchronized on headSequenceNumberLock .
37,326
private void resetTailSequenceNumber ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "resetTailSequenceNumber" ) ; for ( int i = 0 ; i < subListTokens . length ; i ++ ) { subLists [ i ] = ( ( ConcurrentSubList ) subListTokens [ i...
Reset the tailSequenceNumber . Caller must be synchronized on tailSequenceNumberLock .
37,327
protected ConcurrentSubList . Link insert ( Token token , ConcurrentSubList . Link insertPoint , Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "insert" , new Object [ ] { token , insertPoint , transaction ...
Insert before the given link .
37,328
public void activate ( ComponentContext compcontext , Map < String , Object > properties ) { String methodName = "activate" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Activating the WebContainer bundle" ) ; } WebContainer . instance . set ( this ) ; this . context ...
Activate the web container as a DS component .
37,329
@ FFDCIgnore ( Exception . class ) public void deactivate ( ComponentContext componentContext ) { String methodName = "deactivate" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Deactivating the WebContainer bundle" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) &...
Deactivate the web container as a DS component .
37,330
@ Reference ( service = ClassLoadingService . class , name = "classLoadingService" ) protected void setClassLoadingService ( ServiceReference < ClassLoadingService > ref ) { classLoadingSRRef . setReference ( ref ) ; }
DS method for setting the class loading service reference .
37,331
@ Reference ( policy = ReferencePolicy . DYNAMIC ) protected void setEncodingService ( EncodingUtils encUtils ) { encodingServiceRef . set ( encUtils ) ; }
DS method for setting the Encoding service .
37,332
@ Reference ( service = SessionHelper . class , name = "sessionHelper" ) protected void setSessionHelper ( ServiceReference < SessionHelper > ref ) { sessionHelperSRRef . setReference ( ref ) ; }
Set the reference to the session helper service .
37,333
public ModuleMetaData createModuleMetaData ( ExtendedModuleInfo moduleInfo ) throws MetaDataException { WebModuleInfo webModule = ( WebModuleInfo ) moduleInfo ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "createModuleMetaData: " + webModule . getName ( ) + " " + webMo...
This will create the metadata for a web module in the web container
37,334
protected void registerMBeans ( WebModuleMetaDataImpl webModule , com . ibm . wsspi . adaptable . module . Container container ) { String methodName = "registerMBeans" ; String appName = webModule . getApplicationMetaData ( ) . getName ( ) ; String webAppName = webModule . getName ( ) ; String debugName ; if ( TraceCom...
Check for the JSR77 runtime and if available use it to register module and servlet mbeans . As a side effect assign the mbean registration to the web module metadata and to the servlet metadata .
37,335
public void stopModule ( ExtendedModuleInfo moduleInfo ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "stopModule()" , ( ( WebModuleInfo ) moduleInfo ) . getName ( ) ) ; } WebModuleInfo webModule = ( WebModuleInfo ) moduleInfo ; try { DeployedModule dMod = this . depl...
This will stop a web module in the web container
37,336
@ Reference ( cardinality = ReferenceCardinality . MANDATORY , policy = ReferencePolicy . DYNAMIC , policyOption = ReferencePolicyOption . GREEDY ) protected void setConnContextPool ( SRTConnectionContextPool pool ) { this . connContextPool = pool ; }
Only DS should invoke this method
37,337
public void refreshEntry ( com . ibm . wsspi . cache . CacheEntry ce ) { cacheInstance . refreshEntry ( ce . cacheEntry ) ; }
This method moves the specified entry to the end of the LRU queue .
37,338
public CacheEntry getEntryDisk ( Object cacheId ) { CacheEntry cacheEntry = new CacheEntry ( cacheInstance . getEntryDisk ( cacheId ) ) ; return cacheEntry ; }
This method returns the cache entry specified by cache ID from the disk cache .
37,339
public com . ibm . wsspi . cache . CacheEntry getEntry ( Object cacheId ) { CacheEntry cacheEntry = new CacheEntry ( cacheInstance . getEntry ( cacheId ) ) ; return cacheEntry ; }
This method returns an instance of CacheEntry specified cache ID .
37,340
public static Object [ ] getEncoding ( JspInputSource inputSource ) throws IOException , JspCoreException { InputStream inStream = XMLEncodingDetector . getInputStream ( inputSource ) ; XMLEncodingDetector detector = new XMLEncodingDetector ( ) ; Object [ ] ret = detector . getEncoding ( inStream ) ; inStream . close (...
Autodetects the encoding of the XML document supplied by the given input stream .
37,341
private Reader createReader ( InputStream inputStream , String encoding , Boolean isBigEndian ) throws IOException , JspCoreException { if ( encoding == null ) { encoding = "UTF-8" ; } String ENCODING = encoding . toUpperCase ( Locale . ENGLISH ) ; if ( ENCODING . equals ( "UTF-8" ) ) { return new UTF8Reader ( inputStr...
Creates a reader capable of reading the given input stream in the specified encoding .
37,342
private Object [ ] getEncodingName ( byte [ ] b4 , int count ) { if ( count < 2 ) { return new Object [ ] { "UTF-8" , null , Boolean . FALSE } ; } int b0 = b4 [ 0 ] & 0xFF ; int b1 = b4 [ 1 ] & 0xFF ; if ( b0 == 0xFE && b1 == 0xFF ) { return new Object [ ] { "UTF-16BE" , Boolean . TRUE } ; } if ( b0 == 0xFF && b1 == 0x...
Returns the IANA encoding name that is auto - detected from the bytes specified with the endian - ness of that encoding where appropriate .
37,343
final boolean load ( int offset , boolean changeEntity ) throws IOException { int length = fCurrentEntity . mayReadChunks ? ( fCurrentEntity . ch . length - offset ) : ( DEFAULT_XMLDECL_BUFFER_SIZE ) ; int count = fCurrentEntity . reader . read ( fCurrentEntity . ch , offset , length ) ; boolean entityChanged = false ;...
Loads a chunk of text .
37,344
public String scanPseudoAttribute ( boolean scanningTextDecl , XMLString value ) throws IOException , JspCoreException { String name = scanName ( ) ; if ( name == null ) { throw new JspCoreException ( "jsp.error.xml.pseudoAttrNameExpected" ) ; } skipSpaces ( ) ; if ( ! skipChar ( '=' ) ) { reportFatalError ( scanningTe...
Scans a pseudo attribute .
37,345
private void reportFatalError ( String msgId , String arg ) throws JspCoreException { throw new JspCoreException ( msgId , new Object [ ] { arg } ) ; }
Convenience function used in all XML scanners .
37,346
@ SuppressWarnings ( "unchecked" ) public static < T > T coerceToType ( FacesContext facesContext , Object value , Class < ? extends T > desiredClass ) { if ( value == null ) { return null ; } try { ExpressionFactory expFactory = facesContext . getApplication ( ) . getExpressionFactory ( ) ; return ( T ) expFactory . c...
to unified EL in JSF 1 . 2
37,347
private String getNarrowestScope ( FacesContext facesContext , String valueExpression ) { List < String > expressions = extractExpressions ( valueExpression ) ; String narrowestScope = expressions . size ( ) == 1 ? NONE : APPLICATION ; boolean scopeFound = false ; for ( String expression : expressions ) { String valueS...
Gets the narrowest scope to which the ValueExpression points .
37,348
private String getFirstSegment ( String expression ) { int indexDot = expression . indexOf ( '.' ) ; int indexBracket = expression . indexOf ( '[' ) ; if ( indexBracket < 0 ) { return indexDot < 0 ? expression : expression . substring ( 0 , indexDot ) ; } if ( indexDot < 0 ) { return expression . substring ( 0 , indexB...
Extract the first expression segment that is the substring up to the first . or [
37,349
@ SuppressWarnings ( "unchecked" ) public < T > T get ( EventLocal < T > key ) { EventLocalMap < EventLocal < ? > , Object > map = getMap ( key ) ; if ( null == map ) { return key . initialValue ( ) ; } return ( T ) map . get ( key ) ; }
Query the possible value for the provided EventLocal .
37,350
public < T > void set ( EventLocal < T > key , Object value ) { EventLocalMap < EventLocal < ? > , Object > map = getMap ( key ) ; if ( null == map ) { map = new EventLocalMap < EventLocal < ? > , Object > ( ) ; if ( key . isInheritable ( ) ) { this . inheritableLocals = map ; } else { this . locals = map ; } } map . p...
Set the value for the provided EventLocal on this event .
37,351
@ SuppressWarnings ( "unchecked" ) public < T > T remove ( EventLocal < T > key ) { EventLocalMap < EventLocal < ? > , Object > map = getMap ( key ) ; if ( null != map ) { return ( T ) map . remove ( key ) ; } return null ; }
Remove any existing value for the provided EventLocal .
37,352
@ SuppressWarnings ( "unchecked" ) public < T > T getContextData ( String name ) { T rc = null ; if ( null != this . inheritableLocals ) { rc = ( T ) this . inheritableLocals . get ( name ) ; } if ( null == rc && null != this . locals ) { rc = ( T ) this . locals . get ( name ) ; } return rc ; }
Look for the EventLocal of the given name in this particular Event instance .
37,353
private static void setSystemProperties ( ) { String loggingManager = System . getProperty ( "java.util.logging.manager" ) ; String managementBuilderInitial = System . getProperty ( "javax.management.builder.initial" ) ; if ( managementBuilderInitial == null ) System . setProperty ( "javax.management.builder.initial" ,...
Set system properties for JVM singletons .
37,354
final void setBodyType ( JmsBodyType value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setBodyType" , value ) ; setSubtype ( value . toByte ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setBo...
Set the type of the message body . This method is only used by message constructors .
37,355
private final Set < String > getNonSmokeAndMirrorsPropertyNameSet ( ) { Set < String > names = new HashSet < String > ( ) ; if ( mayHaveJmsUserProperties ( ) ) { names . addAll ( getJmsUserPropertyMap ( ) . keySet ( ) ) ; } if ( mayHaveMappedJmsSystemProperties ( ) ) { names . addAll ( getJmsSystemPropertyMap ( ) . key...
Return a Set of just the non - smoke - and - mirrors property names
37,356
public Object getJMSXGroupSeq ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getJMSXGroupSeq" ) ; Object result = null ; if ( mayHaveMappedJmsSystemProperties ( ) ) { result = getObjectProperty ( SIProperties . JMSXGroupSeq ) ; } if ( TraceComponent . isAny...
getJMSXGroupSeq Return the value of the JMSXGroupSeq property if it exists . We can return it as object as that is all JMS API wants . Actually it only really cares whether it exists but we ll return Object rather than changing the callng code unnecessarily .
37,357
private void processSpecialSubjects ( ConfigurationAdmin configAdmin , String roleName , Dictionary < String , Object > roleProps , Set < String > pids ) { String [ ] specialSubjectPids = ( String [ ] ) roleProps . get ( CFG_KEY_SPECIAL_SUBJECT ) ; if ( specialSubjectPids == null || specialSubjectPids . length == 0 ) {...
Read and process all the specialSubject elements
37,358
public TxCollaboratorConfig preInvoke ( final HttpServletRequest request , final boolean isServlet23 ) throws ServletException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Calling preInvoke. Request=" + request + " | isServlet23=" + isServlet23 ) ; } try { final Embe...
Collaborator preInvoke .
37,359
private void resumeSuspendedLTC ( LocalTransactionCurrent ltCurrent , Object txConfig ) throws ServletException { if ( txConfig instanceof TxCollaboratorConfig ) { Object suspended = ( ( TxCollaboratorConfig ) txConfig ) . getSuspendTx ( ) ; if ( suspended instanceof LocalTransactionCoordinator ) { if ( TraceComponent ...
Resumes the LTC that was suspended during preInvoke if one was suspended .
37,360
public SerializationObject getSerializationObject ( ) { SerializationObject object ; synchronized ( ivListOfObjects ) { if ( ivListOfObjects . isEmpty ( ) ) { object = createNewObject ( ) ; } else { object = ivListOfObjects . remove ( ivListOfObjects . size ( ) - 1 ) ; } } return object ; }
Gets the next avaialable serialization object .
37,361
public void returnSerializationObject ( SerializationObject object ) { synchronized ( ivListOfObjects ) { if ( ivListOfObjects . size ( ) < MAXIMUM_NUM_OF_OBJECTS ) { ivListOfObjects . add ( object ) ; } } }
Returns a serialization object back into the pool .
37,362
public void add ( Object dependency , ValueSet valueSet ) { if ( dependency == null ) { throw new IllegalArgumentException ( "dependency cannot be null" ) ; } if ( valueSet != null ) { dependencyToEntryTable . put ( dependency , valueSet ) ; } }
This adds a valueSet for the specified dependency .
37,363
public boolean removeEntry ( Object dependency , Object entry ) { boolean found = false ; ValueSet valueSet = ( ValueSet ) dependencyToEntryTable . get ( dependency ) ; if ( valueSet == null ) { return found ; } found = valueSet . remove ( entry ) ; if ( valueSet . size ( ) == 0 ) removeDependency ( dependency ) ; retu...
SKS - O
37,364
protected void modified ( String id , Map < String , Object > properties ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( this , tc , "modified " + id , properties ) ; } config = properties ; myProps = null ; }
DS method to modify this component .
37,365
protected ReadableLogRecord getReadableLogRecord ( long expectedSequenceNumber ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getReadableLogRecord" , new java . lang . Object [ ] { this , new Long ( expectedSequenceNumber ) } ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Creating readable log record to r...
Read a composite record from the disk . The caller supplies the expected sequence number of the record and this method confirms that this matches the next record recovered .
37,366
void fileClose ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fileClose" , this ) ; if ( _fileChannel != null ) { try { if ( _outstandingWritableLogRecords . get ( ) == 0 && ! _exceptionInForce ) { force ( ) ; _logFileHeader . setCleanShutdown ( ) ; writeFileHeader ( false ) ; force...
Close the file managed by this LogFileHandle instance .
37,367
public WriteableLogRecord getWriteableLogRecord ( int recordLength , long sequenceNumber ) throws InternalLogException { if ( ! _headerFlushedFollowingRestart ) { writeFileHeader ( true ) ; _headerFlushedFollowingRestart = true ; } if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getWriteableLogRecord" , new Object [ ...
Get a new WritableLogRecord for the log file managed by this LogFileHandleInstance . The size of the record must be specified along with the record s sequence number . It is the caller s responsbility to ensure that both the sequence number is correct and that the record written using the returned WritableLogRecord is ...
37,368
private void writeFileHeader ( boolean maintainPosition ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "writeFileHeader" , new java . lang . Object [ ] { this , new Boolean ( maintainPosition ) } ) ; try { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Writing header for log file " ...
Writes the file header stored in _logFileHeader to the file managed by this LogFileHandle instance .
37,369
private void writeFileStatus ( boolean maintainPosition ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "writeFileStatus" , new java . lang . Object [ ] { this , new Boolean ( maintainPosition ) } ) ; if ( _logFileHeader . status ( ) == LogFileHeader . STATUS_INVALID ) { if ( tc . isEnt...
Updates the status field of the file managed by this LogFileHandle instance . The status field is stored in _logFileHeader .
37,370
protected LogFileHeader logFileHeader ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logFileHeader" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logFileHeader" , _logFileHeader ) ; return _logFileHeader ; }
Accessor for the log file header object assoicated with this LogFileHandle instance .
37,371
public byte [ ] getServiceData ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getServiceData" , this ) ; byte [ ] serviceData = null ; if ( _logFileHeader != null ) { serviceData = _logFileHeader . getServiceData ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getServiceData" , RLSUtils . toHexString ...
Accessor for the service data assoicated with this LogFileHandle instance .
37,372
public int freeBytes ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "freeBytes" , this ) ; int freeBytes = 0 ; try { int currentCursorPosition = _fileBuffer . position ( ) ; int fileLength = _fileBuffer . capacity ( ) ; freeBytes = fileLength - currentCursorPosition ; if ( freeBytes < 0 ) { freeBytes = 0 ; } } ...
Returns the number of free bytes remaining in the file associated with this LogFileHandle instance .
37,373
public String fileName ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fileName" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "fileName" , _fileName ) ; return _fileName ; }
Returns the name of the file associated with this LogFileHandle instance
37,374
void keypointStarting ( long nextRecordSequenceNumber ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "keypointStarting" , new Object [ ] { new Long ( nextRecordSequenceNumber ) , this } ) ; _logFileHeader . keypointStarting ( nextRecordSequenceNumber ) ; try { writeFileHeader ( false )...
Informs the LogFileHandle instance that a keypoint operation is about begin into the file associated with this LogFileHandle instance . The status of the log file is updated to KEYPOINTING and written to disk .
37,375
void keypointComplete ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "keypointComplete" , this ) ; _logFileHeader . keypointComplete ( ) ; try { writeFileStatus ( true ) ; } catch ( InternalLogException exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.LogFile...
Informs the LogFileHandle instance that a keypoint operation into the file has completed . The status of the log file is updated to ACTIVE and written to disk .
37,376
void becomeInactive ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "becomeInactive" , this ) ; _logFileHeader . changeStatus ( LogFileHeader . STATUS_INACTIVE ) ; try { writeFileStatus ( false ) ; } catch ( InternalLogException exc ) { FFDCFilter . processException ( exc , "com.ibm.w...
This method is invoked to inform the LogFileHandle instance that the file it manages is no longer required by the recovery log serivce . The status field stored in the header is updated to INACTIVE .
37,377
public void fileExtend ( int newFileSize ) throws LogAllocationException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fileExtend" , new Object [ ] { new Integer ( newFileSize ) , this } ) ; final int fileLength = _fileBuffer . capacity ( ) ; if ( fileLength < newFileSize ) { try { int originalPosition = _fileBuf...
Extend the physical log file . If newFileSize is larger than the current file size the log file will extended so that it is newFileSize kilobytes long . If newFileSize is equal to or less than the current file size the current log file will be unchanged .
37,378
protected void force ( ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "force" , this ) ; try { if ( _isMapped ) { ( ( MappedByteBuffer ) _fileBuffer ) . force ( ) ; } else { writePendingToFile ( ) ; _fileChannel . force ( false ) ; } } catch ( java . io . IOException ioe ) { FFDCFilter...
Forces the contents of the memory - mapped view of the log file to disk . Having invoked this method the caller can be certain that any data added to the log as part of a prior log write is now stored persistently on disk .
37,379
private String normalize ( String alias ) { String regExp = alias . replaceAll ( "[\\.]" , "\\\\\\." ) ; regExp = regExp . replaceAll ( "[*]" , "\\.\\*" ) ; return regExp ; }
This method normalizes the alias into a valid regular expression
37,380
public Iterator targetMappings ( ) { Collection vHosts = vHostTable . values ( ) ; List l = new ArrayList ( ) ; l . addAll ( vHosts ) ; return l . listIterator ( ) ; }
Returns an enumeration of all the target mappings added to this mapper
37,381
public final BehindRef insert ( final AbstractItemLink insertAil ) { final long insertPosition = insertAil . getPosition ( ) ; boolean inserted = false ; BehindRef addref = null ; BehindRef lookat = _lastLinkBehind ; while ( ! inserted && ( lookat != null ) ) { AbstractItemLink lookatAil = lookat . getAIL ( ) ; if ( lo...
Inserts a reference to an AIL in the list of AILs behind the curent position of the cursor . The insertion is performed in position order . The list is composed of weak references and any which are discovered to refer to objects no longer on the heap are removed as we go .
37,382
private final void _remove ( final BehindRef removeref ) { if ( _firstLinkBehind != null ) { if ( removeref == _firstLinkBehind ) { if ( removeref == _lastLinkBehind ) { _firstLinkBehind = null ; _lastLinkBehind = null ; } else { BehindRef nextref = removeref . _next ; removeref . _next = null ; nextref . _prev = null ...
Removes the first AIL in the list of AILs behind the current position of the cursor . The list may empty completely as a result .
37,383
protected boolean invokeTraceRouters ( RoutedMessage routedTrace ) { boolean retMe = true ; LogRecord logRecord = routedTrace . getLogRecord ( ) ; try { if ( ! ( counterForTraceRouter . incrementCount ( ) > 2 ) ) { if ( logRecord != null ) { Level level = logRecord . getLevel ( ) ; int levelValue = level . intValue ( )...
Route only trace log records . Messages including Systemout err will not be routed to trace source to avoid duplicate entries
37,384
protected void publishTraceLogRecord ( TraceWriter detailLog , LogRecord logRecord , Object id , String formattedMsg , String formattedVerboseMsg ) { if ( formattedVerboseMsg == null ) { formattedVerboseMsg = formatter . formatVerboseMessage ( logRecord , formattedMsg , false ) ; } RoutedMessage routedTrace = new Route...
Publish a trace log record .
37,385
public void setMessageRouter ( MessageRouter msgRouter ) { externalMessageRouter . set ( msgRouter ) ; if ( msgRouter instanceof WsMessageRouter ) { setWsMessageRouter ( ( WsMessageRouter ) msgRouter ) ; } }
Inject the SPI MessageRouter .
37,386
public void unsetMessageRouter ( MessageRouter msgRouter ) { externalMessageRouter . compareAndSet ( msgRouter , null ) ; if ( msgRouter instanceof WsMessageRouter ) { unsetWsMessageRouter ( ( WsMessageRouter ) msgRouter ) ; } }
Un - inject .
37,387
protected void initializeWriters ( LogProviderConfigImpl config ) { messagesLog = FileLogHolder . createFileLogHolder ( messagesLog , newFileLogHeader ( false , config ) , config . getLogDirectory ( ) , config . getMessageFileName ( ) , config . getMaxFiles ( ) , config . getMaxFileBytes ( ) , config . getNewLogsOnStar...
Initialize the log holders for messages and trace . If the TrService is configured at bootstrap time to use JSR - 47 logging the traceLog will not be created here as the LogRecord should be routed to logger rather than being formatted for the trace file .
37,388
public Object load ( String batchId ) { Object loadedArtifact ; loadedArtifact = getArtifactById ( batchId ) ; if ( loadedArtifact != null ) { if ( logger . isLoggable ( Level . FINEST ) ) { logger . finest ( "load: batchId: " + batchId + ", artifact: " + loadedArtifact + ", artifact class: " + loadedArtifact . getClas...
Use CDI to load the artifact with the given ID .
37,389
protected Bean < ? > getUniqueBeanByBeanName ( BeanManager bm , String batchId ) { Bean < ? > match = null ; Set < Bean < ? > > beans = bm . getBeans ( batchId ) ; try { match = bm . resolve ( beans ) ; } catch ( AmbiguousResolutionException e ) { return null ; } return match ; }
Use the given BeanManager to lookup a unique CDI - registered bean with bean name equal to batchId using EL matching rules .
37,390
@ FFDCIgnore ( BatchCDIAmbiguousResolutionCheckedException . class ) protected Bean < ? > getUniqueBeanForBatchXMLEntry ( BeanManager bm , String batchId ) { ClassLoader loader = getContextClassLoader ( ) ; BatchXMLMapper batchXMLMapper = new BatchXMLMapper ( loader ) ; Class < ? > clazz = batchXMLMapper . getArtifactB...
Use the given BeanManager to lookup a unique CDI - registered bean with bean class equal to the batch . xml entry mapped to be the batchId parameter
37,391
@ FFDCIgnore ( { ClassNotFoundException . class , BatchCDIAmbiguousResolutionCheckedException . class } ) protected Bean < ? > getUniqueBeanForClassName ( BeanManager bm , String className ) { try { Class < ? > clazz = getContextClassLoader ( ) . loadClass ( className ) ; return findUniqueBeanForClass ( bm , clazz ) ; ...
Use the given BeanManager to lookup the set of CDI - registered beans with the given class name .
37,392
private synchronized void createExecutor ( ) { if ( componentConfig == null ) { return ; } if ( threadPoolController != null ) threadPoolController . deactivate ( ) ; ThreadPoolExecutor oldPool = threadPool ; poolName = ( String ) componentConfig . get ( "name" ) ; String threadGroupName = poolName + " Thread Group" ; ...
Create a thread pool executor with the configured attributes from this component config .
37,393
private < T > Collection < ? extends Callable < T > > wrap ( Collection < ? extends Callable < T > > tasks ) { List < Callable < T > > wrappedTasks = new ArrayList < Callable < T > > ( ) ; Iterator < ? extends Callable < T > > i = tasks . iterator ( ) ; while ( i . hasNext ( ) ) { Callable < T > c = wrap ( i . next ( )...
This is private so handling both interceptors and wrapping in this method for simplicity
37,394
public JsMessage next ( ) throws MessageDecodeFailedException , SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException , SINotAuthorizedException { if ( TraceComponent . isAnyTracing...
Returns the next message for a browse .
37,395
public void close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException , SIConnectionDroppedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; if ( ! closed ) { convHelper . closeSession ( ) ; queue . purge ( proxyQueueId ) ; ...
Closes the proxy queue .
37,396
public void put ( CommsByteBuffer msgBuffer , short msgBatch , boolean lastInBatch , boolean chunk ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , new Object [ ] { msgBuffer , msgBatch , lastInBatch , chunk } ) ; QueueData queueData = null ; if ( chunk ...
Places a browse message on the queue .
37,397
public void setBrowserSession ( BrowserSessionProxy browserSession ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setBrowserSession" , browserSession ) ; if ( this . browserSession != null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "...
Sets the browser session this proxy queue is being used in conjunction with .
37,398
private void readObject ( ObjectInputStream in ) throws IOException , ClassNotFoundException { GetField fields = in . readFields ( ) ; principal = ( String ) fields . get ( PRINCIPAL , null ) ; jwt = ( String ) fields . get ( JWT , null ) ; type = ( String ) fields . get ( TYPE , null ) ; handleClaims ( jwt ) ; }
Deserialize json web token .
37,399
private void writeObject ( ObjectOutputStream out ) throws IOException { PutField fields = out . putFields ( ) ; fields . put ( PRINCIPAL , principal ) ; fields . put ( JWT , jwt ) ; fields . put ( TYPE , type ) ; out . writeFields ( ) ; }
Serialize json web token .