idx
int64
0
41.2k
question
stringlengths
83
4.15k
target
stringlengths
5
715
41,100
void cleanupBoxedCache ( int boxedAccessor ) { for ( int i = 0 ; i < boxedCache . length ; i ++ ) if ( boxed [ i ] [ 0 ] == boxedAccessor ) boxedCache [ i ] = null ; }
Remove entries from the boxedCache after removing the entry from the main cache that they depend upon .
41,101
private JSON getJSON ( ) throws JSONMarshallException { if ( json == null ) { JSONSettings settings = new JSONSettings ( Include . NON_NULL ) ; json = JSONFactory . newInstance ( settings ) ; } return json ; }
Utility that returns a JSON object from a factory
41,102
public void setSubscriptionIDFilter ( String subscriptionId ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setSubscriptionIDFilter" , subscriptionId ) ; this . _subscriptionId = subscriptionId ; this . _destination = null ; this . _consumerDispatcherState = null ; if ( tc . isEntryEnabled ( ) ) SibTr . exit (...
setter to create a filter based on subscriptionId
41,103
public void setDestinationFilter ( SIBUuid12 destination ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDestinationFilter" , destination ) ; this . _destination = destination ; this . _subscriptionId = null ; this . _consumerDispatcherState = null ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "setDe...
setter to create a filter based on destination name
41,104
public void setConsumerDispatcherStateFilter ( ConsumerDispatcherState consumerDispatcherState ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setConsumerDispatcherStateFilter" , consumerDispatcherState ) ; this . _consumerDispatcherState = consumerDispatcherState ; this . _subscriptionId = null ; this . _dest...
setter to create a filter based on a specific consumer dispatcher state object
41,105
public boolean filterMatches ( AbstractItem item ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "filterMatches" , item ) ; ConsumerDispatcherState subState = null ; if ( item instanceof DurableSubscriptionItemStream ) { try { subState = ( ( DurableSubscriptionItemStream ) item ) . getConsumerDispatcherState ( ...
Callback method from messagestore
41,106
public boolean matchesToMicros ( LibertyVersion other ) { if ( other == null ) { return true ; } return this . major == other . major && this . minor == other . minor && this . micro == other . micro ; }
Matches the major minor and micro parts of this version to the other version
41,107
public void putCustomizedProperty ( String key , Object obj ) { if ( key == null || obj == null ) return ; customizedProperties . put ( key , obj ) ; }
put anything here such as J2EEName
41,108
PartialMatch newPartialMatch ( char [ ] key , PartialMatch pm ) { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "newPartialMatch" , "key: " + new String ( key ) + ", pm:" + pm ) ; PartialMatch ans = new PartialMatch ( key , pm , owner ) ; if ( tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "newPart...
An overrideable wrapper for the internal constructor
41,109
void put ( PatternWrapper pattern , Conjunction selector , MatchTarget object , InternTable subExpr ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "put" , new Object [ ] { pattern , selector , object , subExpr } ) ; switch ( pattern . getState ( ) ) { case PatternWrapper . FINA...
Put a new Pattern or part thereof into this PartialMatch or its down - chain peers
41,110
void remove ( PatternWrapper pattern , Conjunction selector , MatchTarget object , InternTable subExpr , OrdinalPosition parentId ) throws MatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "remove" , new Object [ ] { pattern , selector , object , subExpr } ) ; switch ( pattern . getState (...
Remove a Pattern or part thereof from this PartialMatch or its down - chain peers
41,111
void get ( char [ ] chars , int start , int length , boolean invert , MatchSpaceKey msg , EvalCache cache , Object contextValue , SearchResults result ) throws MatchingException , BadMessageFormatMatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "get" , new Object [ ] { chars , new Integer...
Perform get operation on this PartialMatch and its descendents
41,112
void doPartialGet ( char [ ] chars , int start , int length , boolean invert , MatchSpaceKey msg , EvalCache cache , Object contextValue , SearchResults result ) throws MatchingException , BadMessageFormatMatchingException { if ( tc . isEntryEnabled ( ) ) tc . entry ( this , cclass , "doPartialGet" , new Object [ ] { c...
Take action when a portion of a String matches this PartialMatch but is not exhausted by it
41,113
private MatchManyWrapper findMatchManyWrapper ( PatternWrapper pattern ) { MatchManyWrapper wrapper = null ; if ( matchManyChildren != null ) { Iterator iter = matchManyChildren . iterator ( ) ; while ( iter . hasNext ( ) ) { MatchManyWrapper nextElement = ( MatchManyWrapper ) iter . next ( ) ; PatternWrapper nextPatte...
Locates a wrapped pattern + matcher pair where we ve been give a pattern .
41,114
public Principal getCallerPrincipal ( ) { synchronized ( this ) { if ( ( state == PRE_CREATE ) || ( state == CREATING ) || ( ! allowRollbackOnly ) ) throw new IllegalStateException ( ) ; } return super . getCallerPrincipal ( ) ; }
getCallerPrincipal is invalid if called within the setSessionContext method
41,115
public MQLinkHandler getMQLinkHandler ( ) { if ( tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getMQLinkHandler" ) ; SibTr . exit ( tc , "getMQLinkHandler" , _mqLinkHandler ) ; } return _mqLinkHandler ; }
Returns the MQLinkHandler .
41,116
public void markAsToBeDeleted ( Transaction transaction ) throws SIResourceException { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "markAsToBeDeleted" , transaction ) ; toBeDeleted = Boolean . TRUE ; try { requestUpdate ( transaction ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , ...
Mark this itemstream as awaiting deletion and harden the indicator
41,117
public NavigationCase getNavigationCase ( FacesContext facesContext , String fromAction , String outcome ) { NavigationContext navigationContext = new NavigationContext ( ) ; try { return getNavigationCommand ( facesContext , navigationContext , fromAction , outcome , null ) ; } finally { navigationContext . finish ( f...
Returns the navigation case that applies for the given action and outcome
41,118
private NavigationCase createNavigationCase ( String fromViewId , String outcome , String toViewId ) { return new NavigationCase ( fromViewId , null , outcome , null , toViewId , null , false , false ) ; }
Derive a NavigationCase from a flow node .
41,119
public String getViewId ( FacesContext context , String fromAction , String outcome ) { return this . getNavigationCase ( context , fromAction , outcome ) . getToViewId ( context ) ; }
Returns the view ID that would be created for the given action and outcome
41,120
@ FFDCIgnore ( { NumberFormatException . class , IllegalArgumentException . class , ParseException . class } ) private long handleRetry ( String retryValue ) { if ( ! ( retryValue . contains ( ":" ) ) ) { try { Long retryLong = Long . valueOf ( retryValue ) ; return TimeUnit . MILLISECONDS . convert ( retryLong . longV...
return the milliseconds to delay before reconnecting ; - 1 means don t reconnect
41,121
public static final void WASInstallDirectory ( String WASInstallDirectory ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "WASInstallDirectory" , WASInstallDirectory ) ; _WASInstallDirectory = WASInstallDirectory ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "WASInstallDirectory" ) ; }
Sets the WAS install directory .
41,122
public static final void cellName ( String name ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "cellName" , name ) ; _cellName = name ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "cellName" ) ; }
Sets the name of the cell in which the current server resides
41,123
public static final void clusterName ( String name ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "clusterName" , name ) ; _clusterName = name ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "clusterName" ) ; }
Sets the name of the cluster in which the current server resides
41,124
public static final void nodeName ( String name ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "nodeName" , name ) ; _nodeName = name ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "nodeName" ) ; }
Sets the name of the node in which the current server resides
41,125
public static final void serverName ( String name ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "serverName" , name ) ; _serverName = name ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "serverName" ) ; }
Sets the name of the current WAS server
41,126
public static final void serverShortName ( String name ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "serverShortName" , name ) ; _serverShortName = name ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "serverShortName" ) ; }
Sets the short name of the current WAS server
41,127
public static final void uuid ( String uuid ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "uuid" , uuid ) ; _uuid = uuid ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "uuid" ) ; }
Sets the UUID of the current WAS server
41,128
public static final String fqServerName ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "fqServerName" ) ; String fqServerName = _serverName ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "fqServerName" , fqServerName ) ; return fqServerName ; }
Gets the fully qualified name of the current WAS server
41,129
public static final void HAEnabled ( boolean HAEnabled ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "HAEnabled" , new Boolean ( HAEnabled ) ) ; _HAEnabled = HAEnabled ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "HAEnabled" ) ; }
Sets the HAEnabled flag
41,130
public static final void localFailureScope ( FailureScope localFailureScope ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "localFailureScope" , localFailureScope ) ; _localFailureScope = localFailureScope ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "localFailureScope" ) ; }
Sets the local FailureScope reference .
41,131
public static final boolean isZOS ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isZOS" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isZOS" , new Boolean ( _isZOS ) ) ; return _isZOS ; }
Gets the isZOS flag .
41,132
public static final void useFileLocking ( boolean useFileLocking ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "useFileLocking" , new Boolean ( useFileLocking ) ) ; _useFileLocking = useFileLocking ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "useFileLocking" ) ; }
Sets the useFileLocking flag .
41,133
private void registerDefaultDelegationProvider ( ComponentContext cc ) { defaultDelegationProvider = new DefaultDelegationProvider ( ) ; defaultDelegationProvider . setSecurityService ( securityServiceRef . getService ( ) ) ; defaultDelegationProvider . setIdentityStoreHandlerService ( identityStoreHandlerServiceRef ) ...
Register the webcontainer s default delegation provider .
41,134
private Map < String , RoleSet > updateMapForSpecialSubject ( String appName , Map < String , RoleSet > specialSubjectToRolesMap , String specialSubjectName ) { RoleSet computedRoles = RoleSet . EMPTY_ROLESET ; Set < String > rolesForSubject = new HashSet < String > ( ) ; for ( SecurityRole role : resourceToAuthzInfoMa...
Parse the security - role entries to look for the specified special subject and update the subject - to - roles mapping with the result . If the special subject was not found an empty list is added to the subject - to - roles map . Otherwise the list contains the set of roles mapped to the special subject .
41,135
@ FFDCIgnore ( EntryNotFoundException . class ) private String getMissingAccessId ( com . ibm . ws . javaee . dd . appbnd . Subject subjectFromArchive ) { String subjectType = null ; try { SecurityService securityService = securityServiceRef . getService ( ) ; UserRegistryService userRegistryService = securityService ....
Get the access id for a user or group in the bindings config by looking up the user registry .
41,136
private String updateMissingUserAccessId ( AuthzTableContainer maps , User user , String userNameFromRole ) { String accessIdFromRole ; accessIdFromRole = getMissingAccessId ( user ) ; if ( accessIdFromRole != null ) { maps . userToAccessIdMap . put ( userNameFromRole , accessIdFromRole ) ; } else { maps . userToAccess...
Update the map for the specified user name . If the accessID is successfully computed the map will be updated with the accessID . If the accessID can not be computed due to the user not being found INVALID_ACCESS_ID will be stored .
41,137
private String updateMissingGroupAccessId ( AuthzTableContainer maps , Group group , String groupNameFromRole ) { String accessIdFromRole ; accessIdFromRole = getMissingAccessId ( group ) ; if ( accessIdFromRole != null ) { maps . groupToAccessIdMap . put ( groupNameFromRole , accessIdFromRole ) ; } else { maps . group...
Update the map for the specified group name . If the accessID is successfully computed the map will be updated with the accessID . If the accessID can not be computed due to the user not being found INVALID_ACCESS_ID will be stored .
41,138
private void fireProgressEvent ( int state , int progress , String messageKey , RepositoryResource installResource ) throws InstallException { String resourceName = null ; if ( installResource instanceof EsaResource ) { EsaResource esar = ( ( EsaResource ) installResource ) ; if ( esar . getVisibility ( ) . equals ( Vi...
Fires a progress event message to be displayed
41,139
public void fireInstallProgressEvent ( int progress , InstallAsset installAsset ) throws InstallException { if ( installAsset . isServerPackage ( ) ) fireProgressEvent ( InstallProgressEvent . DEPLOY , progress , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_DEPLOYING" , installAsset . toString ( ) ) , tr...
Fires an install progress event to be displayed
41,140
public void fireDownloadProgressEvent ( int progress , RepositoryResource installResource ) throws InstallException { if ( installResource . getType ( ) . equals ( ResourceType . FEATURE ) ) { Visibility v = ( ( EsaResource ) installResource ) . getVisibility ( ) ; if ( v . equals ( Visibility . PUBLIC ) || v . equals ...
Fires a download progress event to be displayed
41,141
public void installFeatures ( Collection < String > featureNames , String toExtension , boolean acceptLicense , String userId , String password ) throws InstallException { installFeatures ( featureNames , toExtension , acceptLicense , userId , password , 1 ) ; }
Installs the specified features
41,142
public void installFeature ( String esaLocation , String toExtension , boolean acceptLicense ) throws InstallException { fireProgressEvent ( InstallProgressEvent . CHECK , 1 , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_CHECKING" ) ) ; ArrayList < InstallAsset > installAssets = new ArrayList < InstallAs...
Installs the feature found in the given esa location
41,143
public void installFeatureNoResolve ( String esaLocation , String toExtension , boolean acceptLicense ) throws InstallException { fireProgressEvent ( InstallProgressEvent . CHECK , 1 , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_CHECKING" ) ) ; ArrayList < InstallAsset > singleFeatureInstall = new Array...
Installs the feature found in the given esa location without resolving dependencies
41,144
public void installFeature ( Collection < String > featureIds , File fromDir , String toExtension , boolean acceptLicense , boolean offlineOnly ) throws InstallException { this . installAssets = new ArrayList < List < InstallAsset > > ( ) ; ArrayList < InstallAsset > installAssets = new ArrayList < InstallAsset > ( ) ;...
Installs the features found in the inputed featureIds collection
41,145
public ServerPackageAsset resolveServerPackage ( File archiveFile ) throws InstallException { ServerPackageAsset spa = ( ServerPackageJarAsset . validType ( archiveFile . getAbsolutePath ( ) . toLowerCase ( ) ) ) ? new ServerPackageJarAsset ( archiveFile , false ) : new ServerPackageZipAsset ( archiveFile , false ) ; t...
Creates a new server package asset from the inputed archive file
41,146
public Collection < String > getServerFeaturesToInstall ( Set < ServerAsset > servers , boolean offlineOnly ) throws InstallException , IOException { Set < String > features = new TreeSet < String > ( ) ; Set < String > serverNames = new HashSet < String > ( servers . size ( ) ) ; Set < String > allServerNames = new Ha...
Creates a collection of features required for all servers in the inputed set .
41,147
public void installFixes ( Collection < String > fixes , String userId , String password ) throws InstallException { fireProgressEvent ( InstallProgressEvent . CHECK , 1 , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_CHECKING" ) ) ; List < String > fixesToInstall = new ArrayList < String > ( fixes . size...
Set Director to install the specified fixes including the following tasks - determine to install the fix or not - call Resolver to resolve the required fixes - call Massive Client to download the assets
41,148
public Set < InstallLicense > getFeatureLicense ( Collection < String > featureIds , File fromDir , String toExtension , boolean offlineOnly , Locale locale ) throws InstallException { Set < InstallLicense > licenses = new HashSet < InstallLicense > ( ) ; ArrayList < InstallAsset > installAssets = new ArrayList < Insta...
Creates a set of install licenses for all features to be installed
41,149
public Set < InstallLicense > getFeatureLicense ( String esaLocation , Locale locale ) throws InstallException { Set < InstallLicense > licenses = new HashSet < InstallLicense > ( ) ; ArrayList < InstallAsset > installAssets = new ArrayList < InstallAsset > ( ) ; getResolveDirector ( ) . resolve ( esaLocation , "" , pr...
Gets the licenses for the specified esa location .
41,150
public Set < InstallLicense > getFeatureLicense ( Collection < String > featureNames , Locale locale , String userId , String password ) throws InstallException { Set < InstallLicense > licenses = new HashSet < InstallLicense > ( ) ; if ( featureNames == null || featureNames . isEmpty ( ) ) return licenses ; Map < Stri...
Gets the licenses for the specified feature names
41,151
public Set < InstallLicense > getServerPackageFeatureLicense ( File archive , boolean offlineOnly , Locale locale ) throws InstallException { String aName = archive . getAbsolutePath ( ) . toLowerCase ( ) ; ServerPackageAsset spa = null ; if ( ServerPackageZipAsset . validType ( aName ) ) { spa = new ServerPackageZipAs...
Gets the licenses for the specified archive file
41,152
public Set < InstallLicense > getServerFeatureLicense ( File serverXML , boolean offlineOnly , Locale locale ) throws InstallException , IOException { if ( null != serverXML ) { return getFeatureLicense ( new ServerAsset ( serverXML ) . getRequiredFeatures ( ) , locale , null , null ) ; } return new HashSet < InstallLi...
Gets the licenses for the specified server XML file
41,153
public void cleanUp ( ) { fireProgressEvent ( InstallProgressEvent . CLEAN_UP , 98 , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_CLEANING" ) ) ; if ( installAssets != null ) { for ( List < InstallAsset > iaList : installAssets ) { for ( InstallAsset asset : iaList ) { asset . delete ( ) ; } } } boolean ...
Clean up the downloaded install assets ; reset installAssets and uninstallAssets .
41,154
public Collection < String > getInstalledFeatureNames ( ) { if ( installAssets == null ) return null ; Collection < String > installed = new ArrayList < String > ( ) ; for ( List < InstallAsset > iaList : installAssets ) { for ( InstallAsset asset : iaList ) { if ( asset . isFeature ( ) ) { ESAAsset esa = ( ESAAsset ) ...
Get a collection of installed feature names
41,155
public void enableConsoleLog ( Level level , boolean verbose ) { InstallLogUtils . enableConsoleLogging ( level , verbose ) ; InstallLogUtils . enableConsoleErrorLogging ( verbose ) ; }
Enables console logging amd console error logging
41,156
public void reapplyFixIfNeeded ( ) throws ReapplyFixException { BundleRepositoryRegistry . initializeDefaults ( null , false ) ; Set < String > fixesToReapply = ValidateCommandTask . getFixesToReapply ( product . getManifestFileProcessor ( ) , new InstallUtils . InstallCommandConsole ( ) ) ; try { fireProgressEvent ( I...
Reinstalls fixes that need to be applied again if any exist
41,157
public void setScriptsPermission ( int event ) { if ( event == InstallProgressEvent . POST_INSTALL ? setScriptsPermission : getUninstallDirector ( ) . needToSetScriptsPermission ( ) ) { fireProgressEvent ( event , 95 , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_SET_SCRIPTS_PERMISSION" ) ) ; try { SelfE...
Sets the scripts permissions to executable
41,158
public List < EsaResource > queryFeatures ( String searchStr ) throws InstallException { List < EsaResource > features = new ArrayList < EsaResource > ( ) ; RepositoryConnectionList loginInfo = getResolveDirector ( ) . getRepositoryConnectionList ( null , null , null , this . getClass ( ) . getCanonicalName ( ) + ".que...
Searches for features that match the specified search string
41,159
public Map < String , Collection < String > > downloadAssetsInstallUtility ( Set < String > assetsNames , File toDir , DownloadOption downloadOption , String user , String password , boolean isOverride ) throws InstallException { fireProgressEvent ( InstallProgressEvent . CHECK , 1 , Messages . INSTALL_KERNEL_MESSAGES ...
Downloads the assets specified in assetsNames using Install Utility
41,160
public Map < String , InstalledFeature > getInstalledCoreFeatures ( ) { try { Map < String , InstalledFeature > installedFeatures = new TreeMap < String , InstalledFeature > ( ) ; Map < String , ProvisioningFeatureDefinition > fdMap = product . getCoreFeatureDefinitions ( ) ; for ( Entry < String , ProvisioningFeatureD...
Gets installed core features
41,161
public Map < String , InstalledFeatureCollection > getInstalledFeatureCollections ( ) { try { Map < String , InstalledFeatureCollection > installedFeatureCollections = new TreeMap < String , InstalledFeatureCollection > ( ) ; Map < String , ProvisioningFeatureDefinition > fdMap = product . getFeatureCollectionDefinitio...
Get installed feature collections
41,162
public void installAssets ( Collection < String > assetIds , File fromDir , RepositoryConnectionList loginInfo ) throws InstallException { this . installAssets = new ArrayList < List < InstallAsset > > ( ) ; ArrayList < InstallAsset > installAssets = new ArrayList < InstallAsset > ( ) ; ArrayList < String > unresolvedF...
Installs the specified assets from a specific directory
41,163
public void installAssets ( Collection < String > assetIds , RepositoryConnectionList loginInfo ) throws InstallException { fireProgressEvent ( InstallProgressEvent . CHECK , 1 , Messages . INSTALL_KERNEL_MESSAGES . getLogMessage ( "STATE_CHECKING_ASSETS" ) ) ; if ( assetIds == null || assetIds . isEmpty ( ) ) { throw ...
Installs the specified assets
41,164
public void checkResources ( ) throws InstallException { getResolveDirector ( ) . checkResources ( ) ; if ( installAssets != null ) { for ( List < InstallAsset > iaList : installAssets ) { for ( InstallAsset ia : iaList ) { checkResource ( ia ) ; } } } long required = getResolveDirector ( ) . getInstallResourcesMainAtt...
Checks if resources in installAssets are already installed and if there is enough space in the install directory to install
41,165
public String castToPrintableMessage ( long number ) { long i = number / 1048576 ; if ( i > 0 ) return String . valueOf ( i ) + " MB" ; else { long l = number / 1024 ; return String . valueOf ( l ) + " KB" ; } }
Casts a long to MB or KB
41,166
public Map < String , Collection < String > > getInstalledAssetNames ( ) { if ( installAssets == null ) return null ; Map < String , Collection < String > > installed = new HashMap < String , Collection < String > > ( ) ; Collection < String > installedAddons = new ArrayList < String > ( ) ; Collection < String > insta...
Gets the names of assets inside installAssets
41,167
public Set < InstallLicense > getFeatureLicense ( Locale locale ) throws InstallException { Map < String , InstallLicenseImpl > licenseIds = new HashMap < String , InstallLicenseImpl > ( ) ; getFeatureLicenseFromInstallAssets ( locale , licenseIds , getResolveDirector ( ) . getLocalInstallAssets ( ) ) ; getFeatureLicen...
Gets the feature licenses of install assets and resources
41,168
public Collection < String > getSampleLicense ( Locale locale ) throws InstallException { Collection < String > licenses = new ArrayList < String > ( ) ; for ( List < List < RepositoryResource > > targetList : getResolveDirector ( ) . getInstallResources ( ) . values ( ) ) { for ( List < RepositoryResource > mrList : t...
Gets the sample licenses from install resources
41,169
public Collection < String > getSamplesOrOpenSources ( ) { Collection < String > samplesOrOpenSources = new ArrayList < String > ( ) ; Map < String , List < List < RepositoryResource > > > installResources = getResolveDirector ( ) . getInstallResources ( ) ; if ( installResources != null ) { for ( List < List < Reposit...
Creates a collection of Sample and Open Source resource names from install resource
41,170
public void downloadAssets ( String toExtension ) throws InstallException { downloadAssets ( getResolveDirector ( ) . getInstallResources ( ) , toExtension ) ; if ( getResolveDirector ( ) . getLocalInstallAssetsSize ( ) > 0 ) this . installAssets . add ( getResolveDirector ( ) . getLocalInstallAssets ( ) ) ; }
Downloads assets in install resources
41,171
public void resolve ( String feature , File esaFile , String toExtension ) throws InstallException { getResolveDirector ( ) . resolve ( feature , esaFile , toExtension ) ; }
Resolves feature names
41,172
public boolean resolveExistingAssetsFromDirectoryRepo ( Collection < String > featureNames , File repoDir , boolean isOverwrite ) throws InstallException { return getResolveDirector ( ) . resolveExistingAssetsFromDirectoryRepo ( featureNames , repoDir , isOverwrite ) ; }
Resolves existing assets from a specified directory
41,173
public void uninstall ( Collection < String > ids , boolean force ) throws InstallException { getUninstallDirector ( ) . uninstall ( ids , force ) ; }
Uninstalls the ids
41,174
public void uninstall ( boolean checkDependency , String [ ] productIds , Collection < File > toBeDeleted ) throws InstallException { getUninstallDirector ( ) . uninstall ( checkDependency , productIds , toBeDeleted ) ; }
Uninstalls product depending on dependencies
41,175
public void uninstallFeaturesByProductId ( String productId , boolean exceptPlatformFeatures ) throws InstallException { String [ ] productIds = new String [ 1 ] ; productIds [ 0 ] = productId ; uninstallFeaturesByProductId ( productIds , exceptPlatformFeatures ) ; }
Calls below method to uninstall features by product id
41,176
public synchronized final void append ( Link link ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "append" ) ; Link prev = _dummyTail . _getPreviousLink ( ) ; link . _link ( prev , _dummyTail , _nextPositionToIssue ++ , this ) ; prev . _setNextLink ( link ) ; _...
Append a link to the end of the list .
41,177
public final AbstractItem findFirstMatching ( final Filter filter ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findFirstMatching" , filter ) ; AbstractItem found = null ; Link link = getHead ( ) ; while ( link != null && found =...
Method get returns the first unlocked matching object on the list .
41,178
public final AbstractItem removeFirstMatching ( final Filter filter , PersistentTransaction transaction ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeFirstMatching" , new Object [ ] { filter , transaction } ) ; AbstractItem...
Method removes the first unlocked matching object on the list destructively under transactional control .
41,179
public final void xmlWriteOn ( FormattedWriter writer , String tagName ) throws IOException { Link link = getHead ( ) ; if ( link != null ) { writer . newLine ( ) ; writer . startTag ( tagName ) ; writer . indent ( ) ; while ( link != null ) { writer . newLine ( ) ; link . xmlWriteOn ( writer ) ; link = link . getNextP...
Used when the transactional list is NOT part of a prioritized list .
41,180
public int countLinks ( ) { int count = 0 ; Link look = _dummyHead . getNextLogicalLink ( ) ; while ( look != null && _dummyTail != look ) { count ++ ; look = look . _getNextLink ( ) ; } return count ; }
This is a method used by the unit tests to determine the number of links in the list . It s too inefficient for any other purpose .
41,181
private void purge ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && _tc . isEntryEnabled ( ) ) SibTr . entry ( this , _tc , "purge" ) ; Iterator < Map . Entry < K , TimedValue < V > > > it = _realMap . entrySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { Map . Entry < K , TimedValue < V > > entry = it . nex...
This method removes any expired data from the map .
41,182
private static StringBuilder toBase64 ( long value ) { StringBuilder result = new StringBuilder ( 23 ) ; for ( int shift = 60 ; shift >= 0 ; shift -= 6 ) { result . append ( Base64 [ ( int ) ( ( value >> shift ) & 0x3F ) ] ) ; } return result ; }
Return 11 chars of Base64 string for the 64 bits of the value padded with 2 zero bits
41,183
private void nextQueue ( ) { if ( super . hasNext ( ) ) { do { if ( _currentSubIterator != null ) _currentSubIterator . finished ( ) ; _currentSubIterator = null ; _currentQueue = ( SIMPQueueControllable ) super . next ( ) ; try { _currentSubIterator = _currentQueue . getRemoteQueuePointIterator ( ) ; } catch ( SIMPExc...
Move to the next stream which has active ranges
41,184
@ SuppressWarnings ( "unchecked" ) public static < T > T getContextData ( String name ) { EventImpl event = ( EventImpl ) CurrentEvent . get ( ) ; if ( null != event ) { return ( T ) event . getContextData ( name ) ; } return null ; }
Query possible EventLocal context data for the current Event runtime based on the provided name value . If an EventLocal was created under the target name then the currently running Event runtime would return its value .
41,185
public static < T > EventLocal < T > getLocal ( String name ) { return ( EventLocal < T > ) eventLocalNames . get ( name ) ; }
Query possible EventLocal for the current Event based on the provided name value . If an EventLocal was created under the target name then the currently running event runtime would return its value .
41,186
public T get ( ) { EventImpl event = ( EventImpl ) CurrentEvent . get ( ) ; if ( null == event ) { return null ; } return event . get ( this ) ; }
Query the current value if any of this EventLocal .
41,187
public void set ( T value ) { EventImpl event = ( EventImpl ) CurrentEvent . get ( ) ; if ( null != event ) { event . set ( this , value ) ; } }
Set the value of the current EventLocal to the input item .
41,188
public T remove ( ) { EventImpl event = ( EventImpl ) CurrentEvent . get ( ) ; if ( null != event ) { if ( name != null ) { event . removeEventLocalName ( name ) ; } return event . remove ( this ) ; } return null ; }
Remove this EventLocal from the current event .
41,189
protected void validate ( ) throws IOException { if ( null != this . error ) { throw this . error ; } if ( isClosed ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "validate - is closed: hc: " + this . hashCode ( ) + " details: " + this ) ; } throw new IOException ...
Perform validation of the stream before processing external requests to write data .
41,190
@ FFDCIgnore ( { IOException . class } ) private void convertFile ( FileChannel fc ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , "Converting FileChannel to buffers" ) ; } final WsByteBuffer [ ] body = new WsByteBuffer [ 1 ] ; final WsByteBufferPool...
User attempted to use the optimized FileChannel writing ; however that path is currently disabled . This method will read the file and do repeated write calls until done . This avoids TCP channel doing it in one big block .
41,191
private List < InMemoryMappingFile > copyInMemoryMappingFiles ( List < InMemoryMappingFile > copyIMMF ) { List < InMemoryMappingFile > immf = new ArrayList < InMemoryMappingFile > ( ) ; for ( InMemoryMappingFile file : copyIMMF ) { immf . add ( new InMemoryMappingFile ( file . getMappingFile ( ) ) ) ; } return immf ; }
Private method that takes a list of InMemoryMappingFiles and copies them by assigning a new id while sharing the same underlying byte array . This method avoids unnecessarily create identical byte arrays . Once all references to a byte array are deleted the garbage collector will cleanup the byte array .
41,192
protected Channel createChannel ( ChannelData channelData ) throws ChannelException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "createChannel" ) ; } TCPChannelConfiguration newCC = new TCPChannelConfiguration ( channelData ) ; TCPChannel channel = null ; boolean isO...
Declared abstract in the ChannelFactoryImpl class .
41,193
public void processException ( HttpServletRequest req , HttpServletResponse res ) throws IOException { if ( redirectURL != null ) { res . sendRedirect ( redirectURL ) ; return ; } if ( message == null ) { res . sendError ( statusCode ) ; } else { res . sendError ( statusCode , message ) ; } }
Process security violation exception
41,194
public static String getMD5String ( String str ) { MessageDigest messageDigest = getMessageDigest ( MD5 ) ; return getHashString ( str , messageDigest ) ; }
Calculate MD5 hash of a String
41,195
public static String getFileMD5String ( File file ) throws IOException { MessageDigest messageDigest = getMessageDigest ( MD5 ) ; return getFileHashString ( file , messageDigest ) ; }
Calculate MD5 hash of a File
41,196
public static String getSHA256String ( String str ) { MessageDigest messageDigest = getMessageDigest ( SHA256 ) ; return getHashString ( str , messageDigest ) ; }
Calculate SHA - 256 hash of a String
41,197
public static String getFileSHA256String ( File file ) throws IOException { MessageDigest messageDigest = getMessageDigest ( SHA256 ) ; return getFileHashString ( file , messageDigest ) ; }
Calculate SHA - 256 hash of a File
41,198
private static MessageDigest getMessageDigest ( String digestType ) { MessageDigest messageDigest ; try { messageDigest = MessageDigest . getInstance ( digestType ) ; } catch ( NoSuchAlgorithmException e ) { throw new RuntimeException ( e ) ; } return messageDigest ; }
this code replaces the creation of the message digest in a static code block as that was found to fail when multi threaded .
41,199
public void install ( InstallAsset installAsset , List < File > filesInstalled , Collection < String > featuresToBeInstalled , ExistsAction existsAction , Set < String > executableFiles , Map < String , Set < String > > extattrFiles , boolean downloadDependencies , RestRepositoryConnectionProxy proxy , ChecksumsManager...
Determines which install method to call based on the type of installAsset