idx int64 0 41.2k | question stringlengths 83 4.15k | target stringlengths 5 715 |
|---|---|---|
38,700 | public boolean recover ( RecoveryManager recoveryManager , ClassLoader cl , Xid [ ] xids ) { boolean success = true ; if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "recover" , new Object [ ] { this , _failureScopeController . serverName ( ) } ) ; final int restartEpoch = recoveryManager . getCurrentEpoch ( ) ; final... | Determine XA RMs needing recovery . |
38,701 | private < T > ServiceRegistration < T > registerMBean ( ObjectName on , Class < T > type , T o ) { Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; props . put ( "jmx.objectname" , on . toString ( ) ) ; return context . registerService ( type , o , props ) ; } | Used to Register an MBean |
38,702 | public void startReadListener ( ThreadContextManager tcm , SRTInputStream31 inputStream ) throws Exception { try { ReadListenerRunnable rlRunnable = new ReadListenerRunnable ( tcm , inputStream , this ) ; this . setReadListenerRunning ( true ) ; com . ibm . ws . webcontainer . osgi . WebContainer . getExecutorService (... | A read listener has been set on the SRTInputStream and we will set it up to do its first read on another thread . |
38,703 | public ThreadPool getThreadPool ( String threadPoolName , int minSize , int maxSize ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getThreadPool" , new Object [ ] { threadPoolName , minSize , maxSize } ) ; ThreadPool threadPool = null ; if ( RuntimeInfo . isT... | Retrieves a thread pool that is backed by the appropriate framework implementation . |
38,704 | private void cleanup ( ) { StatsDataReference ref = null ; while ( ( ref = ( StatsDataReference ) statisticsReferenceQueue . poll ( ) ) != null ) { StatsData oldStats = null ; StatsData updatedStats = null ; do { oldStats = terminatedThreadStats . get ( ) ; updatedStats = aggregateStats ( oldStats , ref . statsData ) ;... | Poll the reference queue looking for statistics data associated with a thread that is no longer reachable . If one is found update the terminated thread statistics . |
38,705 | public Expectations goodAppExpectations ( String theUrl , String appClass ) throws Exception { Expectations expectations = new Expectations ( ) ; expectations . addExpectations ( CommonExpectations . successfullyReachedUrl ( theUrl ) ) ; expectations . addExpectation ( new ResponseFullExpectation ( MpJwtFatConstants . ... | Set good app check expectations - sets checks for good status code and for a message indicating what if any app class was invoked successfully |
38,706 | public Expectations badAppExpectations ( String errorMessage ) throws Exception { Expectations expectations = new Expectations ( ) ; expectations . addExpectation ( new ResponseStatusExpectation ( HttpServletResponse . SC_UNAUTHORIZED ) ) ; expectations . addExpectation ( new ResponseMessageExpectation ( MpJwtFatConsta... | Set bad app check expectations - sets checks for a 401 status code and the expected error message in the server s messages . log |
38,707 | public String buildAppUrl ( LibertyServer theServer , String root , String app ) throws Exception { return SecurityFatHttpUtils . getServerUrlBase ( theServer ) + root + "/rest/" + app + "/" + MpJwtFatConstants . MPJWT_GENERIC_APP_NAME ; } | Build the http app url |
38,708 | public String buildAppSecureUrl ( LibertyServer theServer , String root , String app ) throws Exception { return SecurityFatHttpUtils . getServerSecureUrlBase ( theServer ) + root + "/rest/" + app + "/" + MpJwtFatConstants . MPJWT_GENERIC_APP_NAME ; } | Build the https app url |
38,709 | public Expectations setBadIssuerExpectations ( LibertyServer server ) throws Exception { Expectations expectations = new Expectations ( ) ; expectations . addExpectation ( new ResponseStatusExpectation ( HttpServletResponse . SC_UNAUTHORIZED ) ) ; expectations . addExpectation ( new ServerMessageExpectation ( server , ... | Set expectations for tests that have bad issuers |
38,710 | private void parseAccessLog ( Map < String , Object > config ) { String filename = ( String ) config . get ( "access.filePath" ) ; if ( null == filename || 0 == filename . trim ( ) . length ( ) ) { return ; } try { this . ncsaLog = new AccessLogger ( filename . trim ( ) ) ; } catch ( Throwable t ) { FFDCFilter . proces... | Parse the access log related information from the config . |
38,711 | private void parseErrorLog ( Map < String , Object > config ) { String filename = ( String ) config . get ( "error.filePath" ) ; if ( null == filename || 0 == filename . trim ( ) . length ( ) ) { return ; } try { this . debugLog = new DebugLogger ( filename ) ; } catch ( Throwable t ) { FFDCFilter . processException ( ... | Parse the error log related information from the config . |
38,712 | public void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "stop" ) ; } if ( this . bRunning ) { this . bRunning = false ; this . ncsaLog . stop ( ) ; this . frcaLog . stop ( ) ; this . debugLog . stop ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc... | Stop this service . It can be restarted after this method call . |
38,713 | public void destroy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "destroy" ) ; } this . bRunning = false ; this . ncsaLog . disable ( ) ; this . frcaLog . disable ( ) ; this . debugLog . disable ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEn... | Final call when the service is being destroyed . The service cannot be restarted once this is used . |
38,714 | private int convertInt ( String input , int defaultValue ) { try { return Integer . parseInt ( input . trim ( ) ) ; } catch ( NumberFormatException nfe ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Malformed input: " + input ) ; } return defaultValue ; } } | Convert the input string to an int value . |
38,715 | public void findClients ( @ WithAnnotations ( { RegisterRestClient . class } ) ProcessAnnotatedType < ? > pat ) { Class < ? > restClient = pat . getAnnotatedType ( ) . getJavaClass ( ) ; if ( restClient . isInterface ( ) ) { restClientClasses . add ( restClient ) ; pat . veto ( ) ; } else { errors . add ( new IllegalAr... | Liberty change - removed static |
38,716 | protected void setOpen ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setOpen" ) ; closed = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setOpen" ) ; } | Marks this proxy object as being open . |
38,717 | public boolean isClosed ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isClosed" ) ; boolean retValue = false ; if ( connectionProxy == null ) { retValue = closed ; } else { retValue = closed || connectionProxy . isClosed ( ) ; } if ( TraceComponent . isAny... | This method identifies whether we are able to close this proxy object . If this object represents a session object then this can only be closed if we have not been closed and if the connection has not been closed . If it represents a connection then we can only close if we have not already been closed . |
38,718 | protected void setClosed ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setClosed" ) ; closed = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setClosed" ) ; } | Marks this proxy object as being closed . |
38,719 | public short getProxyID ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProxyID" ) ; if ( ! proxyIDSet ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "PROXY_ID_NOT_SET_SICO1052" , null , null ) ) ; FFDCFilter . processExceptio... | Returns the proxy s Id correspondoing to the real object on the server |
38,720 | protected ConnectionProxy getConnectionProxy ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConnectionProxy" ) ; if ( connectionProxy == null ) { SIErrorException e = new SIErrorException ( nls . getFormattedMessage ( "CONNECTION_PROXY_NOT_SET_SICO1053" ... | Returns a reference to the Connection Proxy |
38,721 | protected void setProxyID ( short s ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setProxyID" , "" + s ) ; proxyID = s ; proxyIDSet = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setProxyID" ) ... | Sets the ID corresponding to the real object on the server |
38,722 | public InputStream getAttachment ( final Asset asset , final Attachment attachment ) throws IOException , BadVersionException , RequestFailureException { final ZipFile repoZip = createZipFile ( ) ; if ( null == repoZip ) { return null ; } InputStream retInputStream = null ; String attachmentId = attachment . get_id ( )... | This gets an input stream to the specified attachment in the zip . |
38,723 | protected boolean hasChildren ( final String relative ) throws IOException { ZipFile zip = createZipFile ( ) ; if ( null == zip ) { return false ; } Enumeration < ? extends ZipEntry > entries = zip . entries ( ) ; while ( entries . hasMoreElements ( ) ) { ZipEntry entry = entries . nextElement ( ) ; if ( ( relative . e... | See if there are any assets under the specified directory in the zip |
38,724 | protected Collection < String > getChildren ( final String relative ) throws IOException { ZipFile zip = createZipFile ( ) ; if ( null == zip ) { return Collections . emptyList ( ) ; } Collection < String > children = new ArrayList < String > ( ) ; Enumeration < ? extends ZipEntry > entries = zip . entries ( ) ; while ... | Gets the entries under the specified directory in the zip file . This currently gets all entries in all sub directories too but does not return other directories as I think this will be more efficient than trying to recursively go through sub directories and we only call this method when we want all entries under the s... |
38,725 | protected long getSize ( final String relative ) { ZipEntry entry = createFromRelative ( relative ) ; return ( entry == null ? 0 : entry . getSize ( ) ) ; } | Gets the uncompressed size of the file specified will return 0 if the entry was not found |
38,726 | final JMFNativePart getEncodingMessage ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . entry ( this , tc , "getEncodingMessage" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) JmfTr . exit ( this , tc , "getEncodingMessage" , encoding ) ; return en... | Return the underlying encoding |
38,727 | public static String getRuntimeProperty ( String property , String defaultValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRuntimeProperty" , new Object [ ] { property , defaultValue } ) ; String runtimeProp = RuntimeInfo . getPropertyWithMsg ( property , def... | This method will get a runtime property from the sib . properties file . |
38,728 | public static boolean getRuntimeBooleanProperty ( String property , String defaultValue ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getRuntimeBooleanProperty" , new Object [ ] { property , defaultValue } ) ; boolean runtimeProp = Boolean . valueOf ( RuntimeInfo .... | This method will get a runtime property from the sib . properties file as a boolean . |
38,729 | public static void checkFapLevel ( HandshakeProperties handShakeProps , short fapLevel ) throws SIIncorrectCallException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkFapLevel" , "" + fapLevel ) ; short actualFapVersion = handShakeProps . getFapLevel ( ) ; if ( ... | This method is used on API calls when checking to see if the call is supported for the current FAP level . Before making a call in a method that is only supported in a particular FAP version call this method passing in the lowest FAP version this method is supported in . If the current negotiated FAP version is lower t... |
38,730 | public static boolean isRecoverable ( final SIBusMessage mess , final Reliability maxUnrecoverableReliability ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "isRecoverable" , new Object [ ] { mess , maxUnrecoverableReliability } ) ; final Reliability messageReliabili... | Determines whether a message is recoverable compared to the supplied maxUnrecoverableReliability . |
38,731 | protected ThirdPartyAlpnNegotiator tryToRegisterAlpnNegotiator ( SSLEngine engine , SSLConnectionLink link , boolean useAlpn ) { if ( isNativeAlpnActive ( ) ) { if ( useAlpn ) { registerNativeAlpn ( engine ) ; } } else if ( isIbmAlpnActive ( ) ) { registerIbmAlpn ( engine , useAlpn ) ; } else if ( this . isJettyAlpnAct... | Check for the Java 9 ALPN API IBM s ALPNJSSEExt jetty - alpn and grizzly - npn ; if any are present set up the connection for ALPN . Order of preference is Java 9 ALPN API IBM s ALPNJSSEExt jetty - alpn then grizzly - npn . |
38,732 | protected void tryToRemoveAlpnNegotiator ( ThirdPartyAlpnNegotiator negotiator , SSLEngine engine , SSLConnectionLink link ) { if ( negotiator == null && isNativeAlpnActive ( ) ) { getNativeAlpnChoice ( engine , link ) ; } else if ( negotiator == null && isIbmAlpnActive ( ) ) { getAndRemoveIbmAlpnChoice ( engine , link... | If ALPN is active try to remove the ThirdPartyAlpnNegotiator from the map of active negotiators |
38,733 | protected void getAndRemoveIbmAlpnChoice ( SSLEngine engine , SSLConnectionLink link ) { if ( this . isIbmAlpnActive ( ) ) { try { String [ ] alpnResult = ( String [ ] ) ibmAlpnGet . invoke ( null , engine ) ; ibmAlpnDelete . invoke ( null , engine ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnable... | Ask the JSSE ALPN provider for the protocol selected for the given SSLEngine then delete the engine from the ALPN provider s map . If the selected protocol was h2 set that as the protocol to use on the given link . |
38,734 | protected GrizzlyAlpnNegotiator registerGrizzlyAlpn ( SSLEngine engine , SSLConnectionLink link ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "registerGrizzlyAlpn entry " + engine ) ; } if ( grizzlyNegotiationSupport != null && grizzlyAlpnClientNegotiator != null && ... | Using grizzly - npn set up a new GrizzlyAlpnNegotiator to handle ALPN for a given SSLEngine and link |
38,735 | protected JettyServerNegotiator registerJettyAlpn ( final SSLEngine engine , SSLConnectionLink link ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "registerJettyAlpn entry " + engine ) ; } try { JettyServerNegotiator negotiator = new JettyServerNegotiator ( engine , l... | Using jetty - alpn set up a new JettyServerNotiator to handle ALPN for a given SSLEngine and link |
38,736 | public void addCase ( JMFType theCase ) { if ( theCase == null ) throw new NullPointerException ( "Variant case cannot be null" ) ; JSType newCase = ( JSType ) theCase ; if ( cases == null ) cases = new JSType [ 1 ] ; else { JSType [ ] oldCases = cases ; cases = new JSType [ oldCases . length + 1 ] ; System . arraycopy... | Add a case to the variant . Note that every variant must have at least one case . |
38,737 | BigInteger setMultiChoiceCount ( ) { if ( boxed == null ) { multiChoiceCount = BigInteger . ZERO ; for ( int i = 0 ; i < cases . length ; i ++ ) multiChoiceCount = multiChoiceCount . add ( cases [ i ] . setMultiChoiceCount ( ) ) ; } return multiChoiceCount ; } | otherwise it s the sum of the multiChoice counts for the cases . |
38,738 | public JSVariant [ ] getDominatedVariants ( int i ) { if ( dominated == null ) dominated = new JSVariant [ cases . length ] [ ] ; if ( dominated [ i ] == null ) { JSType acase = cases [ i ] ; if ( acase instanceof JSVariant ) dominated [ i ] = new JSVariant [ ] { ( JSVariant ) acase } ; else if ( acase instanceof JSTup... | Get the unboxed variants dominated by a case of this variant |
38,739 | JSchema box ( Map context ) { if ( boxed != null ) return boxed ; JSVariant subTop = new JSVariant ( ) ; subTop . cases = cases ; subTop . boxedBy = this ; boxed = ( JSchema ) context . get ( subTop ) ; if ( boxed == null ) { boxed = new JSchema ( subTop , context ) ; for ( int i = 0 ; i < cases . length ; i ++ ) cases... | includes a cyclic reference to a JSchema already under construction . |
38,740 | public int getBoxAccessor ( JMFSchema schema ) { for ( Accessor acc = boxAccessor ; acc != null ; acc = acc . next ) if ( schema == acc . schema ) return acc . accessor ; return - 1 ; } | Implement the general form of getBoxAccessor |
38,741 | public void setPrimaryRolePlayer ( com . ibm . wsspi . security . wim . model . RolePlayer value ) { this . primaryRolePlayer = value ; } | Sets the value of the primaryRolePlayer property . |
38,742 | public List < com . ibm . wsspi . security . wim . model . RolePlayer > getRelatedRolePlayer ( ) { if ( relatedRolePlayer == null ) { relatedRolePlayer = new ArrayList < com . ibm . wsspi . security . wim . model . RolePlayer > ( ) ; } return this . relatedRolePlayer ; } | Gets the value of the relatedRolePlayer property . |
38,743 | void stop ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Stopping the HPEL managed service" ) ; } this . configRef . unregister ( ) ; } | Stop this service and free any allocated resources when the owning bundle is being stopped . |
38,744 | private static void reconcile ( JSType top , List defs , Map refs ) { List unres = ( List ) refs . get ( top . getFeatureName ( ) ) ; if ( unres != null ) for ( Iterator iter = unres . iterator ( ) ; iter . hasNext ( ) ; ) ( ( JSDynamic ) iter . next ( ) ) . setExpectedType ( top ) ; for ( Iterator iter = defs . iterat... | Subroutine to resolve dangling expected references |
38,745 | private static void addRef ( Map refs , String key , JSDynamic unres ) { List thisKey = ( List ) refs . get ( key ) ; if ( thisKey == null ) { thisKey = new ArrayList ( ) ; refs . put ( key , thisKey ) ; } thisKey . add ( unres ) ; } | Subroutine to enter a dangling expected reference in the refs map |
38,746 | private RepositoryResource getNewerResource ( RepositoryResource res1 , RepositoryResource res2 ) throws RepositoryResourceValidationException { RepositoryResource singleNonBetaResource = returnNonBetaResourceOrNull ( res1 , res2 ) ; if ( singleNonBetaResource != null ) { return singleNonBetaResource ; } if ( res1 . ge... | Return the higher version of the resource or the first one if this cannot be determined . For Products this is based off the ProductVersion and for everything else it is based of the appliesTo information . |
38,747 | private RepositoryResource compareNonProductResourceAppliesTo ( RepositoryResource res1 , RepositoryResource res2 ) { String res1AppliesTo = ( ( ApplicableToProduct ) res1 ) . getAppliesTo ( ) ; String res2AppliesTo = ( ( ApplicableToProduct ) res2 ) . getAppliesTo ( ) ; if ( res1AppliesTo == null && res2AppliesTo == n... | This routine handles non product resources |
38,748 | private RepositoryResource getNonProductResourceWithHigherVersion ( RepositoryResource res1 , RepositoryResource res2 ) { if ( res1 . getVersion ( ) == null || res2 . getVersion ( ) == null ) { return res1 ; } Version4Digit res1Version = null ; Version4Digit res2Version = null ; try { res1Version = new Version4Digit ( ... | Return the resource with the highest version for when the appliesTo versions are equal |
38,749 | private MinAndMaxVersion getMinAndMaxAppliesToVersionFromAppliesTo ( String appliesTo ) { List < AppliesToFilterInfo > res1Filters = AppliesToProcessor . parseAppliesToHeader ( appliesTo ) ; Version4Digit highestVersion = null ; Version4Digit lowestVersion = null ; for ( AppliesToFilterInfo f : res1Filters ) { Version4... | Parse an appliesTo to get the lowest and highest version that this asset applies to and return an object describing this . |
38,750 | public boolean rarFileExists ( ) { final File zipFile = new File ( rarFilePath ) ; return AccessController . doPrivileged ( new PrivilegedAction < Boolean > ( ) { public Boolean run ( ) { return zipFile . exists ( ) ; } } ) ; } | Check that resource adapter path exists |
38,751 | public ClassLoader getClassLoader ( ) throws UnableToAdaptException , MalformedURLException { lock . readLock ( ) . lock ( ) ; try { if ( classloader != null ) return classloader ; } finally { lock . readLock ( ) . unlock ( ) ; } if ( ! rarFileExists ( ) ) return null ; lock . writeLock ( ) . lock ( ) ; try { if ( clas... | Returns the class loader for the resource adapter . |
38,752 | private ProtectionDomain getProtectionDomain ( Container rarContainer ) throws UnableToAdaptException , MalformedURLException { PermissionCollection perms = new Permissions ( ) ; CodeSource codeSource ; try { String loc = rarFilePath ; codeSource = new CodeSource ( new URL ( "file://" + ( loc . startsWith ( "/" ) ? "" ... | Create a protection domain for the given RA that includes the effective server java security permissions as well as those defined in the RA s permissions . xml . |
38,753 | private boolean deleteBundleCacheDir ( File path ) { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( FileUtils . fileExists ( path ) ) { if ( trace && tc . isDebugEnabled ( ) ) { Tr . debug ( this , tc , "Path specified exists: " + path . getPath ( ) ) ; } } else { if ( trace && tc . isDebugEnable... | Deletes the directory and its contents or the file that is specified |
38,754 | public boolean addTransformer ( final ClassFileTransformer cft ) { boolean added = false ; for ( ClassLoader loader : followOnClassLoaders ) { if ( loader instanceof SpringLoader ) { added |= ( ( SpringLoader ) loader ) . addTransformer ( cft ) ; } } return added ; } | Spring to register the given ClassFileTransformer on this ClassLoader |
38,755 | public ClassLoader getThrowawayClassLoader ( ) { ClassLoader newParent = getThrowawayVersion ( getParent ( ) ) ; ClassLoader [ ] newFollowOns = new ClassLoader [ followOnClassLoaders . size ( ) ] ; for ( int i = 0 ; i < newFollowOns . length ; i ++ ) { newFollowOns [ i ] = getThrowawayVersion ( followOnClassLoaders . g... | Special method used by Spring to obtain a throwaway class loader for this ClassLoader |
38,756 | public void throwing ( Level level , String sourceClass , String sourceMethod , Throwable thrown ) { logp ( level , sourceClass , sourceMethod , null , thrown ) ; } | Log throwing an exception . |
38,757 | public Dispatchable addDispatchableForLocalTransaction ( int clientTransactionId ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addDispatchableForLocalTransaction" , "" + clientTransactionId ) ; if ( idToFirstLevelEntryMap . containsKey ( clientTransactionId ) ) { final SIErrorException exception = new... | Adds a dispatchable for use with a specific local transaction . Typically this is done by the done by the TCP channel thread when it determines it is about to pass the transmission relating to the start of a local transaction to the receive listener dispatcher . |
38,758 | public Dispatchable addEnlistedDispatchableForGlobalTransaction ( int clientXAResourceId , XidProxy xid ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addEnlistedDispatchableForGlobalTransaction" , new Object [ ] { "" + clientXAResourceId } ) ; AbstractFirstLevelMapEntry firstLevelEntry = null ; if ( i... | Adds a dispatchable for use with a specific SIXAResource which is currently enlisted in a global transaction . Typically this is done by the TCP channel thread when it determines that it is about to pass the transmission relating to the XA_START of enlistment into a global transaction to the receive listener dispatcher... |
38,759 | public Dispatchable getDispatchable ( int clientId ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getDispatchable" , "" + clientId ) ; AbstractFirstLevelMapEntry firstLevelEntry = null ; if ( idToFirstLevelEntryMap . containsKey ( clientId ) ) { firstLevelEntry = ( AbstractFirstLevelMapEntry ) idToFirs... | Obtains a dispatchable for the specified client side transaction ID . The dispatchable returned will either correspond to an in - flight local transaction or an inflight enlisted SIXAResource . If there is no corresponding dispatchable in the table the a value of null is returned . |
38,760 | public Dispatchable removeDispatchableForLocalTransaction ( int clientId ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeDispatchableForLocalTransaction" , "" + clientId ) ; AbstractFirstLevelMapEntry firstLevelEntry = null ; if ( idToFirstLevelEntryMap . containsKey ( clientId ) ) { firstLevelEnt... | Removes from the table the dispatchable corresponding to a local transaction . |
38,761 | public void removeAllDispatchablesForTransaction ( int clientId ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeAllDispatchablesForTransaction" , clientId ) ; idToFirstLevelEntryMap . remove ( clientId ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "removeAllDispatchablesForTransact... | In the event that the connection is going down we need to ensure that the dispatchable table is cleared of all references to transactions that were created by that connection . |
38,762 | public Dispatchable addDispatchableForOptimizedLocalTransaction ( int transactionId ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addDispatchableForOptimizedLocalTransaction" , "" + transactionId ) ; final Dispatchable result = addDispatchableForLocalTransaction ( transactionId ) ; if ( tc . isEntryEn... | Adds a new dispatchable to the map for an optimized local transaction . |
38,763 | public int getTotalDispatchables ( ) { int count = 0 ; Iterator i = idToFirstLevelEntryMap . iterator ( ) ; while ( i . hasNext ( ) ) ++ count ; return count ; } | For unit test use only! |
38,764 | @ SuppressWarnings ( "unchecked" ) protected < T extends RepositoryResourceImpl > T createNewResource ( ) { T result ; if ( null == getType ( ) ) { result = ( T ) createTestResource ( getRepositoryConnection ( ) ) ; } else { result = ResourceFactory . getInstance ( ) . createResource ( getType ( ) , getRepositoryConnec... | Creates a new resource using the same logon infomation as this resource |
38,765 | public MatchResult matches ( ProductDefinition def ) { Collection < AppliesToFilterInfo > atfiList = _asset . getWlpInformation ( ) . getAppliesToFilterInfo ( ) ; if ( atfiList == null || atfiList . isEmpty ( ) ) { return MatchResult . NOT_APPLICABLE ; } MatchResult matchResult = MatchResult . MATCHED ; for ( AppliesTo... | Check if this resources matches the supplied product definition |
38,766 | private synchronized void readAttachmentsFromAsset ( Asset ass ) { Collection < Attachment > attachments = ass . getAttachments ( ) ; _attachments = new HashMap < String , AttachmentResourceImpl > ( ) ; if ( attachments != null ) { for ( Attachment at : attachments ) { _attachments . put ( at . getName ( ) , new Attach... | Read the attachments from the supplied asset and create an AttachmentResource to represent them and then store them in our AttachmentResource list |
38,767 | public UpdateType updateRequired ( RepositoryResourceImpl matching ) { if ( null == matching ) { return UpdateType . ADD ; } if ( equivalentWithoutAttachments ( matching ) ) { return UpdateType . NOTHING ; } else { _asset . set_id ( matching . getId ( ) ) ; return UpdateType . UPDATE ; } } | Decide whether an attachment needs updating . |
38,768 | public RepositoryResourceMatchingData createMatchingData ( ) { RepositoryResourceMatchingData matchingData = new RepositoryResourceMatchingData ( ) ; matchingData . setName ( getName ( ) ) ; matchingData . setProviderName ( getProviderName ( ) ) ; matchingData . setType ( getType ( ) ) ; return matchingData ; } | Creates an object which can be used to compare with another resource s to determine if they represent the same asset . |
38,769 | public List < RepositoryResourceImpl > findMatchingResource ( ) throws RepositoryResourceValidationException , RepositoryBackendException , RepositoryBadDataException , RepositoryResourceNoConnectionException { List < RepositoryResourceImpl > matchingRes ; try { matchingRes = performMatching ( ) ; if ( matchingRes != n... | This method tries to find out if there is a match for this resource already in massive . |
38,770 | protected void copyFieldsFrom ( RepositoryResourceImpl fromResource , boolean includeAttachmentInfo ) { setName ( fromResource . getName ( ) ) ; setDescription ( fromResource . getDescription ( ) ) ; setShortDescription ( fromResource . getShortDescription ( ) ) ; setProviderName ( fromResource . getProviderName ( ) ) ... | Resources should override this method to copy fields that should be used as part of an update |
38,771 | public void overWriteAssetData ( RepositoryResourceImpl fromResource , boolean includeAttachmentInfo ) throws RepositoryResourceValidationException { if ( ! fromResource . getClass ( ) . getName ( ) . equals ( getClass ( ) . getName ( ) ) ) { throw new RepositoryResourceValidationException ( "Expected class of type " +... | This method copies the fields from this that we care about to the fromResource . Then we set our asset to point to the one in fromResource . In effect this means we get all the details from the fromResource and override fields we care about and store the merged result in our asset . |
38,772 | public void moveToState ( State state ) throws RepositoryBackendException , RepositoryResourceException { if ( getState ( ) == null ) { return ; } int counter = 0 ; while ( getState ( ) != state ) { counter ++ ; StateAction nextAction = getState ( ) . getNextAction ( state ) ; performLifeCycle ( nextAction ) ; if ( cou... | Moves the resource to the desired state |
38,773 | public boolean equivalent ( Object obj ) { if ( this == obj ) return true ; if ( obj == null ) return false ; if ( getClass ( ) != obj . getClass ( ) ) return false ; RepositoryResourceImpl other = ( RepositoryResourceImpl ) obj ; if ( _asset == null ) { if ( other . _asset != null ) return false ; } else if ( ! _asset... | Checks if the two resources are equivalent by checking if the assets are equivalent . |
38,774 | private static long getCRC ( InputStream is ) throws IOException { CheckedInputStream check = new CheckedInputStream ( is , new CRC32 ( ) ) ; BufferedInputStream in = new BufferedInputStream ( check ) ; while ( in . read ( ) != - 1 ) { } long crc = check . getChecksum ( ) . getValue ( ) ; return crc ; } | Get the CRC of a file from an InputStream |
38,775 | public boolean record ( String holderName , String heldName ) { return i_record ( internHolder ( holderName , Util_InternMap . DO_FORCE ) , internHeld ( heldName , Util_InternMap . DO_FORCE ) ) ; } | Or rely on the caller to know to make no store calls? |
38,776 | private static TraceComponent getTc ( ) { if ( tc == null ) { tc = Tr . register ( FileLogHolder . class , null , "com.ibm.ws.logging.internal.resources.LoggingMessages" ) ; } return tc ; } | This method will get an instance of TraceComponent |
38,777 | private PrintStream getPrimaryStream ( boolean showError ) { File primaryFile = getPrimaryFile ( ) ; setStreamFromFile ( primaryFile , false , primaryFile . length ( ) , showError ) ; return currentPrintStream ; } | This assume that the primary file exists . |
38,778 | public ManagedServiceFactory addingService ( ServiceReference < ManagedServiceFactory > reference ) { String [ ] factoryPids = getServicePid ( reference ) ; if ( factoryPids == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "handleRegistration(): Invalid service.... | Processes registered ManagedServiceFactory and updates each with their own configuration properties . |
38,779 | public void removedService ( ServiceReference < ManagedServiceFactory > reference , ManagedServiceFactory service ) { String [ ] factoryPids = getServicePid ( reference ) ; if ( factoryPids == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "removedService(): Inva... | MangedServiceFactory service removed . Process removal and unget service from its context . |
38,780 | private Container getContainerRootParent ( Container base ) { Container puBase = base . getEnclosingContainer ( ) ; while ( puBase != null && ! puBase . isRoot ( ) ) { puBase = puBase . getEnclosingContainer ( ) ; } if ( puBase != null && puBase . isRoot ( ) ) { Container parent = puBase . getEnclosingContainer ( ) ; i... | Navigates to the root of the base container and returns the parent container |
38,781 | protected boolean isAutocompleteOff ( FacesContext facesContext , UIComponent component ) { if ( component instanceof HtmlInputText ) { String autocomplete = ( ( HtmlInputText ) component ) . getAutocomplete ( ) ; if ( autocomplete != null ) { return autocomplete . equals ( AUTOCOMPLETE_VALUE_OFF ) ; } } return false ;... | If autocomplete is on or not set do not render it |
38,782 | private MasterEntry updateLpMaps ( LWMConfig lp ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "updateLpMaps" , lp ) ; } SIBLocalizationPoint lpConfig = ( ( SIBLocalizationPoint ) lp ) ; String lpName = lpConfig . getIdentifier ( ) ; if ( lpMap . containsKey ( lpNa... | Update the given SIBLocalizationPoint in the internal data structures lpMap |
38,783 | public boolean addLocalizationPoint ( LWMConfig lp , DestinationDefinition dd ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "addLocalizationPoint" , lp ) ; } boolean valid = false ; LocalizationDefinition ld = ( ( JsAdminFactoryImpl ) jsaf ) . createLocalizationDe... | Add a single localization point to this JsLocalizer object and tell MP about it . This method is used by dynamic config in tWAS . |
38,784 | private boolean isNewDestination ( String key ) { Object dd = null ; try { dd = _me . getSIBDestinationByUuid ( _me . getBusName ( ) , key , false ) ; } catch ( Exception e ) { } return ( dd == null ) ; } | Check the old destination cache if the destination is not found then it has just been created . This method assumes that the destination is in the new cache - this is not checked . |
38,785 | public void alterLocalizationPoint ( BaseDestination destination , LWMConfig lp ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "alterLocalizationPoint" , lp ) ; } boolean valid = true ; DestinationDefinition dd = null ; DestinationAliasDefinition d... | Modify the given localization point and tell MP . The parameter is a new SIBLocalizationPoint which will replace the existing object inside of this . This method is used by dynamic config . |
38,786 | private String getMasterMapKey ( LWMConfig lp ) { String key = null ; String lpIdentifier = ( ( SIBLocalizationPoint ) lp ) . getIdentifier ( ) ; key = lpIdentifier . substring ( 0 , lpIdentifier . indexOf ( "@" ) ) ; return key ; } | Returns the name of the destination associated with the supplied localization point . |
38,787 | private void deleteDestLocalizations ( JsBus bus ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "deleteDestLocalizations" , this ) ; } Iterator i = alterDestinations . iterator ( ) ; while ( i . hasNext ( ) ) { String key = ( String ) i . next ( ) ; try { Destinati... | Tell MP about all deleted LPs that previously existed on locations which have also been deleted . |
38,788 | static File getLogDirectory ( Object newValue , File defaultDirectory ) { File newDirectory = defaultDirectory ; if ( newValue != null && newValue instanceof String ) { newDirectory = new File ( ( String ) newValue ) ; } if ( newDirectory == null ) { String value = "." ; try { value = AccessController . doPrivileged ( ... | Find create and validate the log directory . |
38,789 | public static String getStringValue ( Object newValue , String defaultValue ) { if ( newValue == null ) return defaultValue ; return ( String ) newValue ; } | If the value is null return the defaultValue . Otherwise return the new value . |
38,790 | public static TraceFormat getFormatValue ( Object newValue , TraceFormat defaultValue ) { if ( newValue != null && newValue instanceof String ) { String strValue = ( ( String ) newValue ) . toUpperCase ( ) ; try { return TraceFormat . valueOf ( strValue ) ; } catch ( Exception e ) { } } return defaultValue ; } | Convert the property value to a TraceFormat type |
38,791 | public static String getStringFromCollection ( Collection < String > values ) { StringBuilder builder = new StringBuilder ( ) ; if ( values != null ) { for ( String value : values ) { builder . append ( value ) . append ( ',' ) ; } if ( builder . charAt ( builder . length ( ) - 1 ) == ',' ) builder . deleteCharAt ( bui... | Convert a collection of String values back into a comma separated list |
38,792 | private Number readNumber ( ) throws IOException { StringBuffer sb = new StringBuffer ( ) ; int l = lineNo ; int c = colNo ; while ( isDigitChar ( lastChar ) ) { sb . append ( ( char ) lastChar ) ; readChar ( ) ; } String string = sb . toString ( ) ; try { if ( - 1 != string . indexOf ( '.' ) ) { return Double . valueO... | Method to read a number from the JSON string . |
38,793 | private String readIdentifier ( ) throws IOException { StringBuffer sb = new StringBuffer ( ) ; while ( ( - 1 != lastChar ) && Character . isLetter ( ( char ) lastChar ) ) { sb . append ( ( char ) lastChar ) ; readChar ( ) ; } return sb . toString ( ) ; } | Method to read a partular character string . only really need to handle null true and false |
38,794 | public static AuthenticationData createAuthenticationData ( String userName , UserRegistry userRegistry ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "createAuthenticationData" , userName ) ; } AuthenticationData authData = new WSAuthenticationData ( ... | Create the AuthenticationData from the UserName |
38,795 | public static AuthenticationData createAuthenticationData ( byte [ ] token ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "createAuthenticationData" , token ) ; } AuthenticationData authData = new WSAuthenticationData ( ) ; authData . set ( Authenticat... | Create AuthenticationData object from the Token passed |
38,796 | public static AuthenticationData createAuthenticationData ( String userName , String password ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "createAuthenticationData" , new Object [ ] { userName , "Password Not Traced" } ) ; } AuthenticationData authD... | Create AuthenticationData Object from the UserName and Password passed |
38,797 | public static AuthenticationData createAuthenticationData ( Certificate [ ] certs , UserRegistry userRegistry ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "createAuthenticationData" , certs ) ; } AuthenticationData authData = new WSAuthenticationData... | Create AuthenticationData object from the Certificate |
38,798 | private static String getDefaultRealm ( UserRegistry _userRegistry ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "getDefaultRealm" ) ; } String realm = DEFAULT_REALM ; if ( _userRegistry != null ) { realm = _userRegistry . getRealm ( ) ; } if ( TraceC... | Get the Default Realm |
38,799 | public static String getUniqueUserName ( Subject subject ) throws MessagingSecurityException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "getUniqueUserName" , subject ) ; } if ( subject == null ) { return null ; } WSCredential cred = subjectHelper . g... | This method returns the unique name of the user that was being authenticated . This is a best can do process and a user name may not be available in which case null should be returned . This method should not return an empty string . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.