idx
int64
0
41.2k
question
stringlengths
73
5.81k
target
stringlengths
5
918
25,000
public static final long computeHashCode ( String str , boolean modifyAlgorithm ) { char chars [ ] = str . toCharArray ( ) ; long h = initial_hash ; for ( int i = 0 ; i < chars . length ; ++ i ) { char thisChar = chars [ i ] ; if ( modifyAlgorithm ) { int j = i ; while ( j > 0 ) { if ( j >= 64 && thisChar == chars [ j ...
are the same .
25,001
public void addPhaseListener ( PhaseListener phaseListener ) { if ( phaseListener == null ) { throw new NullPointerException ( "phaseListener" ) ; } getStateHelper ( ) . add ( PropertyKeys . phaseListeners , phaseListener ) ; }
Adds a The phaseListeners attached to ViewRoot .
25,002
@ JSFProperty ( returnSignature = "void" , methodSignature = "javax.faces.event.PhaseEvent" , jspName = "afterPhase" , stateHolder = true ) public MethodExpression getAfterPhaseListener ( ) { return ( MethodExpression ) getStateHelper ( ) . eval ( PropertyKeys . afterPhaseListener ) ; }
MethodBinding pointing to a method that takes a javax . faces . event . PhaseEvent and returns void called after every phase except for restore view .
25,003
@ JSFProperty ( returnSignature = "void" , methodSignature = "javax.faces.event.PhaseEvent" , jspName = "beforePhase" , stateHolder = true ) public MethodExpression getBeforePhaseListener ( ) { return ( MethodExpression ) getStateHelper ( ) . eval ( PropertyKeys . beforePhaseListener ) ; }
MethodBinding pointing to a method that takes a javax . faces . event . PhaseEvent and returns void called before every phase except for restore view .
25,004
private boolean _broadcastAll ( FacesContext context , List < ? extends FacesEvent > events , Collection < FacesEvent > eventsAborted ) { assert events != null ; for ( int i = 0 ; i < events . size ( ) ; i ++ ) { FacesEvent event = events . get ( i ) ; UIComponent source = event . getComponent ( ) ; UIComponent composi...
Broadcast all events in the specified collection stopping the at any time an AbortProcessingException is thrown .
25,005
public void removePhaseListener ( PhaseListener phaseListener ) { if ( phaseListener == null ) { return ; } getStateHelper ( ) . remove ( PropertyKeys . phaseListeners , phaseListener ) ; }
Removes a The phaseListeners attached to ViewRoot .
25,006
private boolean _process ( FacesContext context , PhaseId phaseId , PhaseProcessor processor ) { RuntimeException processingException = null ; try { if ( ! notifyListeners ( context , phaseId , getBeforePhaseListener ( ) , true ) ) { try { if ( processor != null ) { processor . process ( context , this ) ; } broadcastE...
Process the specified phase by calling PhaseListener . beforePhase for every phase listeners defined on this view root then calling the process method of the processor broadcasting relevant events and finally notifying the afterPhase method of every phase listeners registered on this view root .
25,007
private Events _getEvents ( PhaseId phaseId ) { int size = _events . size ( ) ; List < FacesEvent > anyPhase = new ArrayList < FacesEvent > ( size ) ; List < FacesEvent > onPhase = new ArrayList < FacesEvent > ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { FacesEvent event = _events . get ( i ) ; if ( event . getPhas...
Gathers all event for current and ANY phase
25,008
private boolean getClause ( Iterator tokens , List clause ) { while ( tokens . hasNext ( ) ) { Object token = tokens . next ( ) ; if ( token == matchMany ) return true ; clause . add ( token ) ; } return false ; }
matchMany false if it was ended by running out of tokens .
25,009
boolean checkPrefix ( char [ ] chars , int [ ] cursor ) { if ( prefix == null ) return true ; else return matchClause ( prefix , chars , cursor ) ; }
Internal method to evaluate a candidate against the prefix
25,010
static boolean matchForward ( char [ ] chars , char [ ] pattern , int [ ] cursor ) { if ( pattern . length > cursor [ 1 ] - cursor [ 0 ] ) return false ; int index = 0 ; while ( index < pattern . length ) if ( chars [ cursor [ 0 ] ++ ] != pattern [ index ++ ] ) return false ; return true ; }
Match characters in a forward direction
25,011
boolean checkSuffix ( char [ ] chars , int [ ] cursor ) { if ( suffix == null ) return true ; int start = cursor [ 1 ] - suffix . minlen ; if ( start < cursor [ 0 ] ) return false ; if ( ! matchClause ( suffix , chars , new int [ ] { start , cursor [ 1 ] } ) ) return false ; cursor [ 1 ] = start ; return true ; }
Internal method to evaluate a candidate against the suffix
25,012
public boolean matchMiddle ( char [ ] chars , int start , int end ) { if ( midClauses == null ) return true ; int [ ] cursor = new int [ ] { start , end } ; for ( int i = 0 ; i < midClauses . length ; i ++ ) { Clause clause = midClauses [ i ] ; if ( ! find ( clause , chars , cursor ) ) return false ; } return true ; }
Match a sequence of characters against the midClauses of this pattern
25,013
private boolean find ( Clause clause , char [ ] chars , int [ ] cursor ) { int start = cursor [ 0 ] ; int end = cursor [ 1 ] ; while ( end - start >= clause . minlen ) if ( matchClause ( clause , chars , cursor ) ) return true ; else cursor [ 0 ] = ++ start ; return false ; }
the end of the found portion .
25,014
public static Object parsePattern ( String pattern , boolean escaped , char escape ) { char [ ] accum = new char [ pattern . length ( ) ] ; int finger = 0 ; List tokens = new ArrayList ( ) ; boolean trivial = true ; for ( int i = 0 ; i < pattern . length ( ) ; i ++ ) { char c = pattern . charAt ( i ) ; if ( c == sqlMat...
Parse a string containing a SQL - style pattern
25,015
public VirtualConnection write ( long numBytes , TCPWriteCompletedCallback writeCallback , boolean forceQueue , int timeout ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "write(" + numBytes + ",..," + forceQueue + "," + timeout + ")" ) ; } getTCPConnLink ( ) . increm...
external async write
25,016
protected VirtualConnection writeInternal ( long numBytes , TCPWriteCompletedCallback writeCallback , boolean forceQueue , int time ) { int timeout = time ; if ( timeout == IMMED_TIMEOUT ) { immediateTimeout ( ) ; return null ; } else if ( timeout == ABORT_TIMEOUT ) { abort ( ) ; immediateTimeout ( ) ; return null ; } ...
internal async write
25,017
public ByteBuffer preProcessOneWriteBuffer ( ) { WsByteBufferImpl wsBuffImpl = null ; try { wsBuffImpl = ( WsByteBufferImpl ) getBuffer ( ) ; } catch ( ClassCastException cce ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Writing with a non-WsByteBufferImpl" ) ; } re...
Before attempting a write of one buffer perform any work required and return the proper NIO buffer to write out .
25,018
public void postProcessWriteBuffers ( long dataWritten ) { if ( getByteBufferArrayDirect ( ) == null ) { try { if ( ( ( WsByteBufferImpl ) getBuffer ( ) ) . oWsBBDirect != null ) { ( ( WsByteBufferImpl ) getBuffer ( ) ) . setParmsFromDirectBuffer ( ) ; } } catch ( ClassCastException cce ) { } return ; } WsByteBuffer ws...
After the write call perform any actions required on the write buffers .
25,019
protected WeldCreationalContext < T > getCreationalContext ( ManagedObjectInvocationContext < T > invocationContext ) throws ManagedObjectException { ManagedObjectContext managedObjectContext = invocationContext . getManagedObjectContext ( ) ; @ SuppressWarnings ( "unchecked" ) WeldCreationalContext < T > creationalCon...
Get the CreationalContext from an existing ManagedObjectInvocationContext
25,020
public MessageMap getMap ( BigInteger index ) { if ( array != null ) return array [ index . intValue ( ) ] ; else return ( MessageMap ) hashtable . get ( index ) ; }
Get an element from the table
25,021
public void set ( MessageMap value ) { if ( array != null ) array [ value . multiChoice . intValue ( ) ] = value ; else hashtable . put ( value . multiChoice , value ) ; }
Set an element into the table
25,022
public H2StreamProcessor startNewInboundSession ( Integer streamID ) { H2StreamProcessor h2s = null ; h2s = muxLink . createNewInboundLink ( streamID ) ; return h2s ; }
of the http1 . 1 HttpInboundLink . HttpInboundLink is wrapped by the H2HttpInboundLinkWrap that the new stream has access to .
25,023
public void fireEvent ( final InvalidationEvent event ) { if ( bUpdateInvalidationListener ) { synchronized ( hsInvalidationListeners ) { if ( invalidationListenerCount > 0 ) { currentInvalidationListeners = new InvalidationListener [ invalidationListenerCount ] ; hsInvalidationListeners . toArray ( currentInvalidation...
The listeners are called when the fireEvent method is invoked .
25,024
public void addListener ( InvalidationListener listener ) { synchronized ( hsInvalidationListeners ) { hsInvalidationListeners . add ( listener ) ; invalidationListenerCount = hsInvalidationListeners . size ( ) ; bUpdateInvalidationListener = true ; } }
This adds a new listener to the Invalidation listener .
25,025
public void removeListener ( InvalidationListener listener ) { synchronized ( hsInvalidationListeners ) { hsInvalidationListeners . remove ( listener ) ; invalidationListenerCount = hsInvalidationListeners . size ( ) ; bUpdateInvalidationListener = true ; } }
This removes a specified listener for Invalidation listener . If it was not already registered then this call is ignored .
25,026
public boolean shouldInvalidate ( Object id , int sourceOfInvalidation , int causeOfInvalidation ) { boolean retVal = true ; if ( preInvalidationListenerCount > 0 ) { try { retVal = currentPreInvalidationListener . shouldInvalidate ( id , sourceOfInvalidation , causeOfInvalidation ) ; } catch ( Throwable t ) { com . ib...
The listeners are called when the preInvalidate method is invoked .
25,027
public void addListener ( PreInvalidationListener listener ) { if ( preInvalidationListenerCount == 1 && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Over-writing current PreInvalidationListener with new one" ) ; currentPreInvalidationListener = listener ; preInvalidationListenerCount = 1 ; }
This adds a new listener to the PreInvalidation listener .
25,028
public void cacheEntryChanged ( final ChangeEvent event ) { if ( bUpdateChangeListener ) { synchronized ( hsChangeListeners ) { if ( changeListenerCount > 0 ) { currentChangeListeners = new ChangeListener [ changeListenerCount ] ; hsChangeListeners . toArray ( currentChangeListeners ) ; } else { currentChangeListeners ...
The listeners are called when the cacheEntryChange method is invoked .
25,029
public void addListener ( ChangeListener listener ) { synchronized ( hsChangeListeners ) { hsChangeListeners . add ( listener ) ; changeListenerCount = hsChangeListeners . size ( ) ; bUpdateChangeListener = true ; } }
This adds a new change listener to the Change listener .
25,030
public void removeListener ( ChangeListener listener ) { synchronized ( hsChangeListeners ) { hsChangeListeners . remove ( listener ) ; changeListenerCount = hsChangeListeners . size ( ) ; bUpdateChangeListener = true ; } }
This removes a specified listener for the Change listener . If it was not already registered then this call is ignored .
25,031
public ServerBuilder addProductExtension ( String name , Properties props ) { if ( ( name != null ) && ( props != null ) ) { if ( productExtensions == null ) { productExtensions = new HashMap < String , Properties > ( ) ; } this . productExtensions . put ( name , props ) ; } return this ; }
Add a product extension .
25,032
public List < com . ibm . wsspi . security . wim . model . SortKeyType > getSortKeys ( ) { if ( sortKeys == null ) { sortKeys = new ArrayList < com . ibm . wsspi . security . wim . model . SortKeyType > ( ) ; } return this . sortKeys ; }
Gets the value of the sortKeys property .
25,033
private final Map < String , Object > appendStateComparison ( StringBuilder sb , TaskState state , boolean inState ) { Map < String , Object > params = new HashMap < String , Object > ( ) ; switch ( state ) { case SCHEDULED : sb . append ( "t.STATES" ) . append ( inState ? "<" : ">=" ) . append ( ":s" ) ; params . put ...
Appends conditions to a JPA query to filter based on the presence or absence of the specified state . This method optimizes to avoid the MOD function if possible .
25,034
public boolean cancel ( long taskId ) throws Exception { StringBuilder update = new StringBuilder ( 87 ) . append ( "UPDATE Task t SET t.STATES=" ) . append ( TaskState . CANCELED . bit + TaskState . ENDED . bit ) . append ( ",t.VERSION=t.VERSION+1 WHERE t.ID=:i AND t.STATES<" ) . append ( TaskState . ENDED . bit ) ; f...
Update the record for a task in the persistent store to indicate that the task is canceled .
25,035
public void create ( TaskRecord taskRecord ) throws Exception { Task task = new Task ( taskRecord ) ; EntityManager em = getPersistenceServiceUnit ( ) . createEntityManager ( ) ; try { em . persist ( task ) ; em . flush ( ) ; taskRecord . setId ( task . ID ) ; } finally { em . close ( ) ; } }
Create an entry in the persistent store for a new task .
25,036
@ FFDCIgnore ( { EntityExistsException . class , PersistenceException . class , Exception . class } ) public boolean createProperty ( String name , String value ) throws Exception { EntityManager em = getPersistenceServiceUnit ( ) . createEntityManager ( ) ; Property property = new Property ( name , value ) ; try { em ...
Create a property entry in the persistent store .
25,037
public final PersistenceServiceUnit getPersistenceServiceUnit ( ) throws Exception { lock . readLock ( ) . lock ( ) ; try { if ( destroyed ) throw new IllegalStateException ( ) ; if ( persistenceServiceUnit == null ) { lock . readLock ( ) . unlock ( ) ; lock . writeLock ( ) . lock ( ) ; try { if ( destroyed ) throw new...
Returns the persistence service unit lazily initializing if necessary .
25,038
public void combine ( WSStatistic otherStat ) { if ( ! validate ( otherStat ) ) return ; AverageStatisticImpl other = ( AverageStatisticImpl ) otherStat ; boolean previousCountWasZero = ( count == 0 ) ; count += other . count ; total += other . total ; sumOfSquares += other . sumOfSquares ; if ( other . count != 0 && (...
Combine this StatData with other StatData
25,039
public synchronized boolean next ( long seqNum ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "next" , new Long ( seqNum ) ) ; expiryAlarmHandle . cancel ( ) ; expiryAlarmHandle = am . create ( parent . getMessageProcessor ( ) . getCustomProperties ( ) . get_browse_e...
Send the next message in this session to the remote ME .
25,040
public synchronized final void close ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; closed = true ; if ( browseCursor != null ) { try { browseCursor . finished ( ) ; } catch ( SISessionDroppedException e ) { FFDCFilter . processException ( e , "com.ibm....
Close this session
25,041
public synchronized final void keepAlive ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "keepAlive" ) ; if ( ! closed ) { if ( expiryAlarmHandle != null ) { expiryAlarmHandle . cancel ( ) ; } expiryAlarmHandle = am . create ( parent . getMessageProcessor ( ) . getC...
Keep this session alive
25,042
public void alarm ( Object thandle ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "alarm" , thandle ) ; synchronized ( this ) { if ( expiryAlarmHandle != null ) { expiryAlarmHandle = null ; close ( ) ; parent . removeBrowserSession ( key ) ; } } if ( TraceComponent ....
The alarm has expired
25,043
public void setAsynchConsumerCallback ( int requestNumber , int maxActiveMessages , long messageLockExpiry , int batchsize , OrderingContext orderContext , boolean stoppable , int maxSequentialFailures , long hiddenMessageDelay ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry...
Sets the async consumer for a read ahead session .
25,044
public void deleteSet ( int requestNumber , SIMessageHandle [ ] msgHandles , int tran , boolean reply ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deleteSet" , new Object [ ] { requestNumber , msgHandles , tran , reply } ) ; if ( TraceComponent . isAnyTraci...
This method will inform the ME that we have consumed messages that are currently locked on our behalf .
25,045
int sendMessage ( SIBusMessage sibMessage ) throws MessageCopyFailedException , IncorrectMessageTypeException , MessageEncodeFailedException , UnsupportedEncodingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "sendMessage" , sibMessage ) ; int msgLen =...
This method will send a message to the attached client .
25,046
private int sendEntireMessage ( SIBusMessage sibMessage , List < DataSlice > messageSlices ) throws MessageCopyFailedException , IncorrectMessageTypeException , MessageEncodeFailedException , UnsupportedEncodingException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this ,...
Send the entire message in one big buffer . If the messageSlices parameter is not null then the message has already been encoded and does not need to be done again . This may be in the case where the message was destined to be sent in chunks but is so small that it does not seem worth it .
25,047
public void setRequestedBytes ( int newRequestedBytes ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setRequestedBytes" , newRequestedBytes ) ; requestedBytes = newRequestedBytes ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Sib...
This method can be used to set the amount of bytes that the client has requested to keep in the proxy queue .
25,048
public void setSentBytes ( int newSentBytes ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setSentBytes" , newSentBytes ) ; sentBytes = newSentBytes ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setSe...
This method will update the amount of bytes we have sent to the client .
25,049
public void setLowestPriority ( short pri ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setLowestPriority" , pri ) ; mainConsumer . setLowestPriority ( pri ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , t...
This method will update the session lowest priority value .
25,050
private void setExtendedProperty ( String property , Object value ) { String dataType = extendedPropertiesDataType . get ( property ) ; String valueClass = value . getClass ( ) . getSimpleName ( ) ; if ( dataType . equals ( valueClass ) && ! extendedMultiValuedProperties . contains ( property ) ) { extendedPropertiesVa...
Set an extended property s value .
25,051
void balance ( int t0_depth , DeleteStack stack ) { int ntop = stack . topIndex ( ) ; InsertStack istack = stack . insertStack ( ) ; DeleteStack . Linearizer lxx = stack . linearizer ( ) ; DeleteStack . FringeNote xx = stack . fringeNote ( ) ; xx . depthDecrease = false ; xx . conditionalDecrease = false ; GBSNode f = ...
Balance a fringe following delete .
25,052
private void leftFringe ( DeleteStack . Linearizer lxx , DeleteStack . FringeNote xx , InsertStack istack , GBSNode f , GBSNode g , boolean gLeft , int t0_depth ) { GBSNode w = f . rightChild ( ) ; GBSNode s = f . leftChild ( ) ; GBSNode bfather = g ; GBSNode sh = null ; GBSNode p = null ; int fbalance = f . balance ( ...
Handle the case where we deleted from a left fringe .
25,053
private void rightFringe ( DeleteStack . Linearizer lxx , DeleteStack . FringeNote xx , InsertStack istack , GBSNode f , GBSNode g , boolean gLeft ) { GBSNode w = f . leftChild ( ) ; GBSNode s = f . rightChild ( ) ; int fbalance = f . balance ( ) ; f . clearBalance ( ) ; if ( w == null ) { boolean bLeft = true ; if ( g...
Handle the case where we deleted from a right fringe .
25,054
private void rightDepth ( DeleteStack . FringeNote xx , int fbalance ) { switch ( fbalance ) { case 1 : xx . depthDecrease = true ; break ; case 0 : xx . conditionalDecrease = true ; xx . conditionalBalance = 0 ; break ; case - 1 : xx . conditionalDecrease = true ; xx . conditionalBalance = 1 ; break ; default : throw ...
Given the original balance factor from the original parent of the t0 sub - tree from which we deleted from the right side determine the possible new balance factor and depth decrease indicator .
25,055
private void lastFringe ( DeleteStack . FringeNote xx , GBSNode g , boolean gLeft , DeleteStack stack , int ntop , InsertStack istack ) { if ( gLeft ) { stack . setNode ( ntop , g . leftChild ( ) ) ; } else { stack . setNode ( ntop , g . rightChild ( ) ) ; } GBSNode p = xx . newf ; GBSNode q = null ; istack . start ( x...
Examine the final fringe and re - balance if necessary .
25,056
private GBSNode lastInList ( GBSNode p ) { GBSNode q = p ; p = p . rightChild ( ) ; while ( p != null ) { q = p ; p = p . rightChild ( ) ; } return q ; }
Return the last node in a linear list of nodes linked together by their right child pointer .
25,057
private GBSNode linearize ( DeleteStack . Linearizer xx , GBSNode p ) { xx . headp = null ; xx . lastp = null ; innerLinearize ( xx , p ) ; return xx . headp ; }
Turn a sub - fringe into a linear list .
25,058
private void innerLinearize ( DeleteStack . Linearizer xx , GBSNode p ) { xx . depth ++ ; if ( xx . depth > GBSTree . maxDepth ) throw new OptimisticDepthException ( "maxDepth (" + GBSTree . maxDepth + ") exceeded in GBSDeleteFringe.innerLinearize()." ) ; if ( p . leftChild ( ) != null ) { innerLinearize ( xx , p . lef...
This is the recursive part of linearize .
25,059
public void init ( HttpInboundServiceContext sc , BNFHeaders hdrs ) { setOwner ( sc ) ; setBinaryParseState ( HttpInternalConstants . PARSING_BINARY_VERSION ) ; if ( null != hdrs ) { hdrs . duplicate ( this ) ; } initVersion ( ) ; }
Initialize this outgoing response message with specific headers ie . ones stored in a cache perhaps .
25,060
public void init ( HttpOutboundServiceContext sc , BNFHeaders hdrs ) { setOwner ( sc ) ; setBinaryParseState ( HttpInternalConstants . PARSING_BINARY_VERSION ) ; if ( null != hdrs ) { hdrs . duplicate ( this ) ; } }
Initialize this incoming response message with specific headers ie . ones stored in a cache perhaps .
25,061
private void initVersion ( ) { VersionValues ver = getServiceContext ( ) . getRequestVersion ( ) ; VersionValues configVer = getServiceContext ( ) . getHttpConfig ( ) . getOutgoingVersion ( ) ; if ( VersionValues . V10 . equals ( configVer ) && VersionValues . V11 . equals ( ver ) ) { if ( TraceComponent . isAnyTracing...
Initialize the response version to either match the request version or to the lower 1 . 0 version based on the channel configuration .
25,062
public boolean isBodyExpected ( ) { if ( VersionValues . V10 . equals ( getVersionValue ( ) ) ) { return isBodyAllowed ( ) ; } if ( getServiceContext ( ) . getRequestMethod ( ) . equals ( MethodValues . HEAD ) ) { return false ; } boolean rc = super . isBodyExpected ( ) ; if ( ! rc ) { rc = containsHeader ( HttpHeaderK...
Query whether a body is expected to be present with this message . Note that this is only an expectation and not a definitive answer . This will check the necessary headers status codes etc to see if any indicate a body should be present . Without actually reading for a body this cannot be sure however .
25,063
public boolean isBodyAllowed ( ) { if ( super . isBodyAllowed ( ) ) { if ( getServiceContext ( ) . getRequestMethod ( ) . equals ( MethodValues . HEAD ) ) { return false ; } return this . myStatusCode . isBodyAllowed ( ) ; } return false ; }
Query whether or not a body is allowed to be present for this message . This is not whether a body is present but rather only whether it is allowed to be present .
25,064
public void clear ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Clearing this response: " + this ) ; } super . clear ( ) ; this . myStatusCode = StatusCodes . OK ; this . myReason = null ; this . myReasonBytes = null ; }
Clear this message for re - use .
25,065
public void destroy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Destroying this response: " + this ) ; } HttpObjectFactory tempFactory = getObjectFactory ( ) ; super . destroy ( ) ; if ( null != tempFactory ) { tempFactory . releaseResponse ( this ) ; } }
Destroy this response and return it to the factory .
25,066
public boolean parseBinaryFirstLine ( WsByteBuffer buff ) throws MalformedMessageException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "parseBinaryFirstLine for " + this ) ; Tr . debug ( tc , "Buffer: " + buff ) ; } if ( getBinaryParseState ( ) == HttpInternalConstan...
Begin parsing line out from a given buffer . Returns boolean as to whether it has found the end of the first line .
25,067
public WsByteBuffer [ ] marshallBinaryFirstLine ( ) { WsByteBuffer [ ] firstLine = new WsByteBuffer [ 1 ] ; firstLine [ 0 ] = allocateBuffer ( getOutgoingBufferSize ( ) ) ; firstLine = putByte ( HttpInternalConstants . BINARY_TRANSPORT_V1 , firstLine ) ; if ( getVersionValue ( ) . isUndefined ( ) ) { byte [ ] data = ge...
Called for marshalling the first line of binary HTTP responses .
25,068
protected void parsingComplete ( ) throws MalformedMessageException { int num = getNumberFirstLineTokens ( ) ; if ( 3 != num && 2 != num ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "numFirstLineTokensRead is " + getNumberFirstLineTokens ( ) ) ; } if ( getServiceContext ( ) . getHttpConfig ( ) . getDebugLog (...
Called the parsing of the first line is complete . Performs checks on whether all the necessary data has been found .
25,069
public void setStatusCode ( StatusCodes code ) { if ( ! code . equals ( this . myStatusCode ) ) { this . myStatusCode = code ; this . myReason = null ; this . myReasonBytes = null ; super . setFirstLineChanged ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "setSta...
Set the status code of the response message .
25,070
public boolean isTemporaryStatusCode ( ) { int code = this . myStatusCode . getIntCode ( ) ; if ( HttpDispatcher . useEE7Streams ( ) && ( code == 101 ) ) return false ; return ( 100 <= code && 200 > code ) ; }
Query whether this response message s status code represents a temporary status of 1xx .
25,071
public String getReasonPhrase ( ) { if ( null == this . myReason ) { this . myReason = GenericUtils . getEnglishString ( getReasonPhraseBytes ( ) ) ; } return this . myReason ; }
Query the value of the reason phrase .
25,072
public void debug ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Response Message: " + this ) ; Tr . debug ( tc , "Status: " + getStatusCodeAsInt ( ) ) ; Tr . debug ( tc , "Reason: " + getReasonPhrase ( ) ) ; super . debug ( ) ; } }
Debug print this response message to the RAS trace log .
25,073
public AS_ContextSec encodeIOR ( Codec codec ) throws Exception { AS_ContextSec result = new AS_ContextSec ( ) ; result . target_supports = 0 ; result . target_requires = 0 ; result . client_authentication_mech = Util . encodeOID ( NULL_OID ) ; result . target_name = Util . encodeGSSExportName ( NULL_OID , "" ) ; retur...
This method should not be invoked but just in case that is not the case return null OID .
25,074
@ SuppressWarnings ( "unchecked" ) private < T > Entry < Collection < ? extends Callable < T > > , TaskLifeCycleCallback [ ] > createCallbacks ( Collection < ? extends Callable < T > > tasks ) { int numTasks = tasks . size ( ) ; TaskLifeCycleCallback [ ] callbacks = new TaskLifeCycleCallback [ numTasks ] ; List < Calla...
Capture context for a list of tasks and create callbacks that apply context and notify the ManagedTaskListener if any . Context is not re - captured for any tasks that implement the ContextualAction marker interface .
25,075
final Map < String , String > getExecutionProperties ( Object task ) { if ( task == null ) throw new NullPointerException ( Tr . formatMessage ( tc , "CWWKC1111.task.invalid" , ( Object ) null ) ) ; Map < String , String > execProps = task instanceof ManagedTask ? ( ( ManagedTask ) task ) . getExecutionProperties ( ) :...
Returns execution properties for the task .
25,076
final String getIdentifier ( String policyExecutorIdentifier ) { return policyExecutorIdentifier . startsWith ( "managed" ) ? policyExecutorIdentifier : new StringBuilder ( name . get ( ) ) . append ( " (" ) . append ( policyExecutorIdentifier ) . append ( ')' ) . toString ( ) ; }
Utility method to compute the identifier to be used in combination with the specified policy executor identifier . We prepend the managed executor name if it isn t already included in the policy executor s identifier .
25,077
@ Reference ( policy = ReferencePolicy . DYNAMIC , target = "(id=unbound)" ) protected void setConcurrencyPolicy ( ConcurrencyPolicy svc ) { policyExecutor = svc . getExecutor ( ) ; }
Declarative Services method for setting the concurrency policy .
25,078
@ Reference ( policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . OPTIONAL , target = "(id=unbound)" ) protected void setLongRunningPolicy ( ConcurrencyPolicy svc ) { longRunningPolicyExecutorRef . set ( svc . getExecutor ( ) ) ; }
Declarative Services method for setting the long running concurrency policy .
25,079
ThreadContext suspendTransaction ( ) { ThreadContextProvider tranContextProvider = AccessController . doPrivileged ( tranContextProviderAccessor ) ; ThreadContext suspendedTranSnapshot = tranContextProvider == null ? null : tranContextProvider . captureThreadContext ( XPROPS_SUSPEND_TRAN , null ) ; if ( suspendedTranSn...
Uses the transaction context provider to suspends the currently active transaction or LTC on the thread .
25,080
final void stop ( ) { final String methodName = "stop" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } try { if ( ( _session != null ) && ( ! _sessionStopped ) ) { sessionStarted = false ; stopIfRequired ( ) ; } } catch ( final SIExceptio...
Stop this listener . Stops the consumer session .
25,081
public synchronized void consumeMessages ( final LockedMessageEnumeration lockedMessages ) { final String methodName = "consumeMessages" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , lockedMessages ) ; } if ( sessionStarting ) { if ( TRACE ...
Invoked by the message processor with an enumeration containing one or more messages locked to this consumer . Retrieves the messages from the enumeration . Schedules a piece of work that will create the dispatcher on a new thread .
25,082
static SIMessageHandle [ ] getMessageHandles ( final List messages ) { final SIMessageHandle [ ] messageHandles = new SIMessageHandle [ messages . size ( ) ] ; for ( int i = 0 ; i < messageHandles . length ; i ++ ) { final SIBusMessage message = ( SIBusMessage ) messages . get ( i ) ; messageHandles [ i ] = message . g...
Converts a list of messages to an array of message handles .
25,083
protected void startSession ( boolean deliverImmediately ) throws SIException { final String methodName = "startSession" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { this , new Boolean ( deliverImmediately ) } ) ; } boolea...
Request that the session starts . This will only occur if both SIB pacing AND MPC pacing agree that the session should start .
25,084
public String dump ( ) { StringBuilder sb = new StringBuilder ( ) ; String newLine = ContainerProperties . LineSeparator ; sb . append ( newLine ) . append ( "-- WCCMMetaData dump --" ) ; sb . append ( newLine ) . append ( "enterpriseBean = " ) . append ( enterpriseBean ) ; dump ( sb ) ; sb . append ( newLine ) . appen...
Dump contents of this object into a String object that is typically used for tracing .
25,085
public void updateChecksums ( ) { for ( Entry < File , ChecksumData > entry : checksumsMap . entrySet ( ) ) { updateChecksums ( entry . getKey ( ) , entry . getValue ( ) ) ; } }
Updates the checkSumsMap for all entries .
25,086
public void updateChecksums ( File featureDir , ChecksumData checksumData ) { Collection < File > csFiles = new ArrayList < File > ( ) ; File featureChecksumsDir = new File ( featureDir , "checksums" ) ; getCheckSumFiles ( featureChecksumsDir , csFiles ) ; File libFeaturesChecksumsDir = new File ( Utils . getInstallDir...
Updates the check sum for a specific feature directory .
25,087
private Properties initChecksumProps ( Map < String , Set < String > > useOldChecksums ) { Properties checksumProps = new Properties ( ) ; for ( Set < String > set : useOldChecksums . values ( ) ) { for ( String s : set ) { checksumProps . put ( s , "" ) ; } } return checksumProps ; }
Populates a new property file with the inputed checksum map and empty strings .
25,088
public static Properties loadChecksumFile ( File csFile ) { InputStream csis = null ; Properties csprops = new Properties ( ) ; try { csis = new FileInputStream ( csFile ) ; csprops . load ( csis ) ; } catch ( IOException e ) { logger . log ( Level . FINEST , "Failed to load the checksum file: " + csFile . getAbsoluteP...
Loads the checksum file into a properties object
25,089
public static void saveChecksumFile ( File csFile , Properties csprops , String reason ) { FileOutputStream fOut = null ; try { fOut = new FileOutputStream ( csFile ) ; csprops . store ( fOut , null ) ; logger . log ( Level . FINEST , "Successfully updated the checksum file " + csFile . getAbsolutePath ( ) + reason ) ;...
Saves the checksum properties to csFile .
25,090
public void registerNewChecksums ( File featureDir , String fileName , String checksum ) { ChecksumData checksums = checksumsMap . get ( featureDir ) ; if ( checksums == null ) { checksums = new ChecksumData ( ) ; checksumsMap . put ( featureDir , checksums ) ; } checksums . registerNewChecksums ( fileName , checksum )...
Registers a new feature directory s new checksum
25,091
public void registerExistingChecksums ( File featureDir , String symbolicName , String fileName ) { ChecksumData checksums = checksumsMap . get ( featureDir ) ; if ( checksums == null ) { checksums = new ChecksumData ( ) ; checksumsMap . put ( featureDir , checksums ) ; } checksums . registerExistingChecksums ( symboli...
Registers an existing feature directory s checksum
25,092
private TopLevelStepExecutionEntity getStepExecutionTopLevelFromJobExecutionIdAndStepName ( long jobExecutionId , String stepName ) { JobExecutionEntity jobExecution = data . executionInstanceData . get ( jobExecutionId ) ; for ( StepThreadExecutionEntity stepExec : new ArrayList < StepThreadExecutionEntity > ( jobExec...
Not well - suited to factor out into an interface method since for JPA it s embedded in a tran typically
25,093
public void deleteStepThreadInstanceOfRelatedPartitions ( TopLevelStepInstanceKey stepInstanceKey ) { long compareInstanceId = stepInstanceKey . getJobInstance ( ) ; for ( StepThreadInstanceEntity stepThreadInstance : data . stepThreadInstanceData . values ( ) ) { if ( ( stepThreadInstance . getJobInstance ( ) . getIns...
It might seems like this should delete related partition - level step executions as well .
25,094
public SIBusMessage next ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException , SINotAuthorizedException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "ne...
f169897 . 2 changed throws
25,095
public void close ( ) throws SIResourceException , SIConnectionLostException , SIErrorException , SIConnectionDroppedException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "close" ) ; synchronized ( lock ) { if ( ! isClosed ( ) ) { try { closeLock . writeLock ( ) . lockInterruptibly ( ) ; try { proxyQue...
Closes the browser session . This involves some synchronization flowing a close request and also marking the appropriate objects as closed .
25,096
public void reset ( ) throws SISessionUnavailableException , SISessionDroppedException , SIConnectionUnavailableException , SIConnectionDroppedException , SIResourceException , SIConnectionLostException , SIErrorException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reset" ) ; checkAlreadyClosed ( ) ; ...
f169897 . 2 added
25,097
static InjectionBinding < WebServiceRef > createWebServiceRefBindingFromResource ( Resource resource , ComponentNameSpaceConfiguration cnsConfig , Class < ? > serviceClass , String jndiName ) throws InjectionException { InjectionBinding < WebServiceRef > binding = null ; WebServiceRef wsRef = createWebServiceRefFromRes...
This method will be used to create an instance of a WebServiceRefBinding object that holds metadata obtained from an
25,098
static WebServiceRef createWebServiceRefFromResource ( Resource resource , Class < ? > typeClass , String jndiName ) throws InjectionException { return new WebServiceRefSimulator ( resource . mappedName ( ) , jndiName , typeClass , Service . class , null , "" ) ; }
This creates an
25,099
protected Object getTreeStructureToSave ( FacesContext facesContext ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "Entering getTreeStructureToSave" ) ; } UIViewRoot viewRoot = facesContext . getViewRoot ( ) ; if ( viewRoot . isTransient ( ) ) { return null ; } TreeStructureManager tsm = new TreeStruct...
Return an object which contains info about the UIComponent type of each node in the view tree . This allows an identical UIComponent tree to be recreated later though all the components will have just default values for their members .