idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
160,400
public static final void logMessage ( Level level , String key , Object ... args ) { if ( WsLevel . AUDIT . equals ( level ) ) Tr . audit ( tc , key , args ) ; else if ( WsLevel . ERROR . equals ( level ) ) Tr . error ( tc , key , args ) ; else if ( Level . INFO . equals ( level ) ) Tr . info ( tc , key , args ) ; else...
Logs a message from the J2CAMessages file .
160,401
public static String getSessionID ( HttpServletRequest req ) { String sessionID = null ; final HttpServletRequest f_req = req ; try { sessionID = AccessController . doPrivileged ( new PrivilegedExceptionAction < String > ( ) { public String run ( ) throws Exception { HttpSession session = f_req . getSession ( ) ; if ( ...
Return the session id if the request has an HttpSession otherwise return null .
160,402
public static String getRequestScheme ( HttpServletRequest req ) { String scheme ; if ( req . getScheme ( ) != null ) scheme = req . getScheme ( ) . toUpperCase ( ) ; else scheme = AuditEvent . REASON_TYPE_HTTP ; return scheme ; }
Get the scheme from the request - generally HTTP or HTTPS
160,403
public static String getRequestMethod ( HttpServletRequest req ) { String method ; if ( req . getMethod ( ) != null ) method = req . getMethod ( ) . toUpperCase ( ) ; else method = AuditEvent . TARGET_METHOD_GET ; return method ; }
Get the method from the request - generally GET or POST
160,404
public Object get ( ) { Object oObject = null ; synchronized ( this ) { if ( lastEntry > - 1 ) { oObject = free [ lastEntry ] ; free [ lastEntry ] = null ; if ( lastEntry == firstEntry ) { lastEntry = - 1 ; firstEntry = - 1 ; } else if ( lastEntry > 0 ) { lastEntry = lastEntry - 1 ; } else { lastEntry = poolSize - 1 ; ...
Gets an Object from the pool and returns it . If there are currently no entries in the pool then a new object will be created .
160,405
public Object put ( Object object ) { Object returnVal = null ; long currentTime = CHFWBundle . getApproxTime ( ) ; synchronized ( this ) { lastEntry ++ ; if ( lastEntry == poolSize ) { lastEntry = 0 ; } returnVal = free [ lastEntry ] ; free [ lastEntry ] = object ; timeFreed [ lastEntry ] = currentTime ; if ( lastEntr...
Puts an Object into the free pool . If the free pool is full then this object will overlay the oldest object in the pool .
160,406
protected void putBatch ( Object [ ] objectArray ) { int index = 0 ; synchronized ( this ) { while ( index < objectArray . length && objectArray [ index ] != null ) { put ( objectArray [ index ] ) ; index ++ ; } } return ; }
Puts a set of Objects into the free pool . If the free pool is full then this object will overlay the oldest object in the pool .
160,407
public JsJmsMessage createJmsMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsMessage" ) ; JsJmsMessage msg = null ; try { msg = new JsJmsMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch ( MessageDecodeF...
Create a new empty null - bodied JMS Message . To be called by the API component .
160,408
public JsJmsBytesMessage createJmsBytesMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsBytesMessage" ) ; JsJmsBytesMessage msg = null ; try { msg = new JsJmsBytesMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ;...
Create a new empty JMS BytesMessage . To be called by the API component .
160,409
public JsJmsMapMessage createJmsMapMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsMapMessage" ) ; JsJmsMapMessage msg = null ; try { msg = new JsJmsMapMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch (...
Create a new empty JMS MapMessage . To be called by the API component .
160,410
public JsJmsObjectMessage createJmsObjectMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsObjectMessage" ) ; JsJmsObjectMessage msg = null ; try { msg = new JsJmsObjectMessageImpl ( MfpConstants . CONSTRUCTOR_NO_O...
Create a new empty JMS ObjectMessage . To be called by the API component .
160,411
public JsJmsStreamMessage createJmsStreamMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsStreamMessage" ) ; JsJmsStreamMessage msg = null ; try { msg = new JsJmsStreamMessageImpl ( MfpConstants . CONSTRUCTOR_NO_O...
Create a new empty JMS StreamMessage . To be called by the API component .
160,412
public JsJmsTextMessage createJmsTextMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsTextMessage" ) ; JsJmsTextMessage msg = null ; try { msg = new JsJmsTextMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } ca...
Create a new empty JMS TextMessage . To be called by the API component .
160,413
private void saveDecryptedPositions ( ) { for ( int i = 0 ; i < decryptedNetPosInfo . length ; i ++ ) { decryptedNetPosInfo [ i ] = 0 ; } if ( null != getBuffers ( ) ) { WsByteBuffer [ ] buffers = getBuffers ( ) ; if ( buffers . length > decryptedNetPosInfo . length ) { decryptedNetPosInfo = new int [ buffers . length ...
Save the starting positions of the output buffers so that we can properly calculate the amount of data being returned by the read .
160,414
public VirtualConnection read ( long numBytes , TCPReadCompletedCallback userCallback , boolean forceQueue , int timeout ) { return read ( numBytes , userCallback , forceQueue , timeout , false ) ; }
Note a separate thread is not spawned to handle the decryption . The asynchronous behavior of this call will take place when the device side channel makes a nonblocking IO call and the request is potentially moved to a separate thread .
160,415
private void handleAsyncComplete ( boolean forceQueue , TCPReadCompletedCallback inCallback ) { boolean fireHere = true ; if ( forceQueue ) { queuedWork . setCompleteParameters ( getConnLink ( ) . getVirtualConnection ( ) , this , inCallback ) ; EventEngine events = SSLChannelProvider . getEventService ( ) ; if ( null ...
This method handles calling the complete method of the callback as required by an async read . Appropriate action is taken based on the setting of the forceQueue parameter . If it is true the complete callback is called on a separate thread . Otherwise it is called right here .
160,416
private void handleAsyncError ( boolean forceQueue , IOException exception , TCPReadCompletedCallback inCallback ) { boolean fireHere = true ; if ( forceQueue ) { queuedWork . setErrorParameters ( getConnLink ( ) . getVirtualConnection ( ) , this , inCallback , exception ) ; EventEngine events = SSLChannelProvider . ge...
This method handles errors when they occur during the code path of an async read . It takes appropriate action based on the setting of the forceQueue parameter . If it is true the error callback is called on a separate thread . Otherwise it is called right here .
160,417
public long readUnconsumedDecData ( ) { long totalBytesRead = 0L ; if ( unconsumedDecData != null ) { if ( getBuffer ( ) == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Caller needs buffer, unconsumed data: " + SSLUtils . getBufferTraceInfo ( unconsumedDecData...
This method is called when a read is requested . It checks to see if any data is left over from the previous read but there wasn t space in the buffers to store the result .
160,418
protected void getNetworkBuffer ( long requestedSize ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getNetworkBuffer: size=" + requestedSize ) ; } this . netBufferMark = 0 ; int allocationSize = getConnLink ( ) . getPacketBufferSize ( ) ; if ( allocationSize < reques...
Get the buffers that the device channel should read into . These buffers get reused over the course of multiple reads . The size of the buffers are determined by either the allocation size specified by the application channel or if that wasn t set the max packet buffer size specified in the SSL engine .
160,419
private void cleanupDecBuffers ( ) { if ( null != this . decryptedNetBuffers && ( callerRequiredAllocation || decryptedNetBufferReleaseRequired ) ) { WsByteBufferUtils . releaseBufferArray ( this . decryptedNetBuffers ) ; this . decryptedNetBuffers = null ; } }
Utility method to handle releasing the decrypted network buffers that we may or may not own at this point .
160,420
public void close ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "close, vc=" + getVCHash ( ) ) ; } synchronized ( closeSync ) { if ( closeCalled ) { return ; } closeCalled = true ; if ( null != this . netBuffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && t...
Release the potential buffer that were created
160,421
private SSLEngineResult doHandshake ( boolean async ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "doHandshake" ) ; } SSLEngineResult sslResult ; int appSize = getConnLink ( ) . getAppBufferSize ( ) ; int packetSize = getConnLink ( ) . getPacketBuf...
When data is read there is always the change the a renegotiation will take place . If so this method will be called . Note it is used by both the sync and async writes .
160,422
protected ContextualStorage getContextualStorage ( boolean createIfNotExist , String clientWindowFlowId ) { if ( clientWindowFlowId == null ) { throw new ContextNotActiveException ( "FlowScopedContextImpl: no current active flow" ) ; } if ( createIfNotExist ) { return getFlowScopeBeanHolder ( ) . getContextualStorage (...
An implementation has to return the underlying storage which contains the items held in the Context .
160,423
protected void proxyReadHandshake ( ) { connLink . getReadInterface ( ) . setJITAllocateSize ( 1024 ) ; if ( connLink . isAsyncConnect ( ) ) { this . proxyReadCB = new ProxyReadCallback ( ) ; readProxyResponse ( connLink . getVirtualConnection ( ) ) ; } else { int rc = STATUS_NOT_DONE ; while ( rc == STATUS_NOT_DONE ) ...
Complete the proxy connect handshake by reading for the response and validating any data .
160,424
protected int checkResponse ( TCPReadRequestContext rsc ) { WsByteBuffer [ ] buffers = rsc . getBuffers ( ) ; if ( null == buffers ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Could not complete proxy handshake, null buffers" ) ; } return STATUS_ERROR ; } int statu...
Check for a proxy handshake response .
160,425
protected void releaseProxyWriteBuffer ( ) { WsByteBuffer buffer = connLink . getWriteInterface ( ) . getBuffer ( ) ; if ( null != buffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Releasing proxy write buffer: " + buffer ) ; } buffer . release ( ) ; connLink . g...
Release the proxy connect write buffer .
160,426
protected void releaseProxyReadBuffer ( ) { WsByteBuffer buffer = connLink . getReadInterface ( ) . getBuffer ( ) ; if ( null != buffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Releasing proxy read buffer: " + buffer ) ; } buffer . release ( ) ; connLink . getR...
Release the proxy connect read buffer .
160,427
protected boolean containsHTTP200 ( byte [ ] data ) { boolean rc = true ; if ( data . length < 12 || data [ 0 ] != 'H' || data [ 1 ] != 'T' || data [ 2 ] != 'T' || data [ 3 ] != 'P' || data [ 9 ] != '2' || data [ 10 ] != '0' || data [ 11 ] != '0' ) { rc = false ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . ...
Checks if the byte array contains HTTP 200 in a byte array .
160,428
protected void readProxyResponse ( VirtualConnection inVC ) { int size = 1 ; if ( ! this . isProxyResponseValid ) { size = 12 ; } if ( connLink . isAsyncConnect ( ) ) { VirtualConnection vcRC = connLink . getReadInterface ( ) . read ( size , this . proxyReadCB , false , TCPRequestContext . USE_CHANNEL_TIMEOUT ) ; if ( ...
Start a read for the response from the target proxy this is either the first read or possibly secondary ones if necessary .
160,429
public synchronized void setDefaultDestLimits ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDefaultDestLimits" ) ; long destHighMsgs = mp . getHighMessageThreshold ( ) ; setDestLimits ( destHighMsgs , ( destHighMsgs * 8 ) / 10 ) ; ...
Set the default limits for this itemstream
160,430
public long getDestHighMsgs ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestHighMsgs" ) ; SibTr . exit ( tc , "getDestHighMsgs" , Long . valueOf ( _destHighMsgs ) ) ; } return _destHighMsgs ; }
Gets the destination high messages limit currently being used by this localization .
160,431
public long getDestLowMsgs ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestLowMsgs" ) ; SibTr . exit ( tc , "getDestLowMsgs" , Long . valueOf ( _destLowMsgs ) ) ; } return _destLowMsgs ; }
Gets the destination low messages limit currently being used by this localization .
160,432
public void fireDepthThresholdReachedEvent ( ControlAdapter cAdapter , boolean reachedHigh , long numMsgs , long msgLimit ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireDepthThresholdReachedEvent" , new Object [ ] { cAdapter , new Boolean ( reachedHigh ) , new L...
Fire an event notification of type TYPE_SIB_MESSAGEPOINT_DEPTH_THRESHOLD_REACHED
160,433
private void reschedule ( ) { Calendar cal = Calendar . getInstance ( ) ; long today = cal . getTimeInMillis ( ) ; cal . set ( Calendar . HOUR_OF_DAY , 0 ) ; cal . set ( Calendar . MINUTE , 0 ) ; cal . add ( Calendar . DATE , 1 ) ; long tomorrow = cal . getTimeInMillis ( ) ; if ( executorService != null ) { future = ex...
Reschedule the task for midnight - ish the next day .
160,434
public void run ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "run: " + ivTimer . ivTaskId ) ; if ( serverStopping ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "Server shutting down; aborting" ) ; return ; } i...
Executes the timer work with configured retries .
160,435
public static Document parseDocument ( DocumentBuilder builder , File file ) throws IOException , SAXException { final DocumentBuilder docBuilder = builder ; final File parsingFile = file ; try { return ( Document ) AccessController . doPrivileged ( new PrivilegedExceptionAction ( ) { public Object run ( ) throws SAXEx...
D190462 - START
160,436
protected boolean checkBuffer ( ) throws IOException { if ( ! enableMultiReadofPostData ) { if ( null != this . buffer ) { if ( this . buffer . hasRemaining ( ) ) { return true ; } this . buffer . release ( ) ; this . buffer = null ; } try { this . buffer = this . isc . getRequestBodyBuffer ( ) ; if ( null != this . bu...
Check the input buffer for data . If necessary attempt a read for a new buffer .
160,437
private boolean checkMultiReadBuffer ( ) throws IOException { if ( null != this . buffer ) { if ( this . buffer . hasRemaining ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "checkMultiReadBuffer, remaining ->" + this ) ; } return true ; } if ( firstReadCompletefo...
Check the input buffer for data . If necessary attempt a read for a new buffer and store it .
160,438
public static EsaSubsystemFeatureDefinitionImpl constructInstance ( File esa ) throws ZipException , IOException { ZipFile zip = new ZipFile ( esa ) ; Enumeration < ? extends ZipEntry > zipEntries = zip . entries ( ) ; ZipEntry subsystemEntry = null ; while ( zipEntries . hasMoreElements ( ) ) { ZipEntry nextEntry = zi...
Create a new instance of this class for the supplied ESA file .
160,439
static String formatTime ( ) { Date date = new Date ( ) ; DateFormat formatter = BaseTraceFormatter . useIsoDateFormat ? new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ) : DateFormatProvider . getDateFormat ( ) ; StringBuffer answer = new StringBuffer ( ) ; answer . append ( '[' ) ; formatter . format ( date , ans...
Return the current time formatted in a standard way
160,440
private static String [ ] getCallStackFromStackTraceElement ( StackTraceElement [ ] exceptionCallStack ) { if ( exceptionCallStack == null ) return null ; String [ ] answer = new String [ exceptionCallStack . length ] ; for ( int i = 0 ; i < exceptionCallStack . length ; i ++ ) { answer [ exceptionCallStack . length - ...
Create the call stack array expected by diagnostic modules from an array of StackTraceElements
160,441
private static String getPackageName ( String className ) { int end = className . lastIndexOf ( '.' ) ; return ( end > 0 ) ? className . substring ( 0 , end ) : "" ; }
Return the package name of a given class name
160,442
public String validateCookieName ( String cookieName , boolean quiet ) { if ( cookieName == null || cookieName . length ( ) == 0 ) { if ( ! quiet ) { Tr . error ( tc , "COOKIE_NAME_CANT_BE_EMPTY" ) ; } return CFG_DEFAULT_COOKIENAME ; } String cookieNameUc = cookieName . toUpperCase ( ) ; boolean valid = true ; for ( in...
reset cookieName to default value if it is not valid
160,443
public void distributeBefore ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "distributeBefore" , this ) ; boolean setRollback = false ; try { coreDistributeBefore ( ) ; } catch ( Throwable exc ) { Tr . error ( tc , "WTRN0074_SYNCHRONIZATION_EXCEPTION" , new Object [ ] { "before_completion" , exc } ) ; _tran . s...
Distributes before completion operations to all registered Synchronization objects . If a synchronization raises an exception mark transaction for rollback .
160,444
public void distributeAfter ( int status ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "distributeAfter" , new Object [ ] { this , status } ) ; final List RRSsyncs = _syncs [ SYNC_TIER_RRS ] ; if ( RRSsyncs != null ) { final int RRSstatus = ( status == Status . STATUS_UNKNOWN ? Status . STATUS_COMMITTED : status...
Distributes after completion operations to all registered Synchronization objects .
160,445
public static UDPBufferFactory getRef ( ) { if ( null == ofInstance ) { synchronized ( UDPBufferFactory . class ) { if ( null == ofInstance ) { ofInstance = new UDPBufferFactory ( ) ; } } } return ofInstance ; }
Get a reference to the singleton instance of this class .
160,446
public static UDPBufferImpl getUDPBuffer ( WsByteBuffer buffer , SocketAddress address ) { UDPBufferImpl udpBuffer = getRef ( ) . getUDPBufferImpl ( ) ; udpBuffer . set ( buffer , address ) ; return udpBuffer ; }
Get a UDPBuffer that will encapsulate the provided information .
160,447
protected UDPBufferImpl getUDPBufferImpl ( ) { UDPBufferImpl ret = ( UDPBufferImpl ) udpBufferObjectPool . get ( ) ; if ( ret == null ) { ret = new UDPBufferImpl ( this ) ; } return ret ; }
Retrieve an UDPBuffer object from the factory .
160,448
public String logDirectory ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logDirectory" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logDirectory" , _logDirectory ) ; return _logDirectory ; }
Returns the physical location where a recovery log constructed from the target object will reside .
160,449
public String logDirectoryStem ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logDirectoryStem" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logDirectoryStem" , _logDirectoryStem ) ; return _logDirectoryStem ; }
Returns the stem of the location where a recovery log constructed from the target object will reside .
160,450
public int logFileSize ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logFileSize" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logFileSize" , new Integer ( _logFileSize ) ) ; return _logFileSize ; }
Returns the physical log size of a recovery log constructed from the target object .
160,451
public int maxLogFileSize ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "maxLogFileSize" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "maxLogFileSize" , new Integer ( _maxLogFileSize ) ) ; return _maxLogFileSize ; }
Returns the maximum physical log size of a recovery log constructed from the target object .
160,452
void unregister ( ) { trackerLock . lock ( ) ; try { if ( tracker != null ) { tracker . close ( ) ; tracker = null ; } } finally { trackerLock . unlock ( ) ; } }
Unregisters all OSGi services associated with this bell
160,453
void update ( ) { final BundleContext context = componentContext . getBundleContext ( ) ; String libraryRef = library . id ( ) ; String libraryStatusFilter = String . format ( "(&(objectClass=%s)(|(id=%s)(service.pid=%s)))" , Library . class . getName ( ) , libraryRef , libraryRef ) ; Filter filter ; try { filter = con...
Configures this bell with a specific library and a possible set of service names
160,454
public static < T extends Constructible > T createObject ( Class < T > clazz ) { return OASFactoryResolver . instance ( ) . createObject ( clazz ) ; }
This method creates a new instance of a constructible element from the OpenAPI model tree .
160,455
private void printErrorMessage ( String key , Object ... substitutions ) { Tr . error ( tc , key , substitutions ) ; errorMsgIssued = true ; }
Prints the specified error message .
160,456
protected Object evaluateElExpression ( String expression , boolean mask ) { final String methodName = "evaluateElExpression" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , methodName , new Object [ ] { ( expression == null ) ? null : mask ? OBFUSCATED_STRING : expressi...
Evaluate a possible EL expression .
160,457
static boolean isImmediateExpression ( String expression , boolean mask ) { final String methodName = "isImmediateExpression" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , methodName , new Object [ ] { ( expression == null ) ? null : mask ? OBFUSCATED_STRING : expressi...
Return whether the expression is an immediate EL expression .
160,458
static String removeBrackets ( String expression , boolean mask ) { final String methodName = "removeBrackets" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , methodName , new Object [ ] { ( expression == null ) ? null : mask ? OBFUSCATED_STRING : expression , mask } ) ;...
Remove the brackets from an EL expression .
160,459
@ SuppressWarnings ( "unchecked" ) private ThreadLocalProxyCopyOnWriteArraySet < ThreadLocalProxy < ? > > getProxySet ( ) { Object property = null ; property = bus . getProperty ( PROXY_SET ) ; if ( property == null ) { ThreadLocalProxyCopyOnWriteArraySet < ThreadLocalProxy < ? > > proxyMap = new ThreadLocalProxyCopyOn...
Create a CopyOnWriteArraySet to store the ThreadLocalProxy objects for convenience of clearance
160,460
private void skipClasslessStackFrames ( ) { if ( classes . isEmpty ( ) ) return ; while ( elements . size ( ) > 0 && ! ! ! elements . peek ( ) . getClassName ( ) . equals ( classes . peek ( ) . getName ( ) ) ) { elements . pop ( ) ; } }
Call after any advancement to bring this . elements into line with this . classes .
160,461
public static boolean unregisterExtension ( String key ) { if ( key == null ) { throw new IllegalArgumentException ( "Parameter 'key' can not be null" ) ; } w . lock ( ) ; try { return extensionMap . remove ( key ) != null ; } finally { w . unlock ( ) ; } }
Removes context extension registration .
160,462
public static void getExtensions ( Map < String , String > map ) throws IllegalArgumentException { if ( map == null ) { throw new IllegalArgumentException ( "Parameter 'map' can not be null." ) ; } if ( recursion . get ( ) == Boolean . TRUE ) { return ; } recursion . set ( Boolean . TRUE ) ; LinkedList < String > clean...
Retrieves values for all registered context extensions .
160,463
@ FFDCIgnore ( Exception . class ) private void logProviderInfo ( String providerName , ClassLoader loader ) { try { if ( PROVIDER_ECLIPSELINK . equals ( providerName ) ) { Class < ? > Version = loadClass ( loader , "org.eclipse.persistence.Version" ) ; String version = ( String ) Version . getMethod ( "getVersionStrin...
Log version information about the specified persistence provider if it can be determined .
160,464
protected void checkStartStatus ( BundleStartStatus startStatus ) throws InvalidBundleContextException { final String m = "checkInstallStatus" ; if ( startStatus . startExceptions ( ) ) { Map < Bundle , Throwable > startExceptions = startStatus . getStartExceptions ( ) ; for ( Entry < Bundle , Throwable > entry : start...
Check the passed in start status for exceptions starting bundles and issue appropriate diagnostics & messages for this environment .
160,465
protected BundleInstallStatus installBundles ( BootstrapConfig config ) throws InvalidBundleContextException { BundleInstallStatus installStatus = new BundleInstallStatus ( ) ; KernelResolver resolver = config . getKernelResolver ( ) ; ContentBasedLocalBundleRepository repo = BundleRepositoryRegistry . getInstallBundle...
Install framework bundles .
160,466
public synchronized boolean isHealthy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isHealthy" ) ; boolean retval = _running && ! _stopRequested && ( _threadWriteErrorsOutstanding == 0 ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnable...
Used as a quick way to check the health of a dispatcher before giving it work in situations in which the work cannot be rejected . For example for a transaction which requires both synchronous and asynchronous persistence once we ve done the synchronous persistence a transient persistence problem from a dispatcher will...
160,467
private String getLogDir ( ) { StringBuffer output = new StringBuffer ( ) ; WsLocationAdmin locationAdmin = locationAdminRef . getService ( ) ; output . append ( locationAdmin . resolveString ( "${server.output.dir}" ) . replace ( '\\' , '/' ) ) . append ( "/logs" ) ; return output . toString ( ) ; }
Get the default directory for logs
160,468
private String mapToJSONString ( Map < String , Object > eventMap ) { JSONObject jsonEvent = new JSONObject ( ) ; String jsonString = null ; map2JSON ( jsonEvent , eventMap ) ; try { if ( ! compact ) { jsonString = jsonEvent . serialize ( true ) . replaceAll ( "\\\\/" , "/" ) ; } else { jsonString = jsonEvent . toStrin...
Produce a JSON String for the given audit event
160,469
private JSONArray array2JSON ( JSONArray ja , Object [ ] array ) { for ( int i = 0 ; i < array . length ; i ++ ) { if ( array [ i ] instanceof Map ) { ja . add ( map2JSON ( new JSONObject ( ) , ( Map < String , Object > ) array [ i ] ) ) ; } else if ( array [ i ] . getClass ( ) . isArray ( ) ) { ja . add ( array2JSON (...
Given a Java array add the corresponding JSON to the given JSONArray object
160,470
public void writeBootstrapProperty ( LibertyServer server , String propKey , String propValue ) throws Exception { String bootProps = getBootstrapPropertiesFilePath ( server ) ; appendBootstrapPropertyToFile ( bootProps , propKey , propValue ) ; }
Writes the specified bootstrap property and value to the provided server s bootstrap . properties file .
160,471
public void writeBootstrapProperties ( LibertyServer server , Map < String , String > miscParms ) throws Exception { String thisMethod = "writeBootstrapProperties" ; loggingUtils . printMethodName ( thisMethod ) ; if ( miscParms == null ) { return ; } String bootPropFilePath = getBootstrapPropertiesFilePath ( server ) ...
Writes each of the specified bootstrap properties and values to the provided server s bootstrap . properties file .
160,472
public static WSATRecoveryCoordinator fromLogData ( byte [ ] bytes ) throws SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fromLogData" , bytes ) ; WSATRecoveryCoordinator wsatRC = null ; final ByteArrayInputStream bais = new ByteArrayInputStream ( bytes ) ; try { final ObjectInputStream ois = new ...
As called after recovery on distributed platform
160,473
private boolean handleAdditionalAnnotation ( List < Parameter > parameters , Annotation annotation , final Type type , Set < Type > typesToSkip , javax . ws . rs . Consumes classConsumes , javax . ws . rs . Consumes methodConsumes , Components components , boolean includeRequestBody ) { boolean processed = false ; if (...
Adds additional annotation processing support
160,474
protected String replaceAllProperties ( String str , final Properties submittedProps , final Properties xmlProperties ) { int startIndex = 0 ; NextProperty nextProp = this . findNextProperty ( str , startIndex ) ; while ( nextProp != null ) { startIndex = nextProp . endIndex ; String nextPropValue = this . resolvePrope...
Replace all the properties in String str .
160,475
private String resolvePropertyValue ( final String name , PROPERTY_TYPE propType , final Properties submittedProperties , final Properties xmlProperties ) { String value = null ; switch ( propType ) { case JOB_PARAMETERS : if ( submittedProperties != null ) { value = submittedProperties . getProperty ( name ) ; } if ( ...
Gets the value of a property using the property type
160,476
private Properties inheritProperties ( final Properties parentProps , final Properties childProps ) { if ( parentProps == null ) { return childProps ; } if ( childProps == null ) { return parentProps ; } for ( final String parentKey : parentProps . stringPropertyNames ( ) ) { if ( ! childProps . containsKey ( parentKey...
Merge the parent properties that are already set into the child properties . Child properties always override parent values .
160,477
public boolean isCommitted ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "isCommitted: " + committed ) ; } return committed ; }
Returns whether the output has been committed or not .
160,478
public void write ( int c ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "write + c ) ; } if ( ! _hasWritten && obs != null ) { _hasWritten = true ; obs . alertFirstWrite ( ) ; } if ( limit > - 1 ) { if ( total >= limit ) { throw new WriteBeyondCon...
Writes a char . This method will block until the char is actually written .
160,479
protected void flushChars ( ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "flushChars" ) ; } if ( ! committed ) { if ( ! _hasFlushed && obs != null ) { _hasFlushed = true ; obs . alertFirstFlush ( ) ; } } committed = true ; if ( count > 0 ) { if ( ...
Flushes the writer chars .
160,480
private void addAddressToList ( String newAddress , boolean validateOnly ) { int start = 0 ; char delimiter = '.' ; String sub ; int radix = 10 ; int addressToAdd [ ] = new int [ IP_ADDR_NUMBERS ] ; for ( int i = 0 ; i < IP_ADDR_NUMBERS ; i ++ ) { addressToAdd [ i ] = 0 ; } int slot = IP_ADDR_NUMBERS - 1 ; if ( newAddr...
Add one IPv4 or IPv6 address to the tree . The address is passed in as a string and converted to an integer array by this routine . Another method is then called to put it into the tree
160,481
public boolean findInList ( byte [ ] address ) { int len = address . length ; int a [ ] = new int [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { a [ i ] = address [ i ] & 0x00FF ; } return findInList ( a ) ; }
Determine if an address represented by a byte array is in the address tree
160,482
public boolean findInList6 ( byte [ ] address ) { int len = address . length ; int a [ ] = new int [ len / 2 ] ; int j = 0 ; int highOrder = 0 ; int lowOrder = 0 ; for ( int i = 0 ; i < len ; i += 2 ) { highOrder = address [ i ] & 0x00FF ; lowOrder = address [ i + 1 ] & 0x00FF ; a [ j ] = highOrder * 256 + lowOrder ; j...
Determine if an IPv6 address represented by a byte array is in the address tree
160,483
public boolean findInList ( int [ ] address ) { int len = address . length ; if ( len < IP_ADDR_NUMBERS ) { int j = IP_ADDR_NUMBERS - 1 ; int a [ ] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ; for ( int i = len ; i > 0 ; i -- , j -- ) { a [ j ] = address [ i - 1 ] ; } return findInList ( a , 0 , firstCell , 7 ) ; } return fin...
Determine if an address represented by an integer array is in the address tree
160,484
private boolean findInList ( int [ ] address , int index , FilterCell cell , int endIndex ) { if ( cell . getWildcardCell ( ) != null ) { if ( index == endIndex ) { return true ; } FilterCell newcell = cell . getWildcardCell ( ) ; if ( findInList ( address , index + 1 , newcell , endIndex ) ) { return true ; } FilterCe...
Determine recursively if an address represented by an integer array is in the address tree
160,485
public boolean isInstrumentableMethod ( int access , String methodName , String descriptor ) { if ( ( access & Opcodes . ACC_SYNTHETIC ) != 0 ) { return false ; } if ( ( access & Opcodes . ACC_NATIVE ) != 0 ) { return false ; } if ( ( access & Opcodes . ACC_ABSTRACT ) != 0 ) { return false ; } if ( methodName . equals ...
Indicate whether or not the target method is instrumentable .
160,486
@ Mode ( TestMode . LITE ) public void MPJwtBadMPConfigAsSystemProperties_GoodMpJwtConfigSpecifiedInServerXml ( ) throws Exception { resourceServer . reconfigureServerUsingExpandedConfiguration ( _testName , "rs_server_AltConfigNotInApp_goodServerXmlConfig.xml" ) ; standardTestFlow ( resourceServer , MpJwtFatConstants ...
The server will be started with all mp - config properties incorrectly configured in the jvm . options file . The server . xml has a valid mp_jwt config specified . The config settings should come from server . xml . The test should run successfully .
160,487
@ FFDCIgnore ( JobExecutionNotRunningException . class ) public void stop ( ) { StopLock stopLock = getStopLock ( ) ; synchronized ( stopLock ) { if ( isStepStartingOrStarted ( ) ) { updateStepBatchStatus ( BatchStatus . STOPPING ) ; for ( BatchPartitionWorkUnit subJob : parallelBatchWorkUnits ) { try { getBatchKernelS...
The body of this method is synchronized with startPartition to close timing windows so that a new partition doesn t get started after this method has gone thru and stopped all currently running partitions .
160,488
private void setExecutionTypeIfNotSet ( ExecutionType executionType ) { if ( this . executionType == null ) { logger . finer ( "Setting initial execution type value" ) ; this . executionType = executionType ; } else { logger . finer ( "Not setting execution type value since it's already set" ) ; } }
We could be more aggressive about validating illegal states and throwing exceptions here .
160,489
private void validatePlanNumberOfPartitions ( PartitionPlanDescriptor currentPlan ) { int numPreviousPartitions = getTopLevelStepInstance ( ) . getPartitionPlanSize ( ) ; int numCurrentPartitions = currentPlan . getNumPartitionsInPlan ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "For step: " + ge...
Verify the number of partitions in the plan makes sense .
160,490
private boolean isStoppingStoppedOrFailed ( ) { BatchStatus jobBatchStatus = runtimeWorkUnitExecution . getBatchStatus ( ) ; if ( jobBatchStatus . equals ( BatchStatus . STOPPING ) || jobBatchStatus . equals ( BatchStatus . STOPPED ) || jobBatchStatus . equals ( BatchStatus . FAILED ) ) { return true ; } return false ;...
Today we know the PartitionedStepControllerImpl always runs in the JVM of the top - level job and so will be notified on the top - level stop .
160,491
private void partitionFinished ( PartitionReplyMsg msg ) { JoblogUtil . logToJobLogAndTraceOnly ( Level . FINE , "partition.ended" , new Object [ ] { msg . getPartitionPlanConfig ( ) . getPartitionNumber ( ) , msg . getBatchStatus ( ) , msg . getExitStatus ( ) , msg . getPartitionPlanConfig ( ) . getStepName ( ) , msg ...
Issue message for partition finished and add it to the finishedWork list .
160,492
private void waitForNextPartitionToFinish ( List < Throwable > analyzerExceptions , List < Integer > finishedPartitions ) throws JobStoppingException { boolean isStoppingStoppedOrFailed = false ; PartitionReplyMsg msg = null ; do { if ( isMultiJvm ) { if ( isStoppingStoppedOrFailed ( ) ) { isStoppingStoppedOrFailed = t...
Wait and process the data sent back by the partitions . This method returns as soon as the next partition sends back an i m finished message .
160,493
@ FFDCIgnore ( JobStoppingException . class ) private void executeAndWaitForCompletion ( PartitionPlanDescriptor currentPlan ) throws JobRestartException { if ( isStoppingStoppedOrFailed ( ) ) { logger . fine ( "Job already in " + runtimeWorkUnitExecution . getWorkUnitJobContext ( ) . getBatchStatus ( ) . toString ( ) ...
Spawn the partitions and wait for them to complete .
160,494
private void checkFinishedPartitions ( ) { List < String > failingPartitionSeen = new ArrayList < String > ( ) ; boolean stoppedPartitionSeen = false ; for ( PartitionReplyMsg replyMsg : finishedWork ) { BatchStatus batchStatus = replyMsg . getBatchStatus ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fin...
check the batch status of each subJob after it s done to see if we need to issue a rollback start rollback if any have stopped or failed
160,495
protected void invokePreStepArtifacts ( ) { if ( stepListeners != null ) { for ( StepListenerProxy listenerProxy : stepListeners ) { listenerProxy . beforeStep ( ) ; } } if ( this . partitionReducerProxy != null ) { this . partitionReducerProxy . beginPartitionedStep ( ) ; } }
Invoke the StepListeners and PartitionReducer .
160,496
private static String getClassNameandPath ( String className , Path path ) { if ( path == null ) { return getClassNameandPath ( className , "/" ) ; } else { return getClassNameandPath ( className , path . value ( ) ) ; } }
start Liberty change
160,497
private static boolean checkMethodDispatcher ( ClassResourceInfo cr ) { if ( cr . getMethodDispatcher ( ) . getOperationResourceInfos ( ) . isEmpty ( ) ) { LOG . warning ( new org . apache . cxf . common . i18n . Message ( "NO_RESOURCE_OP_EXC" , BUNDLE , cr . getServiceClass ( ) . getName ( ) ) . toString ( ) ) ; retur...
end Liberty change
160,498
public void run ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . entry ( tc , "run" ) ; int numPools ; synchronized ( this ) { if ( ivIsCanceled ) { return ; } ivIsRunning = true ; numPools = pools . size ( ) ; if ( numPools > 0 ) { if ( numPool...
Handle the scavenger alarm . Scan the list of pools and drain all inactive ones .
160,499
private Object addBatch ( Object implObject , Method method , Object [ ] args ) throws IllegalAccessException , IllegalArgumentException , InvocationTargetException , SQLException { Object sqljPstmt = args [ 0 ] ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isDebugEnabled...
Invokes addBatch after replacing the parameter with the DB2 impl object if proxied .