idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
163,900
public synchronized void putXid ( Xid xid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "putXid" , xid ) ; putInt ( xid . getFormatId ( ) ) ; putInt ( xid . getGlobalTransactionId ( ) . length ) ; put ( xid . getGlobalTransactionId ( ) ) ; putInt ( xid . getBranchQu...
Puts an Xid into the Byte Buffer .
162
10
163,901
public synchronized void putSITransaction ( SITransaction transaction ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "putSITransaction" , transaction ) ; Transaction commsTx = ( Transaction ) transaction ; int flags = - 1 ; if ( transaction == null ) { // No transact...
Puts an SITransaction into the buffer
788
10
163,902
public int putMessgeWithoutEncode ( List < DataSlice > messageParts ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putMessgeWithoutEncode" , messageParts ) ; int messageLength = 0 ; // Now we have a list of MessagePart objects. First work out the overall leng...
This method is used to put a message into the buffer but assumes that the encode has already been completed . This may be in the case where we would like to send the message in chunks but we decide that the message would be better sent as an entire message .
406
52
163,903
public synchronized void putDataSlice ( DataSlice slice ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putDataSlice" , slice ) ; // First pump in the length putInt ( slice . getLength ( ) ) ; // Now add in the payload wrap ( slice . getBytes ( ) , slice . get...
This method is used to put a data slice into the buffer . A data slice is usually given to us by MFP as part of a message and this method can be used to add a single slice into the buffer so that the message can be sent in multiple transmissions . This is preferable to sending the message in one job lot because we can ...
142
84
163,904
public synchronized void putSIMessageHandles ( SIMessageHandle [ ] siMsgHandles ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "putSIMessageHandles" , siMsgHandles ) ; putInt ( siMsgHandles . length ) ; for ( int handleIndex = 0 ; handleIndex < siMsgHandles . length ...
Puts the array of message handles into the buffer .
241
11
163,905
public synchronized void putException ( Throwable throwable , String probeId , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "putException" , new Object [ ] { throwable , probeId , conversation } ) ; Throwable currentException = thro...
This method will fill a buffer list with WsByteBuffer s that when put together form a packet describing an exception and it s linked exceptions . It will traverse down the cause exceptions until one of them is null .
692
43
163,906
public synchronized String getString ( ) { checkReleased ( ) ; String returningString = null ; // Read the length in short stringLength = receivedBuffer . getShort ( ) ; // Allocate the right amount of space for it byte [ ] stringBytes = new byte [ stringLength ] ; // And copy the data in receivedBuffer . get ( stringB...
Reads a String from the current position in the byte buffer .
350
13
163,907
public synchronized SelectionCriteria getSelectionCriteria ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSelectionCriteria" ) ; //469395 checkReleased ( ) ; SelectorDomain selectorDomain = SelectorDomain . getSelectorDomain ( getShort ( ) ) ; if ( Trace...
Reads a SelectionCriteria from the current position in the byte buffer .
331
15
163,908
public synchronized Xid getXid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getXid" ) ; checkReleased ( ) ; int formatId = getInt ( ) ; int glidLength = getInt ( ) ; byte [ ] globalTransactionId = get ( glidLength ) ; int blqfLength = getInt ( ) ; byte [ ] branc...
Reads an Xid from the current position in the buffer .
180
13
163,909
public synchronized SIBusMessage getMessage ( CommsConnection commsConnection ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMessage" ) ; checkReleased ( ) ; SIBusMessage mess = null ; // Now build a JsMessage from the returned data. No...
Reads an SIBusMessage from the current position in the buffer .
725
15
163,910
public synchronized SIMessageHandle [ ] getSIMessageHandles ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getSIMessageHandles" ) ; int arrayCount = getInt ( ) ; // BIT32 ArrayCount if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) ...
Reads some message handles from the buffer .
290
9
163,911
public synchronized int peekInt ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "peekInt" ) ; checkReleased ( ) ; int result = 0 ; if ( receivedBuffer != null ) { int currentPosition = receivedBuffer . position ( ) ; result = receivedBuffer . getInt ( ) ; rec...
This method will peek at the next 4 bytes in the buffer and return the result as an int . The buffer position will be unchanged by calling this method .
139
31
163,912
public synchronized long peekLong ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "peekLong" ) ; checkReleased ( ) ; long result = 0 ; if ( receivedBuffer != null ) { int currentPosition = receivedBuffer . position ( ) ; result = receivedBuffer . getLong ( ) ...
This method will peek at the next 8 bytes in the buffer and return the result as a long . The buffer position will be unchanged by calling this method .
139
31
163,913
public synchronized void skip ( int lengthToSkip ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "skip" , lengthToSkip ) ; checkReleased ( ) ; if ( receivedBuffer != null ) { receivedBuffer . position ( receivedBuffer . position ( ) + lengthToSkip ) ; } if ( Tr...
Skips over the specified number of bytes in the received byte buffer .
119
14
163,914
public synchronized void rewind ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "rewind" ) ; checkReleased ( ) ; if ( receivedBuffer != null ) { receivedBuffer . rewind ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr ....
Rewinds the buffer to the beginning of the received data so that the data can be re - read .
105
22
163,915
public static int calculateEncodedStringLength ( String s ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "calculateEncodedStringLength" , s ) ; final int length ; if ( s == null ) { length = 3 ; } else { try { final byte [ ] stringAsBytes = s . getBytes ( stringEncod...
Calculates the length in bytes of a String when it is placed inside a CommsByteBuffer via the putString method . A null String can be passed into this method .
359
36
163,916
public synchronized boolean getBoolean ( ) { final byte value = get ( ) ; if ( value == CommsConstants . TRUE_BYTE ) return true ; else if ( value == CommsConstants . FALSE_BYTE ) return false ; else throw new IllegalStateException ( "Unexpected byte: " + value ) ; }
Returns the next value in the buffer interpreted as a boolean . Should only be called when the next byte in the buffer was written by a call to putBoolean .
70
33
163,917
protected File assertDirectory ( String dirName , String locName ) { File d = new File ( dirName ) ; if ( d . isFile ( ) ) throw new LocationException ( "Path must reference a directory" , MessageFormat . format ( BootstrapConstants . messages . getString ( "error.specifiedLocation" ) , locName , d . getAbsolutePath ( ...
Ensure that the given directory either does not yet exists or exists as a directory .
87
17
163,918
protected void substituteSymbols ( Map < String , String > initProps ) { for ( Entry < String , String > entry : initProps . entrySet ( ) ) { Object value = entry . getValue ( ) ; if ( value instanceof String ) { String strValue = ( String ) value ; Matcher m = SYMBOL_DEF . matcher ( strValue ) ; int i = 0 ; while ( m ...
Perform substitution of symbols used in config
170
8
163,919
public boolean checkCleanStart ( ) { String fwClean = get ( BootstrapConstants . INITPROP_OSGI_CLEAN ) ; if ( fwClean != null && fwClean . equals ( BootstrapConstants . OSGI_CLEAN_VALUE ) ) { return true ; } String osgiClean = get ( BootstrapConstants . OSGI_CLEAN ) ; return Boolean . valueOf ( osgiClean ) ; }
Check osgi clean start properties ensure set correctly for clean start
96
12
163,920
protected ReturnCode generateServerEnv ( boolean generatePassword ) { double jvmLevel ; String s = null ; try { s = AccessController . doPrivileged ( new java . security . PrivilegedExceptionAction < String > ( ) { @ Override public String run ( ) throws Exception { String javaSpecVersion = System . getProperty ( "java...
For Java 8 and newer JVMs the PermGen command line parameter is no longer supported . This method checks the Java level and if it is less than Java 8 it simply returns OK . If it is Java 8 or higher this method will attempt to create a server . env file with
635
58
163,921
protected void setProbeListeners ( ProbeImpl probe , Collection < ProbeListener > listeners ) { Set < ProbeListener > enabled = enabledProbes . get ( probe ) ; if ( enabled == null ) { enabled = new HashSet < ProbeListener > ( ) ; enabledProbes . put ( probe , enabled ) ; } enabled . addAll ( listeners ) ; }
Associate a collection of listeners with the specified probe .
76
11
163,922
protected Set < ProbeListener > getProbeListeners ( ProbeImpl probe ) { Set < ProbeListener > listeners = enabledProbes . get ( probe ) ; if ( listeners == null ) { listeners = Collections . emptySet ( ) ; } return listeners ; }
Get the set of probe listeners that have been associated with the specified probe by this adapter .
54
18
163,923
protected void unbox ( final Type type ) { switch ( type . getSort ( ) ) { case Type . BOOLEAN : visitTypeInsn ( CHECKCAST , "java/lang/Boolean" ) ; visitMethodInsn ( INVOKEVIRTUAL , "java/lang/Boolean" , "booleanValue" , "()Z" , false ) ; break ; case Type . BYTE : visitTypeInsn ( CHECKCAST , "java/lang/Byte" ) ; visi...
Generate the instruction sequence needed to unbox the boxed data at the top of stack .
534
18
163,924
void replaceArgsWithArray ( String desc ) { Type [ ] methodArgs = Type . getArgumentTypes ( desc ) ; createObjectArray ( methodArgs . length ) ; // [target] args... array for ( int i = methodArgs . length - 1 ; i >= 0 ; i -- ) { if ( methodArgs [ i ] . getSize ( ) == 2 ) { visitInsn ( DUP_X2 ) ; // [target] args... arr...
Create an object array and store the target method arguments in it .
304
13
163,925
void restoreArgsFromArray ( String desc ) { Type [ ] methodArgs = Type . getArgumentTypes ( desc ) ; for ( int i = 0 ; i < methodArgs . length ; i ++ ) { // [target] array visitInsn ( DUP ) ; // [target] args... array array visitLdcInsn ( Integer . valueOf ( i ) ) ; // [target] args... array array idx visitInsn ( AALOA...
Recreate the parameter list for the target method from an Object array containing the data .
210
18
163,926
protected void setProbeInProgress ( boolean inProgress ) { if ( inProgress && ! this . probeInProgress ) { this . probeInProgress = true ; if ( this . probeMethodAdapter != null ) { this . mv = this . visitor ; } } else if ( ! inProgress && this . probeInProgress ) { this . probeInProgress = false ; this . mv = probeMe...
Called by the project injection adapter to indicate that the probe instruction stream is being injected . This is used to change the target of the chain to skip other probe related adapters .
99
35
163,927
public void setTargetSignificance ( String targetSignificance ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "setTargetSignificance" , targetSignificance ) ; } _targetSignificance = targetSignificance ; }
Set the target significance property .
76
6
163,928
public void setTargetTransportChain ( String targetTransportChain ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "setTargetTransportChain" , targetTransportChain ) ; } _targetTransportChain = targetTransportChain ; }
Set the target transport chain property .
76
7
163,929
public void setUseServerSubject ( Boolean useServerSubject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isDebugEnabled ( ) ) { SibTr . debug ( this , TRACE , "setUseServerSubject" , useServerSubject ) ; } _useServerSubject = useServerSubject ; }
Set the useServerSubject property .
70
7
163,930
public void setRetryInterval ( String retryInterval ) { _retryInterval = ( retryInterval == null ? null : Integer . valueOf ( retryInterval ) ) ; }
Sets the retry interval
44
6
163,931
static PortComponent getPortComponentByEJBLink ( String ejbLink , Adaptable containerToAdapt ) throws UnableToAdaptException { return getHighLevelElementByServiceImplBean ( ejbLink , containerToAdapt , PortComponent . class , LinkType . EJB ) ; }
Get the PortComponent by ejb - link .
63
11
163,932
static PortComponent getPortComponentByServletLink ( String servletLink , Adaptable containerToAdapt ) throws UnableToAdaptException { return getHighLevelElementByServiceImplBean ( servletLink , containerToAdapt , PortComponent . class , LinkType . SERVLET ) ; }
Get the PortComponent by servlet - link .
60
10
163,933
static WebserviceDescription getWebserviceDescriptionByEJBLink ( String ejbLink , Adaptable containerToAdapt ) throws UnableToAdaptException { return getHighLevelElementByServiceImplBean ( ejbLink , containerToAdapt , WebserviceDescription . class , LinkType . EJB ) ; }
Get the WebserviceDescription by ejb - link .
70
13
163,934
static WebserviceDescription getWebserviceDescriptionByServletLink ( String servletLink , Adaptable containerToAdapt ) throws UnableToAdaptException { return getHighLevelElementByServiceImplBean ( servletLink , containerToAdapt , WebserviceDescription . class , LinkType . SERVLET ) ; }
Get the WebserviceDescription by servlet - link .
67
12
163,935
@ SuppressWarnings ( "unchecked" ) private static < T > T getHighLevelElementByServiceImplBean ( String portLink , Adaptable containerToAdapt , Class < T > clazz , LinkType linkType ) throws UnableToAdaptException { if ( null == portLink ) { return null ; } if ( PortComponent . class . isAssignableFrom ( clazz ) || Web...
For internal usage . Can only process the PortComponent . class and WebserviceDescription . class .
341
20
163,936
public long getCompletionTime ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getCompletionTime" ) ; long completionTime = - 1 ; //only calculate if the timeout is not infinite long timeOut = getTimeout ( ) ; if ( timeOut != SIMPConstants . INFINITE_TIMEOUT ) { com...
Return the completion time for this request . - 1 means infinite
151
12
163,937
protected synchronized void deactivate ( ComponentContext context ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Unregistering JNDIEntry " + serviceRegistration ) ; } if ( this . serviceRegistration != null ) { this . serviceRegistration . unregister ( ) ; } }
Unregisters a service if one was registered
77
9
163,938
public static UserProfile getUserProfile ( ) { UserProfile userProfile = null ; Subject subject = getSubject ( ) ; Iterator < UserProfile > userProfilesIterator = subject . getPrivateCredentials ( UserProfile . class ) . iterator ( ) ; if ( userProfilesIterator . hasNext ( ) ) { userProfile = userProfilesIterator . nex...
Get UserProfile for the subject on the thread .
85
10
163,939
public void dispatchAsynchException ( ProxyQueue proxyQueue , Exception exception ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "dispatchAsynchException" , new Object [ ] { proxyQueue , exception } ) ; // Create a runnable with the data AsynchExceptionThread thread ...
Dispatches the exception to the relevant proxy queue .
142
11
163,940
public void dispatchAsynchEvent ( short eventId , Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dispatchAsynchEvent" , new Object [ ] { "" + eventId , conversation } ) ; // Create a runnable with the data AsynchEventThread thread = ...
Dispatches the data to be sent to the connection event listeners on a thread .
147
17
163,941
public void dispatchCommsException ( SICoreConnection conn , ProxyQueueConversationGroup proxyQueueConversationGroup , SIConnectionLostException exception ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dispatchCommsException" ) ; // Create a runnable with the...
Dispatches the exception to be sent to the connection event listeners on a thread .
156
17
163,942
public void dispatchDestinationListenerEvent ( SICoreConnection conn , SIDestinationAddress destinationAddress , DestinationAvailability destinationAvailability , DestinationListener destinationListener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dispatchD...
Dispatches a thread which will call the destinationAvailable method on the destinationListener passing in the supplied parameters .
173
22
163,943
public void dispatchConsumerSetChangeCallbackEvent ( ConsumerSetChangeCallback consumerSetChangeCallback , boolean isEmpty ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dispatchConsumerSetChangeCallbackEvent" , new Object [ ] { consumerSetChangeCallback , is...
Dispatches a thread which will call the consumerSetChange method on the ConsumerSetChangeCallback passing in the supplied parameters .
165
25
163,944
public void dispatchStoppableConsumerSessionStopped ( ConsumerSessionProxy consumerSessionProxy ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dispatchStoppableConsumerSessionStopped" , consumerSessionProxy ) ; //Create a new StoppableAsynchConsumerCallbackTh...
Dispatches a thread which will call the stoppableConsumerSessionStopped method on consumerSessionProxy .
157
21
163,945
private void dispatchThread ( Runnable runnable ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "dispatchThread" ) ; try { // Get a thread from the pool to excute it // By only passing the thread we default to wait if the threadpool queue is full // We should w...
Actually dispatches the thread .
207
6
163,946
private static void invokeCallback ( SICoreConnection conn , ConsumerSession session , // d172528 Exception exception , int eventId ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "invokeCallback" , new Object [ ] { conn , session , exception , eventId } ) ; if ( conn...
This method will send a message to the connection listeners associated with this connection .
783
15
163,947
@ Sensitive public static String getHeader ( HttpServletRequest req , String key ) { HttpServletRequest sr = getWrappedServletRequestObject ( req ) ; return sr . getHeader ( key ) ; }
Obtain the value of the specified header .
48
9
163,948
@ Override public void destroy ( ) // PK20881 { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "destroy" ) ; // Dummy transactionWrappers may not be in any table and so // will not have a resourceCallback registered to remove them. if ( _resourceCallback != null ) _resourceCallback . destroy ( ) ; _wrappers . remove ...
as another server tried to rollback the transaction .
273
10
163,949
protected void close ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "close" ) ; if ( flushHelper != null ) flushHelper . shutdown ( ) ; // Complete outstanding work. if ( notifyHelper != null ) notifyHelper . shutdown ( ) ; // N...
Prohibits further operations on the LogFile .
127
10
163,950
private void setFileSpaceLeft ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setFileSpaceLeft" , new Object [ ] { new Long ( fileLogHeader . fileSize ) , new Long ( fileLogHeader . startByteAddress ) , new Long ( filePosition )...
Sets the amount of space still left in the log file .
239
13
163,951
final void flush ( ) throws ObjectManagerException { final String methodName = "flush" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; int startPage = 0 ; // The logBuffer we will wait for. LogBuffer flushLogBuffer = null ; synchronized ( logBuffer...
Writes buffered output to hardened storage . By the time this method returns all of the data in the logBuffer must have been written to the disk . We mark the last page as having a thread waiting . If there are no threads currently writing to any page we wake the flushHelper otherwise we let the writers wake the flushH...
414
80
163,952
protected void reserve ( long reservedDelta ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "reserve" , new Object [ ] { new Long ( reservedDelta ) } ) ; long unavailable = reserveLogFileSpace ( reservedDelta ) ; if ( unavailable !...
Reserve space in the log file . We don t have to account for sector bytes because those were reserved at startup .
211
24
163,953
private long reserveLogFileSpace ( long reservedDelta ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "reserveLogFileSpace" , new Object [ ] { new Long ( reservedDelta ) } ) ; long stillToReserve = reservedDelta ; // Pick an arbitrary starting point in the arra...
Reserve space in the log file . If the required space is not available then no space is acllocated in the log file . The space of freed when the log file is truncated .
495
39
163,954
private long paddingReserveLogSpace ( long spaceToReserve ) throws ObjectManagerException { if ( trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "paddingReserveLogSpace" , new Object [ ] { new Long ( spaceToReserve ) } ) ; synchronized ( paddingSpaceLock ) { // adjust the padding space paddingSpaceAvailabl...
Reserve or unreserve log space but keep back an amount used for padding . This method is used to ensure there is always enough padding space by keeping back space returned by add delete and replace operations committing or backing out which was reserved up front . This never fails . It gives space even if not available...
481
61
163,955
protected final long writeNext ( LogRecord logRecord , long reservedDelta , boolean checkSpace , boolean flush ) throws ObjectManagerException { // if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) // trace.entry(this, // cclass, // "writeNext", // new Object[] {logRecord, // new Long(reservedDelta), // new ...
Copy a LogRecord into the LogBuffer ready to write to end of the LogFile .
171
18
163,956
protected final long markAndWriteNext ( LogRecord logRecord , long reservedDelta , boolean checkSpace , boolean flush ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "markAndWriteNext" , new Object [ ] { logRecord , new Long ( rese...
Includes a LogRecord in a FlushSet for writing to end of the LogFile as with writeNext but also sets the truncation mark to immediately befrore the written logRecord .
207
39
163,957
private int addPart ( LogRecord logRecord , byte [ ] fillingBuffer , boolean completed , int offset , int partLength ) throws ObjectManagerException { final String methodName = "addPart" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] ...
Add the partHeader before the logRecord and then the part of the logRecord . If necessary wrap round the end of the log buffer back to the start .
705
32
163,958
public void cancel ( ) { //d583637, F73234 synchronized ( ivCancelLock ) { //d601399 ivIsCanceled = true ; if ( ivScheduledFuture != null ) ivScheduledFuture . cancel ( false ) ; ivCache = null ; ivElements = null ; } }
Cancel the Scheduled Future object
69
7
163,959
protected void renderTextAreaValue ( FacesContext facesContext , UIComponent uiComponent ) throws IOException { ResponseWriter writer = facesContext . getResponseWriter ( ) ; Object addNewLineAtStart = uiComponent . getAttributes ( ) . get ( ADD_NEW_LINE_AT_START_ATTR ) ; if ( addNewLineAtStart != null ) { boolean addN...
Subclasses can override the writing of the text value of the textarea
261
14
163,960
public final void put ( long priority , Object value ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "put", new Object[] { new Long(priority), value}); PriorityQueueNode node = new PriorityQueueNode ( priority , value ) ; // Resize the array (double it) if we are out of space. if ( size == elements . length ) { Prio...
Insert data with the given priority into the heap and heapify .
164
13
163,961
protected void moveUp ( int pos ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "moveUp", new Integer(pos)); PriorityQueueNode node = elements [ pos ] ; long priority = node . priority ; while ( ( pos > 0 ) && ( elements [ parent ( pos ) ] . priority > priority ) ) { setElement ( elements [ parent ( pos ) ] , pos ) ...
Advance a node in the queue based on its priority .
129
12
163,962
public final Object getMin ( ) throws NoSuchElementException { PriorityQueueNode max = null ; if ( size == 0 ) throw new NoSuchElementException ( ) ; max = elements [ 0 ] ; setElement ( elements [ -- size ] , 0 ) ; heapify ( 0 ) ; return max . value ; }
Dequeue the highest priority element from the queue .
66
10
163,963
protected final void setElement ( PriorityQueueNode node , int pos ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "setElement", new Object[] { node, new Integer(pos)}); elements [ pos ] = node ; node . pos = pos ; // if (tc.isEntryEnabled()) // SibTr.exit(tc, "setElement"); }
Set an element in the queue .
85
7
163,964
protected void heapify ( int position ) { // if (tc.isEntryEnabled()) // SibTr.entry(tc, "heapify", new Integer(position)); // Heapify the remaining heap int i = - 1 ; int l ; int r ; int smallest = position ; // Heapify routine from CMR. // This was done without recursion. while ( smallest != i ) { i = smallest ; l = ...
Reheap the queue .
226
6
163,965
public static void setJPAComponent ( JPAComponent instance ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setJPAComponent" , instance ) ; jpaComponent = instance ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "setJPACompon...
Return the default JPAComponent object in the application server .
97
13
163,966
public Tag decorate ( Tag tag ) { Tag t = null ; for ( int i = 0 ; i < this . decorators . length ; i ++ ) { t = this . decorators [ i ] . decorate ( tag ) ; if ( t != null ) { return t ; } } return tag ; }
Uses the chain of responsibility pattern to stop processing if any of the TagDecorators return a value other than null .
66
25
163,967
protected PriorityConverterMap getConverters ( ) { //the map to be returned PriorityConverterMap allConverters = new PriorityConverterMap ( ) ; //add the default converters if ( addDefaultConvertersFlag ( ) ) { allConverters . addAll ( getDefaultConverters ( ) ) ; } //add the discovered converters if ( addDiscoveredCon...
Get the converters default discovered and user registered converters are included as appropriate .
165
16
163,968
JsMessagingEngine [ ] getMEsToCheck ( ) { final String methodName = "getMEsToCheck" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } JsMessagingEngine [ ] retVal = SibRaEngineComponent . getMessagingEngines ( _endpointConfiguration . getBu...
All Messaging engines including those that are not running should be considered part of the list that the MDB should look at before trying a remote connection .
147
30
163,969
JsMessagingEngine [ ] removeStoppedMEs ( JsMessagingEngine [ ] MEList ) { final String methodName = "removeStoppedMEs" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , MEList ) ; } JsMessagingEngine [ ] startedMEs = SibRaEngineComponent . getA...
This method will remove non running MEs from the supplied array of MEs
306
15
163,970
public void messagingEngineDestroyed ( JsMessagingEngine messagingEngine ) { final String methodName = "messagingEngineDestroyed" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } /* * If there are no longer any local mess...
If a messaging engine is destroyed and there are now no local messaging engines on the server then kick off a check to see if we can connect to one .
379
31
163,971
public RemoteListCache getCache ( ) { RemoteRepositoryCache logCache = getLogResult ( ) == null ? null : getLogResult ( ) . getCache ( ) ; RemoteRepositoryCache traceCache = getTraceResult ( ) == null ? null : getTraceResult ( ) . getCache ( ) ; return switched ? new RemoteListCacheImpl ( traceCache , logCache ) : new ...
returns this result cache usable for remote transport
97
9
163,972
public void setCache ( RemoteListCache cache ) { if ( cache instanceof RemoteListCacheImpl ) { RemoteListCacheImpl cacheImpl = ( RemoteListCacheImpl ) cache ; if ( getLogResult ( ) != null ) { RemoteRepositoryCache logCache = switched ? cacheImpl . getTraceCache ( ) : cacheImpl . getLogCache ( ) ; if ( logCache != null...
sets cache for this result based on the provided one
187
10
163,973
protected Iterator < RepositoryLogRecord > getNewIterator ( int offset , int length ) { OnePidRecordListImpl logResult = getLogResult ( ) ; OnePidRecordListImpl traceResult = getTraceResult ( ) ; if ( logResult == null && traceResult == null ) { return EMPTY_ITERATOR ; } else if ( traceResult == null ) { return logResu...
Creates new OnePidRecordIterator returning records in the range .
161
14
163,974
@ Override public void processXML ( ) throws InjectionException { @ SuppressWarnings ( "unchecked" ) List < ServiceRef > serviceRefs = ( List < ServiceRef > ) ivNameSpaceConfig . getWebServiceRefs ( ) ; // no need to do any work if there are no service refs in the XML if ( serviceRefs == null || serviceRefs . isEmpty (...
This method will process any service - ref elements in the client s deployment descriptor .
532
16
163,975
private static void checkResponseCode ( URLConnection uc ) throws IOException { if ( uc instanceof HttpURLConnection ) { HttpURLConnection httpConnection = ( HttpURLConnection ) uc ; int rc = httpConnection . getResponseCode ( ) ; if ( rc != HttpURLConnection . HTTP_OK && rc != HttpURLConnection . HTTP_MOVED_TEMP ) { t...
If URLConnection is an HTTP connection check that the response code is HTTP_OK
96
16
163,976
private String getCommonRootDir ( String filePath , HashMap validFilePaths ) { for ( Iterator it = validFilePaths . entrySet ( ) . iterator ( ) ; it . hasNext ( ) ; ) { Map . Entry entry = ( Map . Entry ) it . next ( ) ; String path = ( String ) ( ( entry ) . getKey ( ) ) ; if ( filePath . startsWith ( path ) ) return ...
Retrieves the directory in common between the specified path and the archive root directory . If the file path cannot be found among the valid paths then null is returned .
108
33
163,977
private ArrayList < String > getExtensionInstallDirs ( ) throws IOException { String extensiondir = root + "etc/extensions/" ; ArrayList < String > extensionDirs = new ArrayList < String > ( ) ; for ( Entry entry : container ) { if ( entry . getName ( ) . startsWith ( extensiondir ) && entry . getName ( ) . endsWith ( ...
Retrieves all the extension products install directories as indicated their properties file .
172
15
163,978
public static void printNeededIFixes ( File outputDir , List extractedFiles ) { try { // To get the ifix information we run the productInfo validate command which as well as // listing the state of the runtime, also displays any ifixes that need to be reapplied. Runtime runtime = Runtime . getRuntime ( ) ; // Set up th...
If necessary this will print a message saying that the installed files mean that an iFix needs to be re - installed .
285
24
163,979
protected Set listMissingCoreFeatures ( File outputDir ) throws SelfExtractorFileException { Set missingFeatures = new HashSet ( ) ; // If we have a Require Feature manifest header, we need to check that the runtime we're extracting into contains the // required features. If the customer has minified their runtime to a...
This method checks that all the core features defined in the the manifest header exist in the server runtime we re extracting into and returns any features that don t . If the coreFeatures header is blank it means we re not an extended jar .
650
47
163,980
protected static boolean argIsOption ( String arg , String option ) { return arg . equalsIgnoreCase ( option ) || arg . equalsIgnoreCase ( ' ' + option ) ; }
Test if the argument is an option . Allow single or double leading - be case insensitive .
39
18
163,981
protected static void displayCommandLineHelp ( SelfExtractor extractor ) { // This method takes a SelfExtractor in case we want to tailor the help to the current archive // Get the name of the JAR file to display in the command syntax"); String jarName = System . getProperty ( "sun.java.command" , "wlp-liberty-develope...
Display command line usage .
400
5
163,982
public void handleLicenseAcceptance ( LicenseProvider licenseProvider , boolean acceptLicense ) { // // Display license requirement // SelfExtract . wordWrappedOut ( SelfExtract . format ( "licenseStatement" , new Object [ ] { licenseProvider . getProgramName ( ) , licenseProvider . getLicenseName ( ) } ) ) ; System . ...
This method will print out information about the license and if necessary prompt the user to accept it .
164
19
163,983
private static boolean obtainLicenseAgreement ( LicenseProvider licenseProvider ) { // Prompt for word-wrapped display of license agreement & information boolean view ; SelfExtract . wordWrappedOut ( SelfExtract . format ( "showAgreement" , "--viewLicenseAgreement" ) ) ; view = SelfExtract . getResponse ( SelfExtract ....
Display and obtain agreement for the license terms
313
8
163,984
public String close ( ) { if ( instance == null ) { return null ; } try { container . close ( ) ; instance = null ; } catch ( IOException e ) { return e . getMessage ( ) ; } return null ; }
Release the jar file and null instance so that it can be deleted
50
13
163,985
public void clear ( ) { // TODO not currently used since EventImpl itself doesn't have a clear this . parentMap = null ; if ( null != this . values ) { for ( int i = 0 ; i < this . values . length ; i ++ ) { this . values [ i ] = null ; } this . values = null ; } }
Clear all content from this map . This will disconnect from any parent map as well .
74
17
163,986
public V get ( String name ) { V rc = null ; K key = getKey ( name ) ; if ( null != key ) { rc = get ( key ) ; } return rc ; }
Query the possible value associated with a named EventLocal . A null is returned if the name does not match any stored value or if that stored value is explicitly null .
41
33
163,987
private K getKey ( String name ) { if ( null != this . keys ) { // we have locally stored values final K [ ] temp = this . keys ; K key ; for ( int i = 0 ; i < temp . length ; i ++ ) { key = temp [ i ] ; if ( null != key && name . equals ( key . toString ( ) ) ) { return key ; } } } // if nothing found locally and we h...
Look for the key with the provided name . This returns null if no match is found .
126
18
163,988
public V get ( K key ) { return get ( key . hashCode ( ) / SIZE_ROW , key . hashCode ( ) % SIZE_ROW ) ; }
Query the value for the provided key .
39
8
163,989
public void put ( K key , V value ) { final int hash = key . hashCode ( ) ; final int row = hash / SIZE_ROW ; final int column = hash & ( SIZE_ROW - 1 ) ; // DON'T use the % operator as we // need the result to be // non-negative (-1%16 is -1 for // example) validateKey ( hash ) ; validateTable ( row ) ; this . values ...
Put a key and value pair into the storage map .
115
11
163,990
public V remove ( K key ) { final int hash = key . hashCode ( ) ; final int row = hash / SIZE_ROW ; final int column = hash & ( SIZE_ROW - 1 ) ; // DON'T use the % operator as we // need the result to be // non-negative (-1%16 is -1 for // example) final V rc = get ( row , column ) ; validateKey ( hash ) ; validateTabl...
Remove a key from the storage .
126
7
163,991
@ SuppressWarnings ( "unchecked" ) private void validateKey ( int index ) { final int size = ( index + 1 ) ; if ( null == this . keys ) { // nothing has been created yet this . keys = ( K [ ] ) new Object [ size ] ; } else if ( index >= this . keys . length ) { // this row puts us beyond the current storage Object [ ] ...
Ensure that we have space in the local key array for the target index .
132
16
163,992
@ SuppressWarnings ( "unchecked" ) private void validateTable ( int targetRow ) { // TODO pooling of the arrays? if ( null == this . values ) { // nothing has been created yet int size = ( targetRow + 1 ) ; if ( SIZE_TABLE > size ) { size = SIZE_TABLE ; } this . values = ( V [ ] [ ] ) new Object [ size ] [ ] ; } else i...
Validate that the storage table contains the provided row . This will allocate new space if that is required .
280
21
163,993
public String getRemoteEngineUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRemoteEngineUuid" ) ; String engineUUID = _anycastInputHandler . getLocalisationUuid ( ) . toString ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) )...
Return the remote engine uuid
120
6
163,994
public RequestViewMetadata cloneInstance ( ) { RequestViewMetadata rvm = new RequestViewMetadata ( ) ; rvm . initialProcessedClasses = new HashMap < Class < ? > , Boolean > ( this . initialProcessedClasses != null ? this . initialProcessedClasses : this . processedClasses ) ; if ( this . initialAddedResources != null )...
Clone the current request view metadata into another instance so it can be used in a view .
151
19
163,995
public Object get ( int accessor ) { try { return getValue ( accessor ) ; } catch ( JMFException ex ) { FFDCFilter . processException ( ex , "get" , "134" , this ) ; return null ; } }
Other overridden methods .
53
5
163,996
@ Trivial private static final boolean containsAll ( LinkedHashMap < ThreadContextProvider , ThreadContext > contextProviders , List < ThreadContextProvider > prereqs ) { for ( ThreadContextProvider prereq : prereqs ) if ( ! contextProviders . containsKey ( prereq ) ) return false ; return true ; }
Utility method that indicates whether or not a list of thread context providers contains all of the specified prerequisites .
71
22
163,997
public static void notAvailable ( String jeeName , String taskName ) { String message ; int modSepIndex = jeeName . indexOf ( ' ' ) ; if ( modSepIndex == - 1 ) { message = Tr . formatMessage ( tc , "CWWKC1011.app.unavailable" , taskName , jeeName ) ; } else { String application = jeeName . substring ( 0 , modSepIndex )...
Raises IllegalStateException because the application or application component is unavailable .
249
14
163,998
@ Override public @ Sensitive byte [ ] serialize ( ) throws IOException { // Captured thread context ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; int size = threadContext . size ( ) ; byte [ ] [ ] contextBytes = new byte [ size ] [ ] ; for ( int i = 0 ; i < size ; i ++ ) { bout . reset ( ) ; ObjectOutpu...
Serializes this thread context descriptor to bytes .
367
9
163,999
public boolean isActive ( ) { FacesContext facesContext = FacesContext . getCurrentInstance ( ) ; if ( facesContext != null ) { return facesContext . getViewRoot ( ) != null ; } else { // No FacesContext means no view scope active. return false ; } }
The WindowContext is active once a current windowId is set for the current Thread .
59
17