idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
161,400 | private void rebuildDiscriminatorList ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "rebuildDiscriminatorList" ) ; } discAL . clear ( ) ; DiscriminatorNode dn = discriminators ; discAL . add ( dn . disc ) ; dn = dn . next ; while ( dn != null ) { discAL . add ( dn ... | Rebuild the array list from the linked list . | 153 | 10 |
161,401 | private void addChannel ( Channel chan ) { if ( channelList == null ) { channelList = new Channel [ 1 ] ; channelList [ 0 ] = chan ; } else { Channel [ ] oldList = channelList ; channelList = new Channel [ oldList . length + 1 ] ; System . arraycopy ( oldList , 0 , channelList , 0 , oldList . length ) ; channelList [ o... | Add a channel to the channel list to be searched . | 97 | 11 |
161,402 | @ FFDCIgnore ( { NamingException . class } ) @ Sensitive Object resolveObject ( Object o , WSName subname ) throws NamingException { ServiceReference < ? > ref = null ; try { if ( o instanceof ContextNode ) return new WSContext ( userContext , ( ContextNode ) o , env ) ; if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc ,... | Perform any needed conversions on an object retrieved from the context tree . | 743 | 14 |
161,403 | public void send ( ) throws AuditServiceUnavailableException { AuditService auditService = SecurityUtils . getAuditService ( ) ; if ( auditService != null ) { auditService . sendEvent ( this ) ; } else { throw new AuditServiceUnavailableException ( ) ; } } | Send this event to the audit service for logging . | 60 | 10 |
161,404 | public static boolean isAuditRequired ( String eventType , String outcome ) throws AuditServiceUnavailableException { AuditService auditService = SecurityUtils . getAuditService ( ) ; if ( auditService != null ) { return auditService . isAuditRequired ( eventType , outcome ) ; } else { throw new AuditServiceUnavailable... | Check to see if auditing is required for an event type and outcome . | 76 | 15 |
161,405 | private void removeEntriesStartingWith ( String key ) { synchronized ( eventMap ) { Iterator < String > iter = eventMap . keySet ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { String str = iter . next ( ) ; if ( str . startsWith ( key ) ) { iter . remove ( ) ; } } } } | Remove all entries starting with the given key | 77 | 8 |
161,406 | public void put ( SimpleEntry simpleEntry ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , simpleEntry ) ; simpleEntry . previous = last ; simpleEntry . list = this ; if ( last != null ) last . next = simpleEntry ; else first = simpleEntry ; last = simpl... | Add an entry to the list | 129 | 6 |
161,407 | protected String printList ( ) { String output = "[" ; SimpleEntry pointer = first ; int counter = 0 ; while ( ( pointer != null ) && ( counter < 3 ) ) { output += "@" + Integer . toHexString ( pointer . hashCode ( ) ) ; pointer = pointer . next ; if ( pointer != null ) output += ", " ; counter ++ ; } if ( pointer != n... | Return the first and last entries in the list | 123 | 9 |
161,408 | private void initializePort ( ) throws ChannelException { try { this . endPoint . initServerSocket ( ) ; } catch ( IOException ioe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "TCP Channel: " + getExternalName ( ) + "- Problem occurred while initializing TCP Channel... | Initialize the endpoint listening socket . | 274 | 7 |
161,409 | private synchronized void destroyConnLinks ( ) { // inUse queue is still open to modification // during this time. Returned iterator is a "weakly consistent" // I don't believe this has (yet) caused any issues. for ( Queue < TCPConnLink > queue : this . inUse ) { try { TCPConnLink tcl = queue . poll ( ) ; while ( tcl !... | call the destroy on all the TCPConnLink objects related to this TCPChannel which are currently in use . | 202 | 21 |
161,410 | protected Object getValue ( String propertyName , Type propertyType , boolean optional , String defaultString ) { Object value = null ; assertNotClosed ( ) ; SourcedValue sourced = getSourcedValue ( propertyName , propertyType ) ; if ( sourced != null ) { value = sourced . getValue ( ) ; } else { if ( optional ) { valu... | Get the converted value of the given property . If the property is not found and optional is true then use the default string to create a value to return . If the property is not found and optional is false then throw an exception . | 129 | 46 |
161,411 | @ Trivial public static void logToJobLogAndTraceOnly ( Level level , String msg , Object [ ] params , Logger traceLogger ) { String formattedMsg = getFormattedMessage ( msg , params , "Job event." ) ; logRawMsgToJobLogAndTraceOnly ( level , formattedMsg , traceLogger ) ; } | Logs the message to joblog and trace . | 75 | 10 |
161,412 | @ Trivial public static void logRawMsgToJobLogAndTraceOnly ( Level level , String msg , Logger traceLogger ) { if ( level . intValue ( ) > Level . FINE . intValue ( ) ) { traceLogger . log ( Level . FINE , msg ) ; logToJoblogIfNotTraceLoggable ( Level . FINE , msg , traceLogger ) ; } else { traceLogger . log ( level , ... | logs the message to joblog and trace . | 126 | 10 |
161,413 | public byte [ ] toEncodedForm ( ) { if ( encodedForm == null ) { encodedForm = new byte [ encodedSize ( ) ] ; ArrayUtil . writeLong ( encodedForm , 0 , accessSchemaId ) ; encode ( encodedForm , new int [ ] { 8 , encodedForm . length } ) ; } return encodedForm ; } | Turn an CompatibilityMap into its encoded form | 74 | 8 |
161,414 | private void encode ( byte [ ] frame , int [ ] limits ) { JSType . setCount ( frame , limits , indices . length ) ; for ( int i = 0 ; i < indices . length ; i ++ ) JSType . setCount ( frame , limits , indices [ i ] ) ; JSType . setCount ( frame , limits , varBias ) ; JSType . setCount ( frame , limits , setCases . leng... | Encode subroutine used by toEncodedForm | 327 | 11 |
161,415 | private int encodedSize ( ) { int ans = 16 /* for accessSchemaID, indices.length, varBias, setCases.length, and getCases.length */ + 2 * indices . length ; // for the elements in indices for ( int i = 0 ; i < setCases . length ; i ++ ) { int [ ] cases = setCases [ i ] ; ans += 2 ; // for cases.length or null indicator ... | Find the number of bytes it takes to encode this CompatibilityMap | 172 | 12 |
161,416 | private static void violation ( JMFType from , JMFType to ) throws JMFSchemaViolationException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) JmfTr . debug ( tc , "Violation:" + " from = " + from . getFeatureName ( ) + " : " + from + ", to = " + to . getFeatureName ( ) + " : " + to ) ; thr... | Handle violation of the compatibility rules by throwing an informative exception | 132 | 11 |
161,417 | private void recordOnePair ( JSField access , JSchema accSchema , JSField encoding , JSchema encSchema ) { int acc = access . getAccessor ( accSchema ) ; if ( acc >= indices . length ) return ; indices [ acc ] = encoding . getAccessor ( encSchema ) ; } | later when maps are built for variant box schemas . | 71 | 11 |
161,418 | private void checkForDeletingVariant ( JMFType nonVar , JSVariant var , boolean varIsAccess , JSchema accSchema , JSchema encSchema ) throws JMFSchemaViolationException { // Deleting variant always has exactly two cases if ( var . getCaseCount ( ) != 2 ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEn... | info stripping off the deleting variant . | 352 | 7 |
161,419 | private static void checkExtraFields ( JSTuple tuple , int startCol , int count ) throws JMFSchemaViolationException { for ( int i = startCol ; i < count ; i ++ ) { JMFType field = tuple . getField ( i ) ; if ( field instanceof JSVariant ) { JMFType firstCase = ( ( JSVariant ) field ) . getCase ( 0 ) ; if ( firstCase i... | Check the extra columns in a tuple to make sure they are all defaultable | 150 | 15 |
161,420 | public StampedValue asType ( final Type type ) { StampedValue cachedValue = null ; //looping around a list is probably quicker than having a map since there are probably only one or two different //types in use at any one time for ( StampedValue value : typeCache ) { if ( value . getType ( ) . equals ( type ) ) { cache... | Check if a StampedValue already exists for the type if it does return it otherwise create a new one and add it | 132 | 24 |
161,421 | @ Deprecated public static void finalizeForDeletion ( UIComponent component ) { // remove any existing marks of deletion component . getAttributes ( ) . remove ( MARK_DELETED ) ; // finally remove any children marked as deleted if ( component . getChildCount ( ) > 0 ) { for ( Iterator < UIComponent > iter = component .... | Used in conjunction with markForDeletion where any UIComponent marked will be removed . | 267 | 20 |
161,422 | public static UIComponent findChild ( UIComponent parent , String id ) { int childCount = parent . getChildCount ( ) ; if ( childCount > 0 ) { for ( int i = 0 ; i < childCount ; i ++ ) { UIComponent child = parent . getChildren ( ) . get ( i ) ; if ( id . equals ( child . getId ( ) ) ) { return child ; } } } return nul... | A lighter - weight version of UIComponent s findChild . | 98 | 14 |
161,423 | public static UIComponent findChildByTagId ( UIComponent parent , String id ) { Iterator < UIComponent > itr = null ; if ( parent . getChildCount ( ) > 0 ) { for ( int i = 0 , childCount = parent . getChildCount ( ) ; i < childCount ; i ++ ) { UIComponent child = parent . getChildren ( ) . get ( i ) ; if ( id . equals ... | By TagId find Child | 455 | 5 |
161,424 | public static Locale getLocale ( FaceletContext ctx , TagAttribute attr ) throws TagAttributeException { Object obj = attr . getObject ( ctx ) ; if ( obj instanceof Locale ) { return ( Locale ) obj ; } if ( obj instanceof String ) { String s = ( String ) obj ; if ( s . length ( ) == 2 ) { return new Locale ( s ) ; } if... | According to JSF 1 . 2 tag specs this helper method will use the TagAttribute passed in determining the Locale intended . | 246 | 25 |
161,425 | public static UIViewRoot getViewRoot ( FaceletContext ctx , UIComponent parent ) { UIComponent c = parent ; do { if ( c instanceof UIViewRoot ) { return ( UIViewRoot ) c ; } else { c = c . getParent ( ) ; } } while ( c != null ) ; UIViewRoot root = ctx . getFacesContext ( ) . getViewRoot ( ) ; if ( root == null ) { roo... | Tries to walk up the parent to find the UIViewRoot if not found then go to FaceletContext s FacesContext for the view root . | 139 | 31 |
161,426 | @ Deprecated public static void markForDeletion ( UIComponent component ) { // flag this component as deleted component . getAttributes ( ) . put ( MARK_DELETED , Boolean . TRUE ) ; Iterator < UIComponent > iter = component . getFacetsAndChildren ( ) ; while ( iter . hasNext ( ) ) { UIComponent child = iter . next ( ) ... | Marks all direct children and Facets with an attribute for deletion . | 129 | 14 |
161,427 | private static UIComponent createFacetUIPanel ( FaceletContext ctx , UIComponent parent , String facetName ) { FacesContext facesContext = ctx . getFacesContext ( ) ; UIComponent panel = facesContext . getApplication ( ) . createComponent ( facesContext , UIPanel . COMPONENT_TYPE , null ) ; // The panel created by this... | Create a new UIPanel for the use as a dynamically created container for multiple children in a facet . Duplicate in javax . faces . webapp . UIComponentClassicTagBase . | 572 | 42 |
161,428 | public PolicyExecutor create ( Map < String , Object > props ) { PolicyExecutor executor = new PolicyExecutorImpl ( ( ExecutorServiceImpl ) globalExecutor , ( String ) props . get ( "config.displayId" ) , null , policyExecutors ) ; executor . updateConfig ( props ) ; return executor ; } | Creates a new policy executor instance and initializes it per the specified OSGi service component properties . The config . displayId of the OSGi service component properties is used as the unique identifier . | 74 | 40 |
161,429 | public PolicyExecutor create ( String identifier ) { return new PolicyExecutorImpl ( ( ExecutorServiceImpl ) globalExecutor , "PolicyExecutorProvider-" + identifier , null , policyExecutors ) ; } | Creates a new policy executor instance . | 45 | 9 |
161,430 | public PolicyExecutor create ( String fullIdentifier , String owner ) { return new PolicyExecutorImpl ( ( ExecutorServiceImpl ) globalExecutor , fullIdentifier , owner , policyExecutors ) ; } | Creates a new policy executor instance for use by a single application . Policy executors owned by this application can be shut down via the shutdownNow method of this class . | 45 | 35 |
161,431 | public GZIPOutputStream getGZIPOutputStream ( BeanId beanId ) throws CSIException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getOutputStream" , beanId ) ; final String fileName = getPortableFilename ( beanId ) ; final long beanTi... | Get object ouput stream suitable for reading persistent state associated with given key . | 398 | 16 |
161,432 | private String getPortableFilename ( BeanId beanId ) { // Historically, this method returned the equivalent of // appendPortableFilenameString(beanId.toString()), where BeanId.toString // returned "BeanId(" + j2eeName + ", " + pkey + ")", which translates to // "BeanId_" + j2eeName + "__" + pkey + "_". RTC102568 String... | Create a safe file name given the BeanId . There are a number of characters which can cause problems on different platforms . A safe file name will container only the following characters a - z A - Z _ - . All other characters will get converted to a _ | 191 | 52 |
161,433 | public OutputStream getOutputStream ( BeanId beanId ) throws CSIException { final String fileName = getPortableFilename ( beanId ) ; final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getOutputStream: key=" + beanId + ", file=" , fileName ... | LIDB2018 - 1 new method for just dumping in the byte array to a file byte array in gzip format . | 363 | 25 |
161,434 | public static LooseConfig convertToLooseConfig ( File looseFile ) throws Exception { //make sure the file exists, can be read and is an xml if ( looseFile . exists ( ) && looseFile . isFile ( ) && looseFile . canRead ( ) && looseFile . getName ( ) . toLowerCase ( ) . endsWith ( ".xml" ) ) { LooseConfig root = new Loose... | Refer to the com . ibm . ws . artifact . api . loose . internal . LooseContainerFactoryHelper . createContainer . Parse the loose config file and create the looseConfig object which contains the file s content . | 651 | 47 |
161,435 | public static ArchiveEntryConfig createLooseArchiveEntryConfig ( LooseConfig looseConfig , File looseFile , BootstrapConfig bootProps , String archiveEntryPrefix , boolean isUsr ) throws IOException { File usrRoot = bootProps . getUserRoot ( ) ; int len = usrRoot . getAbsolutePath ( ) . length ( ) ; String entryPath = ... | Using the method to create Loose config s Archive entry config | 282 | 12 |
161,436 | public static Pattern convertToRegex ( String excludeStr ) { // make all "." safe decimles then convert ** to .* and /* to /.* to make it regex if ( excludeStr . contains ( "." ) ) { // regex for "." is \. - but we are converting the string to a regex string so need to escape the escape slash... excludeStr = excludeStr... | Copy from com . ibm . ws . artifact . api . loose . internal . LooseArchive | 440 | 22 |
161,437 | public synchronized CommsByteBuffer allocate ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "allocate" ) ; // Remove a CommsByteBuffer from the pool CommsByteBuffer buff = ( CommsByteBuffer ) pool . remove ( ) ; // If the buffer is null then there was none available in the pool // So create a new one ... | Gets a CommsByteBuffer from the pool . | 165 | 11 |
161,438 | synchronized void release ( CommsByteBuffer buff ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "release" , buff ) ; buff . reset ( ) ; pool . add ( buff ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "release" ) ; } | Returns a buffer back to the pool so that it can be re - used . | 79 | 16 |
161,439 | void setMessage ( MessageImpl msg ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setMessage" , msg ) ; theMessage = msg ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setMessage" ) ; } | Set the back - pointer to the MFP message that contains this JMO instance . | 91 | 17 |
161,440 | private final int encodeIds ( byte [ ] buffer , int offset ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "encodeIds" ) ; int idOffset = offset ; // Write the JMF version number and Schema id for the header ArrayUtil . writeShort ( buffer , idOffset , ( ( JMFM... | Encode the JMF version and schema ids into a byte array buffer . The buffer will be used when transmitting over the wire hardening into a database and for any other need for serialization | 421 | 39 |
161,441 | private final DataSlice encodeHeaderPartToSlice ( JsMsgPart jsPart ) throws MessageEncodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "encodeHeaderPartToSlice" , jsPart ) ; // We hope that it is already encoded so we can just get it from JMF...... | Encode the header or only a message part into a DataSlice for transmitting over the wire or flattening for persistence . If the message part is already assembled the contents are simply be wrapped in a DataSlice by the JMFMessage & returned . If the message part is not already assembled the part is encoded into a new b... | 265 | 77 |
161,442 | JMFSchema [ ] getEncodingSchemas ( ) throws MessageEncodeFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getEncodingSchemas" ) ; JMFSchema [ ] result ; try { JMFSchema [ ] result1 = ( ( JMFMessage ) headerPart . jmfPart ) . getSchemata ( ) ; JMFS... | Get a list of the JMF schemas needed to decode this message | 457 | 14 |
161,443 | JsMsgObject getCopy ( ) throws MessageCopyFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getCopy" ) ; JsMsgObject newJmo = null ; try { // We need to lock the whole of the copy with the getHdr2, getApi & getPayload // methods on the owning messa... | Return a copy of this JsMsgObject . | 513 | 10 |
161,444 | private final void ensureReceiverHasSchemata ( CommsConnection conn ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "ensureReceiverHasSchemata" , conn ) ; // We need to check if the receiver has all the necessary schema definitions to be able /... | We need to check if the receiver has all the necessary schema definitions to be able to decode this message and pre - send any that are missing . | 222 | 29 |
161,445 | final String debugMsg ( ) { StringBuffer result ; result = new StringBuffer ( JSFormatter . format ( ( JMFMessage ) headerPart . jmfPart ) ) ; if ( payloadPart != null ) { result . append ( JSFormatter . formatWithoutPayloadData ( ( JMFMessage ) payloadPart . jmfPart ) ) ; } return result . toString ( ) ; } | in the payload . | 85 | 4 |
161,446 | final String debugId ( long id ) { byte [ ] buf = new byte [ 8 ] ; ArrayUtil . writeLong ( buf , 0 , id ) ; return HexUtil . toString ( buf ) ; } | For debug only ... Write a schema ID in hex | 46 | 10 |
161,447 | public synchronized boolean clearIfNotInUse ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "clearIfNotInUse" , new Object [ ] { _recoveryId , _recoveredInUseCount } ) ; boolean cleared = false ; if ( _loggedToDisk && _recoveredInUseCount == 0 ) { try { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "removing ... | Clears the recovery log record associated with this partner from the partner log if this partner is not associated with current transactions . If this partner is re - used the logData call will allocate a new recoverable unit and re - log the information back to the partner log . | 357 | 54 |
161,448 | public boolean recover ( ClassLoader cl , Xid [ ] xids , byte [ ] failedStoken , byte [ ] cruuid , int restartEpoch ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "recover" , new Object [ ] { this , cl , xids , failedStoken , cruuid , restartEpoch } ) ; decrementCount ( ) ; return true ; } | Default implementation for non - XA recovery data items | 90 | 10 |
161,449 | private void getFilesForFeature ( File installRoot , final Set < String > absPathsForLibertyContent , final Set < String > absPathsForLibertyBundles , final Set < String > absPathsForLibertyLocalizations , final Set < String > absPathsForLibertyIcons , final ProvisioningFeatureDefinition fd , final ContentBasedLocalBun... | as we have a complete build we don t need | 682 | 10 |
161,450 | public void addFileResource ( File installRoot , final Set < String > content , String locString ) { String [ ] locs ; if ( locString . contains ( "," ) ) { locs = locString . split ( "," ) ; } else { locs = new String [ ] { locString } ; } for ( String loc : locs ) { File test = new File ( loc ) ; if ( ! test . isAbso... | Adds a file resource to the set of file paths . | 130 | 11 |
161,451 | private void copy ( OutputStream out , File in ) throws IOException { FileInputStream inStream = null ; try { inStream = new FileInputStream ( in ) ; byte [ ] buffer = new byte [ 4096 ] ; int len ; while ( ( len = inStream . read ( buffer ) ) != - 1 ) { out . write ( buffer , 0 , len ) ; } } finally { if ( inStream != ... | Copies the file to the output stream | 101 | 8 |
161,452 | public static String getDataSourceIdentifier ( WSJdbcWrapper jdbcWrapper ) { DSConfig config = jdbcWrapper . dsConfig . get ( ) ; return config . jndiName == null ? config . id : config . jndiName ; } | Utility method to obtain the unique identifier of the data source associated with a JDBC wrapper . | 62 | 19 |
161,453 | public static String getSql ( Object jdbcWrapper ) { if ( jdbcWrapper instanceof WSJdbcPreparedStatement ) // also includes WSJdbcCallableStatement return ( ( WSJdbcPreparedStatement ) jdbcWrapper ) . sql ; else if ( jdbcWrapper instanceof WSJdbcResultSet ) return ( ( WSJdbcResultSet ) jdbcWrapper ) . sql ; else return... | Utility method to obtain the SQL command associated with a JDBC resource . | 103 | 15 |
161,454 | public static void handleStaleStatement ( WSJdbcWrapper jdbcWrapper ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) Tr . event ( tc , "Encountered a Stale Statement: " + jdbcWrapper ) ; if ( jdbcWrapper instanceof WSJdbcObject ) try { WSJdbcConnection connWrapper = ( WSJdbcConnection ) ( ... | Performs special handling for stale statements such as clearing the statement cache and marking existing statements non - poolable . | 252 | 22 |
161,455 | public static SQLException mapException ( WSJdbcWrapper jdbcWrapper , SQLException sqlX ) { Object mapper = null ; WSJdbcConnection connWrapper = null ; if ( jdbcWrapper instanceof WSJdbcObject ) { // Use the connection and managed connection. connWrapper = ( WSJdbcConnection ) ( ( WSJdbcObject ) jdbcWrapper ) . getCon... | Map a SQLException . And if it s a connection error send a CONNECTION_ERROR_OCCURRED ConnectionEvent to all listeners of the Managed Connection . | 182 | 37 |
161,456 | @ Trivial public static boolean validLocalHostName ( String hostName ) { InetAddress addr = findLocalHostAddress ( hostName , PREFER_IPV6 ) ; return addr != null ; } | Verifies whether or not the provided hostname references an interface on this machine . The provided name is unchanged by this operation . | 44 | 25 |
161,457 | public static ManifestInfo parseManifest ( JarFile jar ) throws RepositoryArchiveException , RepositoryArchiveIOException { String prov = null ; // Create the WLPInformation and populate it Manifest mf = null ; try { mf = jar . getManifest ( ) ; } catch ( IOException e ) { throw new RepositoryArchiveIOException ( "Unab... | Extracts information from the manifest in the supplied jar file and populates a newly created WlpInformation object with the extracted information as well as putting information into the asset itself . | 775 | 36 |
161,458 | void timerLoop ( ) throws ResourceException { final String methodName = "timerLoop" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } checkMEs ( getMEsToCheck ( ) ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled (... | This method will be driven by a timer pop or by the MDB starting up . This is the entry point | 109 | 22 |
161,459 | void checkMEs ( JsMessagingEngine [ ] MEList ) throws ResourceException { final String methodName = "checkMEs" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { MEList } ) ; } // Filter out any non preferred MEs. User specified... | This method will check the supplied MEs to see if they are suitable for connecting to . | 686 | 18 |
161,460 | void kickOffTimer ( ) throws UnavailableException { final String methodName = "kickOffTimer" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } synchronized ( _timerLock ) { // Another timer is already running - no need to create a new one i... | Kicks of a timer to attempt to create connections after a user specified interval . | 309 | 16 |
161,461 | private void createSingleListener ( final SibRaMessagingEngineConnection connection ) throws ResourceException { final String methodName = "createSingleListener" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , connection ) ; } final SIDestina... | This method will create a listener to the specified destination | 557 | 10 |
161,462 | private void createMultipleListeners ( final SibRaMessagingEngineConnection connection ) throws ResourceException { final String methodName = "createMultipleListeners" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , connection ) ; } try { fin... | This method will create a listener to each destination that matches the wildcarded destination | 710 | 16 |
161,463 | boolean checkIfRemote ( SibRaMessagingEngineConnection conn ) { final String methodName = "checkIfRemote" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { conn } ) ; } String meName = conn . getConnection ( ) . getMeName ( ) ;... | This method checks to see if the specified connection is to a remote ME . It will check the name of the ME the connection is connected to againgst the list of local MEs that are on the locla server . | 373 | 46 |
161,464 | void dropNonPreferredConnections ( ) { final String methodName = "dropNonPreferredConnections" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } // If we are connected to a non preferred then we will NEVER be connect to a preferred as // we... | This method will close any connections that are considered non preferred . Non preferred connections are only created when target significane is set to preferred and the system was not able to create a connection that match the target data . | 148 | 42 |
161,465 | void dropRemoteConnections ( ) { final String methodName = "dropRemoteConnections" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } if ( _connectedRemotely ) { closeConnections ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE... | If we are connected remotely then drop the connection . | 112 | 10 |
161,466 | void closeConnections ( ) { final String methodName = "closeConnections" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } synchronized ( _connections ) { Collection < SibRaMessagingEngineConnection > cons = _connections . values ( ) ; Iter... | Close all the connections we currently have open . | 182 | 9 |
161,467 | @ Override public synchronized void messagingEngineStopping ( final JsMessagingEngine messagingEngine , final int mode ) { final String methodName = "messagingEngineStopping" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { me... | Overrides the parent method so that if there are no connections left it will check to see if a new connection can be made | 200 | 26 |
161,468 | void dropConnection ( SibRaMessagingEngineConnection connection , boolean isSessionError , boolean retryImmediately , boolean alreadyClosed ) { String methodName = "dropConnection" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ... | Drop the connection to the specified ME . If we have no connections left then try to create a new connection . | 626 | 22 |
161,469 | @ Override public void messagingEngineDestroyed ( JsMessagingEngine messagingEngine ) { final String methodName = "messagingEngineDestroyed" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } if ( TraceComponent . isAnyTrac... | The messaging engine has been destroyed nothing to do here . | 114 | 11 |
161,470 | private boolean validMagicNumber ( byte [ ] magicNumberBuffer ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "validMagicNumber" , new java . lang . Object [ ] { RLSUtils . toHexString ( magicNumberBuffer , RLSUtils . MAX_DISPLAY_BYTES ) , this } ) ; boolean incorrectByteDetected = false ; int currentByte = 0 ; wh... | Determines if the supplied magic number is a valid log file header magic number as stored in MAGIC_NUMBER | 199 | 24 |
161,471 | public long date ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "date" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "date" , new Long ( _date ) ) ; return _date ; } | Return the date field stored in the target header | 62 | 9 |
161,472 | public long firstRecordSequenceNumber ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "firstRecordSequenceNumber" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "firstRecordSequenceNumber" , new Long ( _firstRecordSequenceNumber ) ) ; return _firstRecordSequenceNumber ; } | Return the firstRecordSequenceNumber field stored in the target header | 82 | 13 |
161,473 | public String serviceName ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "serviceName" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "serviceName" , _serviceName ) ; return _serviceName ; } | Return the serviceName field stored in the target header | 63 | 10 |
161,474 | public int serviceVersion ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "serviceVersion" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "serviceVersion" , new Integer ( _serviceVersion ) ) ; return _serviceVersion ; } | Return the serviceVersion field stored in the target header | 67 | 10 |
161,475 | public String logName ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "logName" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "logName" , _logName ) ; return _logName ; } | Return the logName field stored in the target header | 63 | 10 |
161,476 | public byte [ ] getServiceData ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getServiceData" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getServiceData" , RLSUtils . toHexString ( _serviceData , RLSUtils . MAX_DISPLAY_BYTES ) ) ; return _serviceData ; } | Return the service data stored in the target header . | 93 | 10 |
161,477 | public void setServiceData ( byte [ ] serviceData ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setServiceData" , new java . lang . Object [ ] { RLSUtils . toHexString ( serviceData , RLSUtils . MAX_DISPLAY_BYTES ) , this } ) ; _serviceData = serviceData ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "setSer... | Change the service data associated with the target log file header . | 107 | 12 |
161,478 | public boolean compatible ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "compatible" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "compatible" , new Boolean ( _compatible ) ) ; return _compatible ; } | Test to determine if the target log file header belongs to a compatible RLS file . | 62 | 17 |
161,479 | public boolean valid ( ) { boolean valid = true ; if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "valid" , this ) ; if ( _status == STATUS_INVALID ) valid = false ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "valid" , new Boolean ( valid ) ) ; return valid ; } | Test to determine if the target log file header belongs to a valid RLS file . | 81 | 17 |
161,480 | public int status ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "status" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "status" , new Integer ( _status ) ) ; return _status ; } | Return the status field stored in the target header | 62 | 9 |
161,481 | public void reset ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "reset" , this ) ; _status = STATUS_ACTIVE ; _date = 0 ; _firstRecordSequenceNumber = 0 ; _serverName = null ; _serviceName = null ; _serviceVersion = 0 ; _logName = null ; _variableFieldData = initVariableFieldData ( ) ; _serviceData = null ; if ... | Destroy the internal state of this header object . Note that we don t reset the _compatible flag as we call this method from points in the code wher its both true and false and we want to ensure that it is represented in the exceptions that get thrown when other calls are made . | 116 | 57 |
161,482 | public void changeStatus ( int newStatus ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "changeStatus" , new java . lang . Object [ ] { this , new Integer ( newStatus ) } ) ; _status = newStatus ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "changeStatus" ) ; } | Update the status field stored in the target header . | 80 | 10 |
161,483 | public void keypointStarting ( long nextRecordSequenceNumber ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "keypointStarting" , new Object [ ] { this , new Long ( nextRecordSequenceNumber ) } ) ; GregorianCalendar currentCal = new GregorianCalendar ( ) ; Date currentDate = currentCal . getTime ( ) ; _date = curr... | Informs the LogFileHeader instance that a keypoint operation is about begin into file associated with this LogFileHeader instance . The status of the header is updated to KEYPOINTING . | 171 | 38 |
161,484 | public void keypointComplete ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "keypointComplete" , this ) ; _status = STATUS_ACTIVE ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "keypointComplete" ) ; } | Informs the LogFileHeader instance that the keypoint operation has completed . The status of the header is updated to ACTIVE . | 66 | 26 |
161,485 | static String statusToString ( int status ) { String result = null ; if ( status == STATUS_INACTIVE ) { result = "INACTIVE" ; } else if ( status == STATUS_ACTIVE ) { result = "ACTIVE" ; } else if ( status == STATUS_KEYPOINTING ) { result = "KEYPOINTING" ; } else if ( status == STATUS_INVALID ) { result = "INVALID" ; } ... | Utility method to convert a numerical status into a printable string form . | 116 | 15 |
161,486 | public TransactionCommon registerInBatch ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "registerInBatch" ) ; _readWriteLock . lock ( ) ; // Register as a reader synchronized ( this ) // lock the state against other readers { if ( _currentTran == null ) _cur... | Register an interest in the current batch . The batch can not be completed until messagesAdded is called . | 152 | 20 |
161,487 | public void messagesAdded ( int msgCount , BatchListener listener ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "messagesAdded" , "msgCount=" + msgCount + ",listener=" + listener ) ; boolean completeBatch = false ; try { synchronize... | Tell the BatchHandler how many messages were added under the current transaction . | 348 | 15 |
161,488 | public void completeBatch ( boolean force , BatchListener finalListener ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "completeBatch" , "force=" + force + ",finalListener=" + finalListener ) ; _readWriteLock . lockExclusive ( ) ; //... | Complete the current batch . If timer is false then the batch is only completed if the batch is full . If timer is true then the batch is completed so long as there are one or more messages in the batch . | 698 | 43 |
161,489 | public void alarm ( Object alarmContext ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "alarm" , alarmContext ) ; synchronized ( this ) { _alarm = null ; } try { completeBatch ( true ) ; } catch ( SIException e ) { //No FFDC code needed SibTr . exception ( thi... | Method called when an alarm pops | 143 | 6 |
161,490 | private void parseIDFromURL ( RequestMessage request ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Looking for ID in URL" ) ; } String url = request . getRawRequestURI ( ) ; String target = getSessionConfig ( ) . getURLRewritingMarker ( ) ; URLParser parser = new UR... | Look for the possible session ID in the URL of the input request message . | 221 | 15 |
161,491 | public static String encodeURL ( String url , SessionInfo info ) { // could be /path/page#fragment?query // could be /page/page;session=existing#fragment?query // where fragment and query are both optional HttpSession session = info . getSession ( ) ; if ( null == session ) { return url ; } final String id = session . ... | Encode session information into the provided URL . This will replace any existing session in that URL . | 452 | 19 |
161,492 | public static String stripURL ( String url , SessionInfo info ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Removing any session id from [" + url + "]" ) ; } String target = info . getSessionConfig ( ) . getURLRewritingMarker ( ) ; URLParser parser = new URLParser (... | Strip out any session id information from the input URL . | 226 | 12 |
161,493 | private void parseIDFromCookies ( RequestMessage request ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Looking for ID in cookies" ) ; } Enumeration < String > list = request . getHeaders ( "Cookie" ) ; while ( list . hasMoreElements ( ) ) { String item = list . next... | Look for a possible session id in the cookies of the request message . | 213 | 14 |
161,494 | public static Cookie encodeCookie ( SessionInfo info ) { // create a cookie using the configuration information HttpSession session = info . getSession ( ) ; SessionConfig config = info . getSessionConfig ( ) ; Cookie cookie = new Cookie ( config . getIDName ( ) , config . getSessionVersion ( ) + session . getId ( ) ) ... | Create a proper Cookie for the given session object . | 140 | 10 |
161,495 | public HttpSession getSession ( boolean create ) { if ( null != this . mySession ) { if ( this . mySession . isInvalid ( ) ) { this . mySession = null ; } else { return this . mySession ; } } this . mySession = mgr . getSession ( this , create ) ; return this . mySession ; } | Access the current session for this connection . This may return null if one was not found and the create flag was false . If a cached session is found but it reports as invalid then this will look for a new session if the create flag is true . | 75 | 50 |
161,496 | public int get_searchScope ( ) { int searchScope = SearchControls . OBJECT_SCOPE ; String scopeBuf = get_scope ( ) ; if ( scopeBuf != null ) { if ( scopeBuf . compareToIgnoreCase ( "base" ) == 0 ) { searchScope = SearchControls . OBJECT_SCOPE ; } else if ( scopeBuf . compareToIgnoreCase ( "one" ) == 0 ) { searchScope =... | Returns the search scope used in LDAP search | 155 | 9 |
161,497 | public PersistenceUnitTransactionType getTransactionType ( ) { // Convert this TransactionType from the class defined in JAXB // (com.ibm.ws.jpa.pxml21.PersistenceUnitTransactionType) to JPA // (javax.persistence.spi.PersistenceUnitTransactionType). PersistenceUnitTransactionType rtnType = null ; com . ibm . ws . jpa .... | Gets the value of the transactionType property . | 226 | 10 |
161,498 | public static boolean copyModuleMetaDataSlot ( MetaDataEvent < ModuleMetaData > event , MetaDataSlot slot ) { Container container = event . getContainer ( ) ; MetaData metaData = event . getMetaData ( ) ; try { // For now, we just need to copy from WebModuleInfo, and ClientModuleInfo // Supports EJB in WAR and ManagedB... | Copy slot data from a primary module metadata to a nested module metadata . This is necessary for containers that want to share module - level data for all components in a module because nested modules have their own distinct metadata . | 274 | 42 |
161,499 | private static Object injectAndPostConstruct ( Object injectionProvider , Class Klass , List injectedBeanStorage ) { Object instance = null ; if ( injectionProvider != null ) { try { Object managedObject = _FactoryFinderProviderFactory . INJECTION_PROVIDER_INJECT_CLASS_METHOD . invoke ( injectionProvider , Klass ) ; in... | injectANDPostConstruct based on a class added for CDI 1 . 2 support . | 222 | 18 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.