idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
159,300 | @ Trivial public static String getRequestStringForTrace ( HttpServletRequest request , String [ ] secretStrings ) { if ( request == null || request . getRequestURL ( ) == null ) { return "[]" ; } StringBuffer sb = new StringBuffer ( "[" + stripSecretsFromUrl ( request . getRequestURL ( ) . toString ( ) , secretStrings ... | information and returns a string for tracing | 228 | 7 |
159,301 | public void deleteAbstractAliasDestinationHandler ( AbstractAliasDestinationHandler abstractAliasDestinationHandler ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteAbstractAliasDestinationHandler" ) ; //The destination is an alias or a foreign destination, so i... | Delete the abstract alias destination handler | 169 | 6 |
159,302 | public int add ( Object dependency , ValueSet valueSet , Object entry ) { int returnCode = HTODDynacache . NO_EXCEPTION ; dependencyNotUpdatedTable . remove ( dependency ) ; valueSet . add ( entry ) ; if ( valueSet . size ( ) > this . delayOffloadEntriesLimit ) { if ( this . type == DEP_ID_TABLE ) { returnCode = this .... | This adds a entry to the ValueSet for the specified dependency . The dependency is found in the dependencyToEntryTable . | 449 | 24 |
159,303 | public int add ( Object dependency , ValueSet valueSet ) { int returnCode = HTODDynacache . NO_EXCEPTION ; if ( dependencyToEntryTable . size ( ) >= this . maxSize ) { returnCode = reduceTableSize ( ) ; } dependencyNotUpdatedTable . put ( dependency , valueSet ) ; dependencyToEntryTable . put ( dependency , valueSet ) ... | This adds a new dependency with its valueSet to the DependencyToEntryTable . | 88 | 17 |
159,304 | public int replace ( Object dependency , ValueSet valueSet ) { int returnCode = HTODDynacache . NO_EXCEPTION ; dependencyNotUpdatedTable . remove ( dependency ) ; if ( valueSet != null && valueSet . size ( ) > this . delayOffloadEntriesLimit ) { dependencyToEntryTable . remove ( dependency ) ; if ( this . type == DEP_I... | This replaces the existing dependency with new valueSet in DependencyToEntryTable . | 459 | 16 |
159,305 | public Result removeEntry ( Object dependency , Object entry ) { Result result = this . htod . getFromResultPool ( ) ; ValueSet valueSet = ( ValueSet ) dependencyToEntryTable . get ( dependency ) ; if ( valueSet == null ) { return result ; } result . bExist = HTODDynacache . EXIST ; valueSet . remove ( entry ) ; depend... | This removes the specified entry from the specified dependency . | 203 | 10 |
159,306 | public ValueSet getEntries ( Object dependency ) { ValueSet valueSet = ( ValueSet ) dependencyToEntryTable . get ( dependency ) ; return valueSet ; } | This returns the ValueSet for the specified dependency from the DependencyToEntryTable . | 35 | 17 |
159,307 | private int reduceTableSize ( ) { int returnCode = HTODDynacache . NO_EXCEPTION ; int count = this . entryRemove ; if ( count > 0 ) { int removeSize = 5 ; while ( count > 0 ) { int minSize = Integer . MAX_VALUE ; Iterator < Map . Entry < Object , Set < Object > > > e = dependencyToEntryTable . entrySet ( ) . iterator (... | This reduces the DependencyToEntryTable size by offloading some dependencies to the disk . | 613 | 18 |
159,308 | private static String getClassName ( String implClassName ) { implClassName = implClassName . substring ( 0 , implClassName . length ( ) - 4 ) ; return implClassName + "ComponentImpl" ; } | The model interface type has a name ending in Type . For the moment modify it here . | 48 | 18 |
159,309 | public void registerThread ( StoppableThread thread ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "registerThread" , thread ) ; synchronized ( this ) { _threadCache . add ( thread ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "registerThread" ) ; } | Registers a new thread for stopping | 77 | 7 |
159,310 | public void deregisterThread ( StoppableThread thread ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deregisterThread" , thread ) ; synchronized ( this ) { _threadCache . remove ( thread ) ; } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deregisterThread" ) ; } | Deregisters a thread for stopping | 84 | 8 |
159,311 | public void stopAllThreads ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stopAllThreads" ) ; synchronized ( this ) { Iterator iterator = ( ( ArrayList ) _threadCache . clone ( ) ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { StoppableThread thread = ( StoppableThread ) iterator . next ( ) ; if ( tc ... | Stops all the stoppable threads that haven t already been stopped | 183 | 13 |
159,312 | public ArrayList getThreads ( ) { if ( tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getThreads" ) ; SibTr . exit ( tc , "getThreads" , _threadCache ) ; } return _threadCache ; } | Unit test hook to check on connected threads | 61 | 8 |
159,313 | private int getAndUpdateTail ( ) { int retMe ; do { retMe = tailIndex . get ( ) ; } while ( tailIndex . compareAndSet ( retMe , getNext ( retMe ) ) == false ) ; return retMe ; } | Atomically update and return the tailIndex . | 55 | 10 |
159,314 | public boolean put ( ExpirableReference expirable ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , "ObjId=" + expirable . getID ( ) + " ET=" + expirable . getExpiryTime ( ) ) ; boolean reply = tree . insert ( expirable ) ; if ( reply ) { size ++ ; } if (... | Add an ExpirableReference to the expiry index . | 142 | 12 |
159,315 | protected static Map < String , ProductInfo > getAllProductInfo ( File wlpInstallationDirectory ) throws VersionParsingException { File versionPropertyDirectory = new File ( wlpInstallationDirectory , ProductInfo . VERSION_PROPERTY_DIRECTORY ) ; if ( ! versionPropertyDirectory . exists ( ) ) { throw new VersionParsingE... | This method will create a map of product ID to the VersionProperties for that product . | 776 | 18 |
159,316 | public boolean remove ( V value ) { // peek at what is in the map K key = value . getKey ( ) ; Ref < V > ref = map . get ( key ) ; // only try to remove the mapping if it matches the provided class loader return ( ref != null && ref . get ( ) == value ) ? map . remove ( key , ref ) : false ; } | Remove any mapping for the provided id | 80 | 7 |
159,317 | public V retrieveOrCreate ( K key , Factory < V > factory ) { // Clean up stale entries on every put. // This should avoid a slow memory leak of reference objects. this . cleanUpStaleEntries ( ) ; return retrieveOrCreate ( key , factory , new FutureRef < V > ( ) ) ; } | Create a value for the given key iff one has not already been stored . This method is safe to be called concurrently from multiple threads . It will ensure that only one thread succeeds to create the value for the given key . | 68 | 45 |
159,318 | void cleanUpStaleEntries ( ) { for ( KeyedRef < K , V > ref = q . poll ( ) ; ref != null ; ref = q . poll ( ) ) { map . remove ( ref . getKey ( ) , ref ) ; // CONCURRENT remove() operation } } | clean up stale entries | 63 | 4 |
159,319 | public Object nextElement ( ) { if ( _array == null ) { return null ; } else { synchronized ( this ) { if ( _index < _array . length ) { Object obj = _array [ _index ] ; _index ++ ; return obj ; } else { return null ; } } } } | nextElement method comment . | 64 | 5 |
159,320 | public int execute ( String [ ] args ) { Map < String , LevelDetails > levels = readLevels ( System . getProperty ( "logviewer.custom.levels" ) ) ; String [ ] header = readHeader ( System . getProperty ( "logviewer.custom.header" ) ) ; return execute ( args , levels , header ) ; } | Runs LogViewer using values in System Properties to find custom levels and header . | 76 | 17 |
159,321 | public int execute ( String [ ] args , Map < String , LevelDetails > levels , String [ ] header ) { levelString = getLevelsString ( levels ) ; RepositoryReaderImpl logRepository ; try { // Parse the command line arguments and validate arguments if ( parseCmdLineArgs ( args ) || validateSettings ( ) ) { return 0 ; } // ... | Runs LogViewer . | 643 | 6 |
159,322 | private long collectAllKids ( ArrayList < DisplayInstance > result , ServerInstanceLogRecordList list ) { long timestamp = - 1 ; RepositoryLogRecord first = list . iterator ( ) . next ( ) ; if ( first != null ) { timestamp = first . getMillis ( ) ; } for ( Entry < String , ServerInstanceLogRecordList > kid : list . get... | collects all descendant instances into an array and calculates largest timestamp of their first records . | 215 | 17 |
159,323 | private Level createLevelByString ( String levelString ) throws IllegalArgumentException { try { return Level . parse ( levelString . toUpperCase ( ) ) ; //return WsLevel.parse(levelString.toUpperCase()); } catch ( Exception npe ) { throw new IllegalArgumentException ( getLocalizedParmString ( "CWTRA0013E" , new Object... | This method creates a java . util . Level object from a string with the level name . | 95 | 18 |
159,324 | void setInstanceId ( String instanceId ) throws IllegalArgumentException { if ( instanceId != null && ! "" . equals ( instanceId ) ) { subInstanceId = getSubProcessInstanceId ( instanceId ) ; try { long id = getProcessInstanceId ( instanceId ) ; mainInstanceId = id < 0 ? null : new Date ( id ) ; } catch ( NumberFormatE... | Parses the instanceId into the requested main process instanceId and the subprocess instanceid . The main process instanceId must be a long value as the main instance Id is a timestamp . | 117 | 39 |
159,325 | protected File [ ] listRepositoryChoices ( ) { // check current location String currentDir = System . getProperty ( "log.repository.root" ) ; if ( currentDir == null ) currentDir = System . getProperty ( "user.dir" ) ; File logDir = new File ( currentDir ) ; if ( logDir . isDirectory ( ) ) { File [ ] result = Repositor... | Lists directories containing HPEL repositories . It is called when repository is not specified explicitly in the arguments | 158 | 20 |
159,326 | private int skipPast ( byte [ ] data , int pos , byte target ) { int index = pos ; while ( index < data . length ) { if ( target == data [ index ++ ] ) { return index ; } } return index ; } | Skip until it runs out of input data or finds the target byte . | 51 | 14 |
159,327 | private int parseTrailer ( byte [ ] input , int inOffset , List < WsByteBuffer > list ) throws DataFormatException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Parsing trailer, offset=" + this . parseOffset + " val=" + this . parseInt ) ; } int offset = inOffset ; lo... | Parse past the GZIP trailer information . This is the two ints for the CRC32 checksum validation . | 566 | 24 |
159,328 | public void logClosedException ( Exception e ) { // Note: this may be a normal occurance so don't log error, just debug. if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Connection closed with exception: " + e . getMessage ( ) ) ; } } | This logs the error if the connection was closed by a higher level channel with an error . | 76 | 18 |
159,329 | void outOfScope ( ) { final String methodName = "outOfScope" ; if ( TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } _outOfScope = true ; try { // Close cloned connection so that it, and any resource created // from it, also throw SIObjectClosedException _connectionClone . close ( ) ; } ca... | Called to indicate that this session is now out of scope . | 301 | 13 |
159,330 | public void createAppToSecurityRolesMapping ( String appName , Collection < SecurityRole > securityRoles ) { //only add it if we don't have a cached copy appToSecurityRolesMap . putIfAbsent ( appName , securityRoles ) ; } | Creates the application to security roles mapping for a given application . | 58 | 13 |
159,331 | public void removeRoleToRunAsMapping ( String appName ) { Map < String , RunAs > roleToRunAsMap = roleToRunAsMappingPerApp . get ( appName ) ; if ( roleToRunAsMap != null ) { roleToRunAsMap . clear ( ) ; } appToSecurityRolesMap . remove ( appName ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ... | Removes the role to RunAs mappings for a given application . | 144 | 14 |
159,332 | public void removeRoleToWarningMapping ( String appName ) { Map < String , Boolean > roleToWarningMap = roleToWarningMappingPerApp . get ( appName ) ; if ( roleToWarningMap != null ) { roleToWarningMap . clear ( ) ; } roleToWarningMappingPerApp . remove ( appName ) ; } | Removes the role to warning mappings for a given application . | 74 | 13 |
159,333 | private static void determineHandlers ( ) { /* * find the handlers that we are dispatching to */ if ( textHandler != null && ! logRepositoryConfiguration . isTextEnabled ( ) ) textHandler = null ; // Don't do this work if only text and text is not enabled (if so, it will always be null) 666241.1 if ( binaryHandler != n... | determine two handlers needed by the repository | 201 | 9 |
159,334 | public void close ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "close" ) ; Enumeration streams = null ; synchronized ( this ) { synchronized ( streamTable ) { closed = true ; closeBrowserSessionsInternal ( ) ; streams = streamTable . elements ( ) ; } } // since a... | Cleans up the non - persistent state . No methods on the ControlHandler interface should be called after this is called . | 237 | 24 |
159,335 | public boolean cleanup ( boolean flushStreams , boolean redriveDeletionThread ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "cleanup" , new Object [ ] { Boolean . valueOf ( flushStreams ) , Boolean . valueOf ( redriveDeletionThread ) } ) ; boolean retvalue = false ;... | Cleanup the state in this AnycastOutputHandler . Called when this localisation is being deleted . | 314 | 20 |
159,336 | public final AOStream getAOStream ( String streamKey , SIBUuid12 streamId ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAOStream" , new Object [ ] { streamKey , streamId } ) ; StreamInfo streamInfo = getStreamInfo ( streamKey , streamId ) ; if ( streamInfo != nu... | for unit testing | 188 | 3 |
159,337 | private final void handleControlBrowseStatus ( SIBUuid8 remoteME , SIBUuid12 gatheringTargetDestUuid , long browseId , int status ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleControlBrowseStatus" , new Object [ ] { remoteME , gatheringTargetDestUuid , Long .... | Method to handle a ControlBrowseStatus message from an RME | 290 | 13 |
159,338 | public final void removeBrowserSession ( AOBrowserSessionKey key ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "removeBrowserSession" , key ) ; browserSessionTable . remove ( key ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . ... | Remove an AOBrowserSession that is already closed | 100 | 11 |
159,339 | private final StreamInfo getStreamInfo ( String streamKey , SIBUuid12 streamId ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getStreamInfo" , new Object [ ] { streamKey , streamId } ) ; StreamInfo sinfo = streamTable . get ( streamKey ) ; if ( ( sinfo != null ) && ... | Helper method used to dispatch a message received for a particular stream . Handles its own synchronization | 191 | 18 |
159,340 | public final void streamIsFlushed ( AOStream stream ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "streamIsFlushed" , stream ) ; // we schedule an asynchronous removal of the persistent data synchronized ( streamTable ) { String key = SIMPUtils . getRemoteGetKey ( s... | Callback from a stream that it has been flushed | 241 | 9 |
159,341 | public final AOValue persistLockAndTick ( TransactionCommon t , AOStream stream , long tick , SIMPMessage msg , int storagePolicy , long waitTime , long prevTick ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "persistLockAndTick" , new Object [ ] { t... | Helper method called by the AOStream when to persistently lock a message and create a persistent tick in the protocol stream | 342 | 24 |
159,342 | public final void cleanupTicks ( StreamInfo sinfo , TransactionCommon t , ArrayList valueTicks ) throws MessageStoreException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "cleanupTicks" , new Object [ ] { sinfo , t , valueTicks } ) ; try { int l... | Helper method called by the AOStream when a persistent tick representing a persistently locked message should be removed since we are flushing or cleaning up state . | 579 | 31 |
159,343 | public final Item writeStartedFlush ( TransactionCommon t , AOStream stream ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeStartedFlush" ) ; String key = SIMPUtils . getRemoteGetKey ( stream . getRemoteMEUuid ( ) , stream . getGatheringTargetDe... | Helper method used by AOStream to persistently record that flush has been started | 512 | 16 |
159,344 | public final void writtenStartedFlush ( AOStream stream , Item startedFlushItem ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writtenStartedFlush" ) ; String key = SIMPUtils . getRemoteGetKey ( stream . getRemoteMEUuid ( ) , stream . getGatheringTargetDestUuid ( ) ... | Callback when the Item that records that flush has been started has been committed to persistent storage | 476 | 17 |
159,345 | public SIMPItemStream getItemStream ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getItemStream" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getItemStream" , containerItemStream ) ; return ( SIMPItemStream )... | Return the SIMPItemStream associated with this AOH . This method is needed for proper cleanup of remote durable subscriptions since the usual item stream owned by the DestinationHandler is not used . | 99 | 37 |
159,346 | public final String getDestName ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDestName" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDestName" , destName ) ; return destName ; } | Return the destination name which this AOH is associated with . | 89 | 12 |
159,347 | public final SIBUuid12 getDestUUID ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestUUID" ) ; SibTr . exit ( tc , "getDestUUID" , destName ) ; } return destUuid ; } | Return the destination UUID which this AOH is associated with . This method is needed for proper cleanup of remote durable subscriptions since pseudo destinations are used rather than the destination normally associated with the DestinationHandler . | 78 | 40 |
159,348 | private void deleteAndUnlockPersistentStream ( StreamInfo sinfo , ArrayList valueTicks ) throws MessageStoreException , SIRollbackException , SIConnectionLostException , SIIncorrectCallException , SIResourceException , SIErrorException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr .... | remove the persistent ticks and the itemstream and started - flush item | 324 | 13 |
159,349 | protected void init ( boolean useDirect , int outSize , int inSize , int cacheSize ) { this . useDirectBuffer = useDirect ; this . outgoingHdrBufferSize = outSize ; this . incomingBufferSize = inSize ; // if cache size has increased, then allocate the larger bytecache // array, but don't change to a smaller array if ( ... | Initialize this class instance with the chosen parse configuration options . | 109 | 12 |
159,350 | public void addParseBuffer ( WsByteBuffer buffer ) { // increment where we're about to put the new buffer in int index = ++ this . parseIndex ; if ( null == this . parseBuffers ) { // first parse buffer to track this . parseBuffers = new WsByteBuffer [ BUFFERS_INITIAL_SIZE ] ; this . parseBuffersStartPos = new int [ BU... | Save a reference to a new buffer with header parse information . This is not part of the created list and will not be released by this message class . | 349 | 30 |
159,351 | public void addToCreatedBuffer ( WsByteBuffer buffer ) { // increment where we're about to put the new buffer in int index = ++ this . createdIndex ; if ( null == this . myCreatedBuffers ) { // first allocation this . myCreatedBuffers = new WsByteBuffer [ BUFFERS_INITIAL_SIZE ] ; } else if ( index == this . myCreatedBu... | Add a buffer on the list that will be manually released later . | 215 | 13 |
159,352 | public void clear ( ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; if ( bTrace && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "clear" ) ; } clearAllHeaders ( ) ; this . eohPosition = HeaderStorage . NOTSET ; this . currentElem = null ; this . stateOfParsing = PARSING_CRLF ; this . binaryParsing... | Clear out information on this object so that it can be re - used . | 364 | 15 |
159,353 | private void clearBuffers ( ) { // simply null out the parse buffers list, then release all the created buffers final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; for ( int i = 0 ; i <= this . parseIndex ; i ++ ) { if ( bTrace && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Removing reference to parse ... | Clear the array of buffers used during the parsing or marshalling of headers . | 239 | 15 |
159,354 | public void debug ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "*** Begin Header Debug ***" ) ; HeaderElement elem = this . hdrSequence ; while ( null != elem ) { Tr . debug ( tc , elem . getName ( ) + ": " + elem . getDebugValue ( ) ) ; elem = elem . nextSequence... | Print debug information on the headers to the RAS tracing log . | 119 | 13 |
159,355 | protected void destroy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Destroying these headers: " + this ) ; } // if we have headers present, or reference parse buffers (i.e. // the first header parsed threw an error perhaps), then clear // the message now if ( nul... | Completely clear out all the information on this object when it is no longer used . | 206 | 17 |
159,356 | protected void writeByteArray ( ObjectOutput output , byte [ ] data ) throws IOException { if ( null == data || 0 == data . length ) { output . writeInt ( - 1 ) ; } else { output . writeInt ( data . length ) ; output . write ( data ) ; } } | Write information for the input data to the output stream . If the input data is null or empty this will write a - 1 length marker . | 63 | 28 |
159,357 | private void scribbleWhiteSpace ( WsByteBuffer buffer , int start , int stop ) { if ( buffer . hasArray ( ) ) { // buffer has a backing array so directly update that final byte [ ] data = buffer . array ( ) ; final int offset = buffer . arrayOffset ( ) ; int myStart = start + offset ; int myStop = stop + offset ; for (... | Overlay whitespace into the input buffer using the provided starting and stopping positions . | 282 | 16 |
159,358 | private void eraseValue ( HeaderElement elem ) { // wipe out the removed value if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Erasing existing header: " + elem . getName ( ) ) ; } int next_index = this . lastCRLFBufferIndex ; int next_pos = this . lastCRLFPosition ; if (... | Method to completely erase the input header from the parse buffers . | 292 | 12 |
159,359 | private int overlayBytes ( byte [ ] data , int inOffset , int inLength , int inIndex ) { int length = inLength ; int offset = inOffset ; int index = inIndex ; WsByteBuffer buffer = this . parseBuffers [ index ] ; if ( - 1 == length ) { length = data . length ; } while ( index <= this . parseIndex ) { int remaining = bu... | Utility method to overlay the input bytes into the parse buffers starting at the input index and moving forward as needed . | 171 | 23 |
159,360 | private void overlayValue ( HeaderElement elem ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Overlaying existing header: " + elem . getName ( ) ) ; } int next_index = this . lastCRLFBufferIndex ; int next_pos = this . lastCRLFPosition ; if ( null != elem . nextSeque... | Method to overlay the new header value onto the older value in the parse buffers . | 445 | 16 |
159,361 | private WsByteBuffer [ ] marshallAddedHeaders ( WsByteBuffer [ ] inBuffers , int index ) { WsByteBuffer [ ] buffers = inBuffers ; buffers [ index ] = allocateBuffer ( this . outgoingHdrBufferSize ) ; for ( HeaderElement elem = this . hdrSequence ; null != elem ; elem = elem . nextSequence ) { if ( elem . wasAdded ( ) )... | Marshall the newly added headers from the sequence list to the output buffers starting at the input index on the list . | 167 | 23 |
159,362 | private void clearAllHeaders ( ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; if ( bTrace && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "clearAllHeaders()" ) ; } HeaderElement elem = this . hdrSequence ; while ( null != elem ) { final HeaderElement next = elem . nextSequence ; final HeaderKeys... | Clear all traces of the headers from storage . | 232 | 9 |
159,363 | public void removeSpecialHeader ( HeaderKeys key ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "removeSpecialHeader(h): " + key . getName ( ) ) ; } removeHdrInstances ( findHeader ( key ) , FILTER_NO ) ; } | Remove all instances of a special header that does not require the headerkey filterRemove method to be called . | 76 | 21 |
159,364 | public WsByteBuffer returnCurrentBuffer ( ) { WsByteBuffer buff = null ; if ( HeaderStorage . NOTSET != this . parseIndex ) { buff = this . parseBuffers [ this . parseIndex ] ; this . parseIndex -- ; } return buff ; } | Method to remove the current parsing buffer from this object s ownership so it can be used by others . | 58 | 20 |
159,365 | private void createSingleHeader ( HeaderKeys key , byte [ ] value , int offset , int length ) { HeaderElement elem = findHeader ( key ) ; if ( null != elem ) { // delete all secondary instances first if ( null != elem . nextInstance ) { HeaderElement temp = elem . nextInstance ; while ( null != temp ) { temp . remove (... | Utility method to create a single header instance with the given information . If elements already exist this will delete secondary ones and overlay the value on the first element . | 318 | 32 |
159,366 | private void addHeader ( HeaderElement elem , boolean bFilter ) { final HeaderKeys key = elem . getKey ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Adding header [" + key . getName ( ) + "] with value [" + elem . getDebugValue ( ) + "]" ) ; } if ( getRemoteIp ( )... | Add this new instance of a header to storage . | 482 | 10 |
159,367 | private HeaderElement findHeader ( HeaderKeys key , int instance ) { final int ord = key . getOrdinal ( ) ; if ( ! storage . containsKey ( ord ) && ord <= HttpHeaderKeys . ORD_MAX ) { return null ; } HeaderElement elem = null ; //If the ordinal created for this key is larger than 1024, the header key //storage has been... | Find the specific instance of this header in storage . | 236 | 10 |
159,368 | private void removeHdr ( HeaderElement elem ) { if ( null == elem ) { return ; } HeaderKeys key = elem . getKey ( ) ; elem . remove ( ) ; if ( key . useFilters ( ) ) { filterRemove ( key , elem . asBytes ( ) ) ; } } | Remove this single instance of a header . | 69 | 8 |
159,369 | private void removeHdrInstances ( HeaderElement root , boolean bFilter ) { if ( null == root ) { return ; } HeaderKeys key = root . getKey ( ) ; if ( bFilter && key . useFilters ( ) ) { filterRemove ( key , null ) ; } HeaderElement elem = root ; while ( null != elem ) { elem . remove ( ) ; elem = elem . nextInstance ; ... | Remove all instances of this header . | 94 | 7 |
159,370 | protected void setSpecialHeader ( HeaderKeys key , byte [ ] value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setSpecialHeader(h,b[]): " + key . getName ( ) ) ; } removeHdrInstances ( findHeader ( key ) , FILTER_NO ) ; HeaderElement elem = getElement ( key ) ; ele... | Set one of the special headers that does not require the headerkey filterX methods to be called . | 118 | 20 |
159,371 | public void setHeaderChangeLimit ( int limit ) { this . headerChangeLimit = limit ; this . bOverChangeLimit = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Setting header change limit to " + limit ) ; } } | Set the limit on the number of allowed header changes before this message must be remarshalled . | 69 | 19 |
159,372 | public WsByteBuffer allocateBuffer ( int size ) { WsByteBufferPoolManager mgr = HttpDispatcher . getBufferManager ( ) ; WsByteBuffer wsbb = ( this . useDirectBuffer ) ? mgr . allocateDirect ( size ) : mgr . allocate ( size ) ; addToCreatedBuffer ( wsbb ) ; return wsbb ; } | Allocate a buffer according to the requested input size . | 82 | 11 |
159,373 | @ Override public void setDebugContext ( Object o ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "debugContext set to " + o + " for " + this ) ; } if ( null != o ) { this . debugContext = o ; } } | Allow the debug context object to be set to the input Object for more specialized debugging . A null input object will be ignored . | 74 | 25 |
159,374 | private void incrementHeaderCounter ( ) { this . numberOfHeaders ++ ; this . headerAddCount ++ ; if ( this . limitNumHeaders < this . numberOfHeaders ) { String msg = "Too many headers in storage: " + this . numberOfHeaders ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc ,... | Increment the number of headers in storage counter by one . If this puts it over the limit for the message then an exception is thrown . | 103 | 28 |
159,375 | private void checkHeaderValue ( byte [ ] data , int offset , int length ) { // if the last character is a CR or LF, then this fails int index = ( offset + length ) - 1 ; if ( index < 0 ) { // empty data, quit now with success return ; } String error = null ; if ( BNFHeaders . LF == data [ index ] || BNFHeaders . CR == ... | Check the input header value for validity starting at the offset and continuing for the input length of characters . | 491 | 20 |
159,376 | private void checkHeaderValue ( String data ) { // if the last character is a CR or LF, then this fails int index = data . length ( ) - 1 ; if ( index < 0 ) { // empty string, quit now with success return ; } String error = null ; char c = data . charAt ( index ) ; if ( BNFHeaders . LF == c || BNFHeaders . CR == c ) { ... | Check the input header value for validity . | 364 | 8 |
159,377 | private int countInstances ( HeaderElement root ) { int count = 0 ; HeaderElement elem = root ; while ( null != elem ) { if ( ! elem . wasRemoved ( ) ) { count ++ ; } elem = elem . nextInstance ; } return count ; } | Count the number of instances of this header starting at the given element . | 61 | 14 |
159,378 | private boolean skipWhiteSpace ( WsByteBuffer buff ) { // keep reading until we hit the end of the buffer or a non-space char byte b ; do { if ( this . bytePosition >= this . byteLimit ) { if ( ! fillByteCache ( buff ) ) { // not filled return false ; } } b = this . byteCache [ this . bytePosition ++ ] ; } while ( BNFH... | Skip any whitespace that might be at the start of this buffer . | 121 | 14 |
159,379 | private boolean addInstanceOfElement ( HeaderElement root , HeaderElement elem ) { // first add to the overall sequence list if ( null == this . hdrSequence ) { this . hdrSequence = elem ; this . lastHdrInSequence = elem ; } else { // find the end of the list and append this new element this . lastHdrInSequence . nextS... | Helper method to add a new instance of a HeaderElement to root s internal list . This might be the first instance or an additional instance in which case it will be added at the end of the list . | 166 | 41 |
159,380 | protected WsByteBuffer [ ] putInt ( int data , WsByteBuffer [ ] buffers ) { return putBytes ( GenericUtils . asBytes ( data ) , buffers ) ; } | Place the input int value into the outgoing cache . This will return the buffer array as it may have changed if the cache need to be flushed . | 40 | 29 |
159,381 | protected WsByteBuffer [ ] flushCache ( WsByteBuffer [ ] buffers ) { // PK13351 - use the offset/length version to write only what we need // to and avoid the extra memory allocation int pos = this . bytePosition ; if ( 0 == pos ) { // nothing to write return buffers ; } this . bytePosition = 0 ; return GenericUtils . ... | Method to flush whatever is in the cache into the input buffers . These buffers are then returned to the caller as the flush may have needed to expand the list . | 98 | 32 |
159,382 | final protected void decrementBytePositionIgnoringLFs ( ) { // PK15898 - added for just LF after first line this . bytePosition -- ; if ( BNFHeaders . LF == this . byteCache [ this . bytePosition ] ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "decrementILF found an ... | Decrement the byte position unless it points to an LF character in which case just leave the byte position alone . | 103 | 22 |
159,383 | final protected void resetCacheToken ( int len ) { if ( null == this . parsedToken || len != this . parsedToken . length ) { this . parsedToken = new byte [ len ] ; } this . parsedTokenLength = 0 ; } | Reset the parse byte token based on the input length . If the existing array is the same size then this is a simple reset . This is intended to only be used when the contents have already been extracted and can be overwritten with new data . | 51 | 50 |
159,384 | final protected boolean fillCacheToken ( WsByteBuffer buff ) { // figure out how much we have left to copy out, append to any existing // parsed token (multiple passes through here). int curr_len = this . parsedTokenLength ; int need_len = this . parsedToken . length - curr_len ; int copy_len = need_len ; // keep going... | Method to fill the parse token from the given input buffer . The token array must have been created prior to this attempt to fill it . | 279 | 27 |
159,385 | protected boolean fillByteCache ( WsByteBuffer buff ) { if ( this . bytePosition < this . byteLimit ) { return false ; } int size = buff . remaining ( ) ; if ( size > this . byteCacheSize ) { // truncate to just fill up the cache size = this . byteCacheSize ; } this . bytePosition = 0 ; this . byteLimit = size ; if ( 0... | Fills the byte cache . | 234 | 6 |
159,386 | protected TokenCodes findCRLFTokenLength ( WsByteBuffer buff ) throws MalformedMessageException { TokenCodes rc = TokenCodes . TOKEN_RC_MOREDATA ; if ( null == buff ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Null buffer provided" ) ; } return rc ; } // start with... | Parse a CRLF delimited token and return the length of the token . | 527 | 17 |
159,387 | protected TokenCodes skipCRLFs ( WsByteBuffer buffer ) { int maxCRLFs = 33 ; // limit is the max number of CRLFs to skip if ( this . bytePosition >= this . byteLimit ) { if ( ! fillByteCache ( buffer ) ) { // no more data return TokenCodes . TOKEN_RC_MOREDATA ; } } byte b = this . byteCache [ this . bytePosition ++ ] ;... | This method is used to skip leading CRLF characters . It will stop when it finds a non - CRLF character runs out of data or finds too many CRLFs | 306 | 36 |
159,388 | protected TokenCodes findHeaderLength ( WsByteBuffer buff ) throws MalformedMessageException { TokenCodes rc = TokenCodes . TOKEN_RC_MOREDATA ; if ( null == buff ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "findHeaderLength: null buffer provided" ) ; } return rc ; ... | Parse a byte delimited token and return the length of the token . | 585 | 15 |
159,389 | private boolean parseHeaderName ( WsByteBuffer buff ) throws MalformedMessageException { // if we're just starting, then skip leading white space characters // otherwise ignore them (i.e we might be in the middle of // "Mozilla/5.0 (Win" if ( null == this . parsedToken ) { if ( ! skipWhiteSpace ( buff ) ) { return fals... | Utility method to parse the header name from the input buffer . | 614 | 13 |
159,390 | private boolean parseHeaderValueExtract ( WsByteBuffer buff ) throws MalformedMessageException { // 295178 - don't log sensitive information // log value contents based on the header key (if known) int log = LOG_FULL ; HeaderKeys key = this . currentElem . getKey ( ) ; if ( null != key && ! key . shouldLogValue ( ) ) {... | Utility method for parsing a header value out of the input buffer . | 198 | 14 |
159,391 | protected int parseTokenNonExtract ( WsByteBuffer buff , byte bDelimiter , boolean bApproveCRLF ) throws MalformedMessageException { TokenCodes rc = findTokenLength ( buff , bDelimiter , bApproveCRLF ) ; return ( TokenCodes . TOKEN_RC_MOREDATA . equals ( rc ) ) ? - 1 : this . parsedTokenLength ; } | Standard parsing of a token ; however instead of saving the data into the global parsedToken variable this merely returns the length of the token . Used for occasions where we just need to find the length of the token . | 91 | 42 |
159,392 | private void saveParsedToken ( WsByteBuffer buff , int start , boolean delim , int log ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; // local copy of the length int length = this . parsedTokenLength ; this . parsedTokenLength = 0 ; if ( 0 > length ) { throw new IllegalArgumentException ( "Negati... | Sets the temporary parse token from the input buffer . | 645 | 11 |
159,393 | public void parsedCompactHeader ( boolean flag ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "parsedCompactHeader: " + flag ) ; } this . compactHeaderFlag = flag ; } | Sets the flag indicating that a SIP compact header has been parsed . | 62 | 15 |
159,394 | void finishAlarmThread ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "finishAlarmThread" ) ; //wake up the thread so that it will exit it's main loop and end synchronized ( wakeupLock ) { //flag this alarm thread as finished finished = true ; wakeupLock . notify (... | Terminate this alarm thread . This is final the thread should not be restarted . | 128 | 17 |
159,395 | public void run ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "run" ) ; try { //loop until finished while ( ! finished ) { //what time is it now long now = System . currentTimeMillis ( ) ; boolean fire = false ; //synchronize on the wake up lock synchronized ( wak... | The main loop for the MPAlarmThread . Loops until the alarm thread is marked as finished . If the alarm thread is suspended it will wait forever . Otherwise the it will wait inside the loop until a specified time and then call the MPAlarmManager . fireInternalAlarm method . | 766 | 59 |
159,396 | public boolean startInactivityTimer ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "startInactivityTimer" ) ; if ( _inactivityTimeout > 0 && _status . getState ( ) == TransactionState . STATE_ACTIVE && ! _inactivityTimerActive ) { Emb... | Start an inactivity timer and call alarm method of parameter when timeout expires . | 175 | 15 |
159,397 | public void rollbackResources ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "rollbackResources" ) ; try { final Transaction t = ( ( EmbeddableTranManagerSet ) TransactionManagerFactory . getTransactionManager ( ) ) . suspend ( ) ; ge... | Rollback all resources but do not drive state changes . Used when transaction HAS TIMED OUT . | 231 | 19 |
159,398 | public synchronized void stopInactivityTimer ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "stopInactivityTimer" ) ; if ( _inactivityTimerActive ) { _inactivityTimerActive = false ; EmbeddableTimeoutManager . setTimeout ( this , Embe... | Stop inactivity timer associated with transaction . This method needs to be synchronized to serialize with inactivity timeout . If the timeout runs after this method then there will be no _inactivityTimer to call and the context will be on_server . If the timeout runs before then a subsequent resume will fail as the tr... | 173 | 68 |
159,399 | @ Override public void resumeAssociation ( ) { final boolean traceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "resumeAssociation" ) ; resumeAssociation ( true ) ; if ( traceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "resumeAssociation" ) ; } | Called by interceptor when incoming reply arrives . This polices the single threaded operation of the transaction . | 89 | 21 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.