idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
161,300
public void delCacheEntry ( CacheEntry ce , int cause , int source , boolean fromDepIdTemplateInvalidation ) { htod . delCacheEntry ( ce , cause , source , fromDepIdTemplateInvalidation ) ; }
Call this method to a cache entry from the disk .
161,301
public void delCacheEntry ( ValueSet removeList , int cause , int source , boolean fromDepIdTemplateInvalidation , boolean fireEvent ) { htod . delCacheEntry ( removeList , cause , source , fromDepIdTemplateInvalidation , fireEvent ) ; }
Call this method to remove multiple of cache ids from the disk .
161,302
public ValueSet readDependency ( Object id , boolean delete ) { Result result = htod . readDependency ( id , delete ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return HTODDynacache . EMPTY_VS ; } ValueSet value...
Call this method to read a specified dependency id which contains the cache ids from the disk .
161,303
public ValueSet readTemplate ( String template , boolean delete ) { Result result = htod . readTemplate ( template , delete ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return HTODDynacache . EMPTY_VS ; } ValueS...
Call this method to read a specified template which contains the cache ids from the disk .
161,304
public ValueSet readTemplatesByRange ( int index , int length ) { Result result = htod . readTemplatesByRange ( index , length ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return HTODDynacache . EMPTY_VS ; } Val...
Call this method to get the template ids based on the index and the length from the disk .
161,305
public int getCacheIdsSize ( boolean filter ) { if ( filter == CacheOnDisk . FILTER ) { return htod . getCacheIdsSize ( filter ) - htod . invalidationBuffer . size ( ) ; } else { return htod . getCacheIdsSize ( filter ) ; } }
Call this method to get the number of the cache ids in the disk .
161,306
public void delDependencyEntry ( Object id , Object entry ) { if ( htod . delDependencyEntry ( id , entry ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete a cache id from a specified dependency in the disk .
161,307
public void delTemplateEntry ( String template , Object entry ) { if ( htod . delTemplateEntry ( template , entry ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete a cache id from a specified template in the disk .
161,308
public void delDependency ( Object id ) { if ( htod . delDependency ( id ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete speciifed dependency id from the disk .
161,309
public void delTemplate ( String template ) { if ( htod . delTemplate ( template ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } }
Call this method to delete speciifed template from the disk .
161,310
public int writeDependency ( Object id , ValueSet vs ) { int returnCode = htod . writeDependency ( id , vs ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to write a dependency id with a collection of cache ids to the disk .
161,311
public int writeTemplate ( String template , ValueSet vs ) { int returnCode = htod . writeTemplate ( template , vs ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to write a template with a collection of cache ids to the disk .
161,312
public int writeDependencyEntry ( Object id , Object entry ) { int returnCode = htod . writeDependencyEntry ( id , entry ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to add a cache id for a specified dependency id to the disk .
161,313
public int writeTemplateEntry ( String template , Object entry ) { int returnCode = htod . writeTemplateEntry ( template , entry ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; }
Call this method to add a cache id for a specified template to the disk .
161,314
protected long calculateSleepTime ( ) { Calendar c = new GregorianCalendar ( ) ; int currentHour = c . get ( Calendar . HOUR_OF_DAY ) ; int currentMin = c . get ( Calendar . MINUTE ) ; int currentSec = c . get ( Calendar . SECOND ) ; long stime = SECONDS_FOR_24_HOURS - ( ( currentHour * 60 + currentMin ) * 60 + current...
return the sleep time in msec
161,315
public void clearInvalidationBuffers ( ) { this . htod . invalidationBuffer . clear ( HTODInvalidationBuffer . EXPLICIT_BUFFER ) ; this . htod . invalidationBuffer . clear ( HTODInvalidationBuffer . SCAN_BUFFER ) ; if ( this . evictionPolicy != CacheConfig . EVICTION_NONE ) { this . htod . invalidationBuffer . clear ( ...
This method clears invalidaiton buffers in HTODDynacache
161,316
public Result readHashcodeByRange ( int index , int length , boolean debug , boolean useValue ) { Result result = this . htod . readHashcodeByRange ( index , length , debug , useValue ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; } return result ; }
This method find the hashcode based on index and length .
161,317
public int updateExpirationTime ( Object id , long oldExpirationTime , int size , long newExpirationTime , long newValidatorExpirationTime ) { int returnCode = this . htod . updateExpirationTime ( id , oldExpirationTime , size , newExpirationTime , newValidatorExpirationTime ) ; if ( returnCode == HTODDynacache . DISK_...
This method is used to update expiration times in GC and disk emtry header
161,318
protected int checkDirectoryWriteable ( String location ) { final String methodName = "checkDirectoryWriteable()" ; int rc = CacheOnDisk . LOCATION_OK ; if ( location . equals ( "" ) ) { rc = CacheOnDisk . LOCATION_NOT_DEFINED ; } else if ( location . startsWith ( "${" ) && location . indexOf ( "}" ) > 0 ) { rc = Cache...
Check the location whether it is writable or not
161,319
public static String getRepositorySubpath ( MavenCoordinates artifact ) { StringBuffer buf = new StringBuffer ( ) ; String [ ] groupDirs = artifact . getGroupId ( ) . split ( "\\." ) ; for ( String dir : groupDirs ) { buf . append ( dir ) . append ( "/" ) ; } buf . append ( artifact . getArtifactId ( ) ) . append ( "/"...
Gets the expected path within a Maven repository for the given Maven artifact based on its Maven coordinates .
161,320
public static String getFileName ( MavenCoordinates artifact , Constants . ArtifactType type ) { return artifact . getArtifactId ( ) + "-" + artifact . getVersion ( ) + type . getMavenFileExtension ( ) ; }
Gets the expected file name for a Maven artifact based on its Maven coordinates .
161,321
public void clearBody ( ) throws javax . jms . JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "clearBody" ) ; super . clearBody ( ) ; dataBuffer = null ; dataStart = 0 ; readStream = null ; if ( jsBytesMsg != null ) { jsBytesMsg . setBytes ( null ) ...
Clear out the message body . All other parts of the message are left untouched .
161,322
public byte readByte ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readByte" ) ; try { checkBodyReadable ( "readByte" ) ; if ( requiresInit ) lazyInitForReading ( ) ; byte byteRead = readStream . readByte ( ) ; if ( TraceComponent . isA...
Read a signed 8 - bit value from the stream message .
161,323
public int readBytes ( byte [ ] value , int length ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readBytes" , new Object [ ] { value , length } ) ; try { checkBodyReadable ( "readBytes" ) ; if ( requiresInit ) lazyInitForReading ( ) ; if ...
Read a portion of the bytes message stream .
161,324
public char readChar ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readChar" ) ; try { checkBodyReadable ( "readChar" ) ; if ( requiresInit ) lazyInitForReading ( ) ; readStream . mark ( 2 ) ; char result = readStream . readChar ( ) ; i...
Read a Unicode character value from the stream message .
161,325
public long readLong ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readLong" ) ; try { checkBodyReadable ( "readLong" ) ; if ( requiresInit ) lazyInitForReading ( ) ; readStream . mark ( 8 ) ; long result = readStream . readLong ( ) ; i...
Read a signed 64 - bit integer from the stream message .
161,326
public String readUTF ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readUTF" ) ; String result ; try { checkBodyReadable ( "readUTF" ) ; if ( requiresInit ) lazyInitForReading ( ) ; readStream . mark ( 8 ) ; result = readStream . readUT...
Read in a string that has been encoded using a modified UTF - 8 format from the stream message .
161,327
public void reset ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reset" ) ; if ( ! isBodyReadOnly ( ) ) { if ( ! producerWontModifyPayloadAfterSet ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) SibTr . deb...
Put the message in read - only mode and reposition the stream of bytes to the beginning .
161,328
public void writeBytes ( byte [ ] value ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "writeBytes" , value ) ; try { checkBodyWriteable ( "writeBytes" ) ; if ( producerWontModifyPayloadAfterSet ) { if ( TraceComponent . isAnyTracingEnabled...
Write a byte array to the stream message .
161,329
public void writeBytes ( byte [ ] value , int offset , int length ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "writeBytes" , new Object [ ] { value , offset , length } ) ; try { checkProducerPromise ( "writeBytes(byte[], int, int)" , "Jm...
Write a portion of a byte array to the stream message .
161,330
public void writeObject ( Object value ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "writeObject" ) ; checkProducerPromise ( "writeObject(Object)" , "JmsBytesMessageImpl.writeObject#1" ) ; checkBodyWriteable ( "writeObject" ) ; if ( value instan...
Write a Java object to the stream message .
161,331
protected JsJmsMessage getMsgReference ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getMsgReference" ) ; if ( ! isBodyReadOnly ( ) && ! producerWontModifyPayloadAfterSet ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebug...
override the getMsgReference method of the parent class . We need to ensure that the message body is written into the JS message before returning the reference to it .
161,332
private void recordInteger ( int offset , int length ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "recordInteger" , new Object [ ] { offset , length } ) ; if ( integer_count == ARRAY_SIZE ) { if ( integers == null ) integers = new Vector ( ) ; integers . add...
Records the presence of an integer - style item in the bytes message stream . This method is called by the writeXXX methods to keep a track of where the integer items are so they can be byteswapped if necessary at send time .
161,333
private void reverse ( byte [ ] buffer , int offset , int length ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "reverse" , new Object [ ] { buffer , offset , length } ) ; byte temp ; for ( int i = 0 ; i < length / 2 ; i ++ ) { temp = buffer [ offset + i ] ; b...
This method reverses a sequence of bytes within a byte array . It is used for byte swapping numeric values
161,334
private void checkProducerPromise ( String jmsMethod , String ffdcProbeID ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "checkProducerPromise" , new Object [ ] { jmsMethod , ffdcProbeID } ) ; if ( producerWontModifyPayloadAfterSet ) { thro...
Checks to see if the producer has promised not to modify the payload after it s been set . If they have then throw a JMS exception based on the parameters
161,335
public void stopConsumer ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "stopConsumer" ) ; try { synchronized ( consumerSession ) { consumerSession . getConsumerSession ( ) . stop ( ) ; consumerSession . started = false ; } } catch ( Throwable t ) { FFDCFilt...
Safely stop the consumer
161,336
public boolean setClassifications ( Flow [ ] newFlows ) throws InvalidFlowsException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setClassifications" , newFlows ) ; boolean noClassChange = true ; if ( flows == null || ( flows . length != newFlows . length ) ) { noCl...
Supports the setting of a new set of classifications based on a set of Flows provided by the caller .
161,337
public int getNumberOfClasses ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getNumberOfClasses" ) ; SibTr . exit ( tc , "getNumberOfClasses" , Integer . valueOf ( numberOfClasses ) ) ; } return numberOfClasses ; }
Retrieve the number of classifications specified in the current set .
161,338
public int getPosition ( String classificationName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getPosition" , classificationName ) ; int classPos = 0 ; ClassWeight cw = messageClasses . get ( classificationName ) ; if ( cw != null ) classPos = cw . getPosition ( ...
Get the index of a named classification .
161,339
public int getWeight ( String classificationName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getWeight" , classificationName ) ; int weight = 0 ; ClassWeight cw = messageClasses . get ( classificationName ) ; if ( cw != null ) weight = cw . getWeight ( ) ; if ( T...
Get the weight of a named classification .
161,340
public int findClassIndex ( HashMap < Integer , Integer > weightMap ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "findClassIndex" ) ; int classPos = 0 ; int randWeight = 0 ; int totalWeight = 0 ; Iterator < Integer > iter = weightMap . values ( ) . iterator ( ) ; w...
Find a pseudo random classification index based on the weightings table .
161,341
public Flow [ ] getFlows ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getFlows" ) ; } Flow [ ] clonedFlows = flows . clone ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , "getFlows" , clonedFlows ) ; } ret...
Returns the array of flows defined in this classification specified by XD .
161,342
public Map < Object , Object > getPropertyBag ( ) { if ( this . properties == null ) { this . properties = new HashMap < Object , Object > ( ) ; } return this . properties ; }
Fetch the property bag associated with this Chain .
161,343
public ChainDataImpl getExternalChainData ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "getExternalChainData" ) ; } ChannelData [ ] parents = new ChannelData [ this . channelDataArray . length ] ; for ( int i = 0 ; i < parents . length ; i ++ ) { parents [ ...
Create a cloned representation of this chain data which only includes references to parent channel data objects . It hides the children and their names .
161,344
public final void addChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "addChainEventListener: " + listener ) ; } if ( null != listener ) { this . chainEventListeners . add ( listener ) ; } }
Enables external entities to be notified of chain events described in ChainEventListener interface .
161,345
public final void removeChainEventListener ( ChainEventListener listener ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "removeChainEventListener: " + listener ) ; } if ( null != listener ) { if ( ! this . chainEventListeners . remove ( listener ) ) { if ( Trac...
Removes a listener from the list of those being informed of chain events on this chain .
161,346
public Set < ChainEventListener > removeAllChainEventListeners ( ) { Set < ChainEventListener > returnListeners = new HashSet < ChainEventListener > ( this . chainEventListeners ) ; this . chainEventListeners . clear ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , ...
Remove the chain event listeners from this configuration and return them in a new hash set . This method is called during the updateChain in order to move the event listeners from the old config to the new one .
161,347
public void setChainEventListeners ( Set < ChainEventListener > newListeners ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "removeAllChainEventListeners" , newListeners ) ; } chainEventListeners . clear ( ) ; chainEventListeners . addAll ( newListeners ) ; }
Set the list of chain event listeners for this chain configuration . This method was originally created to pass along chain event listeners from one chain config to another chain config during the updateChain method .
161,348
public final void chainInitialized ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "chainInitialized, chain: " + this . name ) ; } for ( ChainEventListener listener : chainEventListeners ) { listener . chainInitialized ( this ) ; } if ( TraceComponent . isAnyT...
This method is called when the chain has been initialized . It informs each of the chain event listeners .
161,349
public final void chainStartFailed ( int attemptsMade , int attemptsLeft ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "chainStartFailed, chain: " + this . name ) ; } for ( ChainEventListener listener : chainEventListeners ) { if ( listener instanceof Retryabl...
This method is called when the chain start fails . It informs each of the chain event listeners .
161,350
public CFEndPoint getEndPoint ( ) throws ChannelFrameworkException { if ( null == this . endPoint ) { if ( FlowType . INBOUND . equals ( this . type ) ) { this . endPoint = new CFEndPointImpl ( this ) ; } else { throw new ChannelFrameworkException ( this . name + " is not inbound chain" ) ; } } return this . endPoint ;...
Access the possible endpoint representation of this chain . This will throw an exception if the chain is not inbound .
161,351
protected String getRawProperty ( String key ) { String rawValue = source . getValue ( key ) ; if ( rawValue != null ) { current . put ( key , rawValue ) ; } return rawValue ; }
Return the raw unconverted String associated with a key .
161,352
protected final TagAttribute getRequiredAttribute ( String localName ) throws TagException { TagAttribute attr = this . getAttribute ( localName ) ; if ( attr == null ) { throw new TagException ( this . tag , "Attribute '" + localName + "' is required" ) ; } return attr ; }
Utility method for fetching a required TagAttribute
161,353
public void setInputHandler ( ProducerInputHandler inputHandler ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setInputHandler" , inputHandler ) ; this . inputHandler = inputHandler ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr ....
Sets the inputHandler for this destination .
161,354
void setBus ( String busName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setBus" , busName ) ; this . busName = busName ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setBus" ) ; }
Sets the bus name for this destination .
161,355
public void setForeignBusSendAllowed ( boolean sendAllowed ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "setForeignBusSendAllowed" , Boolean . valueOf ( sendAllowed ) ) ; } _sendAllowedOnTargetForeignBus = Boolean . valueOf ( sendAllowed ) ; if ( aliasesThatTarge...
Set the Foreign Bus Level sendAllowed flag
161,356
public static < U > CompletableFuture < U > failedFuture ( Throwable x ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.failedFuture" ) ) ; }
Because CompletableFuture . failedFuture is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static failedFuture method on that .
161,357
public static < U > CompletionStage < U > failedStage ( Throwable x ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.failedStage" ) ) ; }
Because CompletableFuture . failedStage is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static failedStage method on that .
161,358
public static < T > CompletableFuture < T > newIncompleteFuture ( Executor executor ) { if ( JAVA8 ) return new ManagedCompletableFuture < T > ( new CompletableFuture < T > ( ) , executor , null ) ; else return new ManagedCompletableFuture < T > ( executor , null ) ; }
Construct a new incomplete CompletableFuture that is backed by the specified executor .
161,359
public static CompletableFuture < Void > runAsync ( Runnable action ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.runAsync" ) ) ; }
Because CompletableFuture . runAsync is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static runAsync method on that .
161,360
public static < U > CompletableFuture < U > supplyAsync ( Supplier < U > action ) { throw new UnsupportedOperationException ( Tr . formatMessage ( tc , "CWWKC1156.not.supported" , "ManagedExecutor.supplyAsync" ) ) ; }
Because CompletableFuture . supplyAsync is static this is not a true override . It will be difficult for the user to invoke this method because they would need to get the class of the CompletableFuture implementation and locate the static supplyAsync method on that .
161,361
private ThreadContextDescriptor captureThreadContext ( Executor executor ) { WSManagedExecutorService managedExecutor = defaultExecutor instanceof WSManagedExecutorService ? ( WSManagedExecutorService ) defaultExecutor : executor != defaultExecutor && executor instanceof WSManagedExecutorService ? ( WSManagedExecutorSe...
Captures thread context if possible first based on the default asynchronous execution facility otherwise based on the specified executor . If neither of these executors are a managed executor then thread context is not captured .
161,362
private final static FutureRefExecutor supportsAsync ( Executor executor ) { if ( executor instanceof ExecutorService ) return new FutureRefExecutor ( ( ExecutorService ) executor ) ; if ( executor instanceof UnusableExecutor ) throw new UnsupportedOperationException ( ) ; return null ; }
Convenience method to validate that an executor supports running asynchronously and to wrap the executor if an ExecutorService with FutureRefExecutor . This method is named supportsAsync to make failure stacks more meaningful to users .
161,363
static File validateDirectory ( final File directory ) { File newDirectory = null ; try { newDirectory = AccessController . doPrivileged ( new java . security . PrivilegedExceptionAction < File > ( ) { public File run ( ) throws Exception { boolean ok = true ; if ( ! directory . exists ( ) ) ok = directory . mkdirs ( )...
This method will create the directory if it does not exist ensuring the specified location is writable .
161,364
static File createNewFile ( final FileLogSet fileLogSet ) { final File directory = fileLogSet . getDirectory ( ) ; final String fileName = fileLogSet . getFileName ( ) ; final String fileExtension = fileLogSet . getFileExtension ( ) ; File f = null ; try { f = AccessController . doPrivileged ( new java . security . Pri...
This method will create a new file with the specified name and extension in the specified directory . If a unique file is required then it will add a timestamp to the file and if necessary a unqiue identifier to the file name .
161,365
public void releaseBuffers ( ) { if ( payloadBuffers != null ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "release payload buffers. number to release is: " + payloadCountOfBuffers ) ; } for ( int i = 0 ; i < payloadCountOfBuffers ; i ++ ) { payloadBuffers [ i ] . release ( ) ; } payloadBuffers = null ; paylo...
This is never called except in an exception case . frame buffers should be cleaned up when reset is called on the FrameReadProcessor
161,366
public static boolean methodParamsMatch ( List < String > typeNames , Class < ? > [ ] types ) { if ( typeNames . size ( ) != types . length ) { return false ; } for ( int i = 0 ; i < types . length ; i ++ ) { String typeName = typeNames . get ( i ) ; int typeNameEnd = typeName . length ( ) ; Class < ? > type = types [ ...
Checks if the specified method parameters object matches the specified method parameter types .
161,367
String evaluateExpression ( String expr ) throws ConfigEvaluatorException { ConfigExpressionScanner scanner = new ConfigExpressionScanner ( expr ) ; if ( ! parseOperand ( expr , scanner , true ) ) { return null ; } if ( resultExpr != null ) { return scanner . end ( ) ? resultExpr : null ; } subtotal = value ; while ( !...
Evaluate a variable expression .
161,368
private int evaluateCountExpression ( Object value ) { if ( value == null ) { return 0 ; } if ( value . getClass ( ) . isArray ( ) ) { return Array . getLength ( value ) ; } if ( value instanceof Vector < ? > ) { return ( ( Vector < ? > ) value ) . size ( ) ; } return 1 ; }
Evaluates the count expression function . If the value is null then 0 is returned . If the value is an array the length is returned . If the value is a vector the size is returned . Otherwise 1 is returned .
161,369
public Map < String , Object > getRequestCookieMap ( ) { if ( _requestCookieMap == null ) { checkHttpServletRequest ( ) ; _requestCookieMap = new CookieMap ( _httpServletRequest ) ; } return _requestCookieMap ; }
would be more elegant - = Simon Lessard = -
161,370
public LockingCursor getDefaultGetCursor ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDefaultGetCursor" ) ; LockingCursor cursor = consumerKeyFilter [ 0 ] . getGetCursor ( ) ; if ( keyGroup != null ) cursor = keyGroup . getDefaultGetCursor ( ) ; if ( TraceCom...
Return the getCursor for this consumer . This method is only called in the case where messages are not classified by XD .
161,371
private int chooseGetCursorIndex ( int classification ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "chooseGetCursorIndex" ) ; int classIndex = 0 ; if ( classifyingMessages ) classIndex = consumerSet . chooseGetCursorIndex ( classification ) ; if ( TraceComponent . ...
Determine the index of the getCursor to use based on the classifications defined for the ConsumerSet that a consumer belongs to . If SIB is not registered with XD and no classification is being performed then the default index is returned
161,372
public void detach ( ) throws SIResourceException , SINotPossibleInCurrentConfigurationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "detach" ) ; notReady ( ) ; if ( keyGroup != null ) keyGroup . removeMember ( this ) ; consumerDispatcher . detachConsumerPoi...
Detach this consumer
161,373
public SIBUuid12 getConnectionUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getConnectionUuid" ) ; SibTr . exit ( tc , "getConnectionUuid" , connectionUuid ) ; } return connectionUuid ; }
Return the consumer s connection Uuid
161,374
public boolean requiresRecovery ( SIMPMessage msg ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "requiresRecovery" , new Object [ ] { msg } ) ; boolean recoverable ; Reliability msgReliability = msg . getReliability ( ) ; recoverable = msgReliability . compareTo ( u...
Determine if this consumer will require this message to be recoverable
161,375
public void markNotReady ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markNotReady" ) ; ready = false ; if ( keyGroup != null ) keyGroup . markNotReady ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "markNotR...
Make this key not ready
161,376
public JSConsumerKey getParent ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getParent" ) ; JSConsumerKey key = this ; if ( keyGroup != null ) key = keyGroup ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getPare...
Return this key s parent if it is a member of a keyGroup
161,377
public void start ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "start" ) ; if ( ! started ) { started = true ; if ( keyGroup != null ) keyGroup . startMember ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "s...
The ConsumerKey doesn t actually care if the consumer is started but its ConsumerKey does
161,378
public void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "stop" ) ; if ( started ) { started = false ; if ( keyGroup != null ) keyGroup . stopMember ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "stop"...
The ConsumerKey doesn t actually care if the consumer is stopped but its ConsumerKey does
161,379
private void createNewFiltersAndCursors ( ItemStream itemStream ) throws SIResourceException , MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createNewFiltersAndCursors" , itemStream ) ; LockingCursor cursor = null ; if ( classifyingMessages ) { ...
Create the filters and cursors for this Key . If XD has registered a MessageController we ll need a cursor - filter pair for each classification .
161,380
public JmsConnectionFactory createConnectionFactory ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createConnectionFactory" ) ; JmsConnectionFactory jmscf = null ; JmsJcaFactory jcaFact = JmsJcaFactory . getInstance ( ) ; if ( jcaFact ==...
This method is called by the application to retrieve its first ConnectionFactory object .
161,381
public JmsQueueConnectionFactory createQueueConnectionFactory ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createQueueConnectionFactory" ) ; JmsQueueConnectionFactory jmsqcf = null ; JmsJcaManagedQueueConnectionFactory jcamqcf = JmsJca...
This method is called by the application to retrieve its first QueueConnectionFactory object .
161,382
public JmsTopicConnectionFactory createTopicConnectionFactory ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createTopicConnectionFactory" ) ; JmsTopicConnectionFactory jmstcf = null ; JmsJcaManagedTopicConnectionFactory jcamtcf = JmsJca...
This method is called by the application to retrieve its first TopicConnectionFactory object .
161,383
public JmsQueue createQueue ( String name ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createQueue" , name ) ; JmsQueue queue = null ; if ( ( name == null ) || ( "" . equals ( name ) ) || ( JmsQueueImpl . QUEUE_PREFIX . equals ( name ) )...
This method is called by the application to create a jms administered queue object .
161,384
public JmsTopic createTopic ( String name ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createTopic" , name ) ; JmsTopic topic = null ; if ( name == null ) { throw ( InvalidDestinationException ) JmsErrorUtils . newThrowable ( InvalidDest...
This method is called by the application to create a jms administered topic object .
161,385
void handlePut ( SimpleTest test , Conjunction selector , MatchTarget object , InternTable subExpr ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handlePut" , new Object [ ] { test , selector , object , subExpr } ) ; Object value = test . getValue ( ) ; if ( value == null ) th...
Implement handlePut .
161,386
void handleEqualityPut ( Object value , Conjunction selector , MatchTarget object , InternTable subExpr ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handleEqualityPut" , new Object [ ] { value , selector , object , subExpr } ) ; ContentMatcher next = ( ContentMatcher ) ( ( c...
Perform the handlePut function when the test is an equality test
161,387
void handleEqualityRemove ( Object value , Conjunction selector , MatchTarget object , InternTable subExpr , OrdinalPosition parentId ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "handleEqualityRemove" , new Object [ ] { value , selector , object , subExpr } ) ; ContentMatche...
Perform the handleRemove function when the test is an equality test
161,388
boolean isEmpty ( ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "isEmpty" ) ; boolean ans = super . isEmpty ( ) && ! haveEqualityMatches ( ) ; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "isEmpty" , new Boolean ( ans ) ) ; return ans ; }
Override isEmpty to check whether children is empty
161,389
ContentMatcher nextMatcher ( Conjunction selector , ContentMatcher oldMatcher ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "nextMatcher" , "selector: " + selector + ", oldMatcher: " + oldMatcher ) ; ContentMatcher ans ; if ( ! cacheing ) ans = super . nextMatcher ( selector , oldMatcher ) ; else if (...
Override nextMatcher to handle possibility of cacheing
161,390
public void setDestination ( DestinationHandler originalDestination ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDestination" , originalDestination ) ; _originalDestination = originalDestination ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEna...
Sets the destination that could not be delivered to .
161,391
public void setDestination ( SIDestinationAddress destinationAddr ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDestination" , destinationAddr ) ; if ( destinationAddr != null ) { try { _originalDestination = _messageProcessor . getDestinationManager ( ) . getDe...
Sets the destination that could not be delivered to . Looks up the destination given its name .
161,392
public int checkCanExceptionMessage ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkCanExceptionMessage" ) ; int rc = DestinationHandler . OUTPUT_HANDLER_NOT_FOUND ; String newExceptionDestination = null ; boolean usingDefault = false ; if ( _originalDestinati...
Check whether it will be possible to place a message on the exception destination .
161,393
public UndeliverableReturnCode handleUndeliverableMessage ( SIBusMessage msg , String alternateUser , TransactionCommon tran , int exceptionReason , String [ ] exceptionStrings ) { return handleUndeliverableMessage ( msg , alternateUser , tran , exceptionReason , exceptionStrings , null ) ; }
Wrapper method for handleUndeliverableMessage . This version will be called from an external component via the com . ibm . ws . sib . processor . ExceptionDestinationHandler interface . E . g . we need to access this routine from the MQLink in the comms component .
161,394
private UndeliverableReturnCode checkMessage ( SIMPMessage message ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkMessage" , message ) ; UndeliverableReturnCode rc = UndeliverableReturnCode . OK ; Reliability discardReliabilityThreshold = Reliability . BEST_EFF...
Checks that a message is valid for delivery to an exception destination
161,395
private AccessResult checkExceptionDestinationAccess ( JsMessage msg , ConnectionImpl conn , String alternateUser , boolean defaultInUse ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkExceptionDestinationAccess" , new Object [ ] { msg , conn , alternateUser , B...
Checks authority to access exception destination .
161,396
private void handleAccessDenied ( AccessResult result , JsMessage msg , String alternateUser ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleAccessDenied" , new Object [ ] { result , msg , alternateUser } ) ; String userName = null ; OperationType operationType...
Fire an event if eventing is enabled and write an audit record .
161,397
private void fireMessageExceptionedEvent ( String apiMsgId , SIMPMessage message , int exceptionReason ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireMessageExceptionedEvent" , new Object [ ] { apiMsgId , message , Integer . valueOf ( exceptionReason ) } ) ; JsM...
Fire an event notification of type TYPE_SIB_MESSAGE_EXCEPTIONED
161,398
public static String decodeUri ( String url ) { int index1 = url . indexOf ( sessUrlRewritePrefix ) ; int index2 = url . indexOf ( qMark ) ; String tmp = null ; if ( index2 != - 1 && index2 > index1 ) { tmp = url . substring ( index2 ) ; } if ( index1 != - 1 ) { url = url . substring ( 0 , index1 ) ; if ( tmp != null )...
Strips out the sessionId only form the URI
161,399
public static final void setInstance ( FaceletFactory factory ) { if ( factory == null ) { instance . remove ( ) ; } else { instance . set ( factory ) ; } }
Set the static instance