idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
161,200 | void setSICoreConnection ( final SICoreConnection connection ) { if ( TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "setSICoreConnection" , connection ) ; } _coreConnection = connection ; if ( TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , "setSICoreConnection" ) ; } } | Sets the connection that was created as a result of this request . |
161,201 | public ZipFile open ( ) throws IOException { String methodName = "open" ; synchronized ( zipFileLock ) { if ( zipFile == null ) { debug ( methodName , "Opening" ) ; if ( zipFileReaper == null ) { zipFile = ZipFileUtils . openZipFile ( file ) ; } else { zipFile = zipFileReaper . open ( path ) ; } } openCount ++ ; debug ... | Open the zip file . Create and assign the zip file if this is the first open . Increase the open count by one . |
161,202 | public InputStream getInputStream ( ZipFile useZipFile , ZipEntry zipEntry ) throws IOException { String methodName = "getInputStream" ; String entryName = zipEntry . getName ( ) ; if ( zipEntry . isDirectory ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { debug ( methodName , "Entr... | Answer an input stream for an entry of a zip file . When the entry is a class entry which has 8K or fewer bytes read all of the entry bytes immediately and cache the bytes in this handle . Subsequent input stream requests which locate cached bytes will answer a stream on those bytes . |
161,203 | private static byte [ ] read ( InputStream inputStream , int expectedRead , String name ) throws IOException { byte [ ] bytes = new byte [ expectedRead ] ; int remainingRead = expectedRead ; int totalRead = 0 ; while ( remainingRead > 0 ) { int nextRead = inputStream . read ( bytes , totalRead , remainingRead ) ; if ( ... | Read an exact count of bytes from an input stream . |
161,204 | private String findVersion ( ) { WlpInformation wlp = _asset . getWlpInformation ( ) ; if ( wlp == null ) { return null ; } Collection < AppliesToFilterInfo > filterInfo = wlp . getAppliesToFilterInfo ( ) ; if ( filterInfo == null ) { return null ; } for ( AppliesToFilterInfo filter : filterInfo ) { if ( filter . getMi... | Uses the filter information to return the first version number |
161,205 | private void addVersionDisplayString ( ) { WlpInformation wlp = _asset . getWlpInformation ( ) ; JavaSEVersionRequirements reqs = wlp . getJavaSEVersionRequirements ( ) ; if ( reqs == null ) { return ; } String minVersion = reqs . getMinVersion ( ) ; if ( minVersion == null ) { return ; } String minJava11 = "Java SE 11... | This generates the string that should be displayed on the website to indicate the supported Java versions . The requirements come from the bundle manifests . The mapping between the two is non - obvious as it is the intersection between the Java EE requirement and the versions of Java that Liberty supports . |
161,206 | private void removeRequireFeatureWithToleratesIfExists ( String feature ) { Collection < RequireFeatureWithTolerates > rfwt = _asset . getWlpInformation ( ) . getRequireFeatureWithTolerates ( ) ; if ( rfwt != null ) { for ( RequireFeatureWithTolerates toCheck : rfwt ) { if ( toCheck . getFeature ( ) . equals ( feature ... | Looks in the underlying asset to see if there is a requireFeatureWithTolerates entry for the supplied feature and if there is removes it . |
161,207 | private void copyRequireFeatureToRequireFeatureWithTolerates ( ) { Collection < RequireFeatureWithTolerates > rfwt = _asset . getWlpInformation ( ) . getRequireFeatureWithTolerates ( ) ; if ( rfwt != null ) { return ; } Collection < String > requireFeature = _asset . getWlpInformation ( ) . getRequireFeature ( ) ; if (... | requireFeature was the old field in the asset which didn t contain tolerates information . The new field is requireFeatureWithTolerates and for the moment both fields are being maintained as older assets in the repository will only have the older field . When older assets are being written to the data from the older fi... |
161,208 | public static boolean isClassVetoed ( Class < ? > type ) { if ( type . isAnnotationPresent ( Vetoed . class ) ) { return true ; } return isPackageVetoed ( type . getPackage ( ) ) ; } | Return true if the class is vetoed or the package is vetoed |
161,209 | private Map < String , String > populateCommonAuthzHeaderParams ( ) { Map < String , String > parameters = new HashMap < String , String > ( ) ; parameters . put ( TwitterConstants . PARAM_OAUTH_CONSUMER_KEY , consumerKey ) ; parameters . put ( TwitterConstants . PARAM_OAUTH_NONCE , Utils . generateNonce ( ) ) ; parame... | Creates a map of parameters and values that are common to all requests that require an Authorization header . |
161,210 | private String signAndCreateAuthzHeader ( String endpointUrl , Map < String , String > parameters ) { String signature = computeSignature ( requestMethod , endpointUrl , parameters ) ; parameters . put ( TwitterConstants . PARAM_OAUTH_SIGNATURE , signature ) ; String authzHeaderString = createAuthorizationHeaderString ... | Generates the Authorization header with all the requisite content for the specified endpoint request by computing the signature adding it to the parameters and generating the Authorization header string . |
161,211 | public Map < String , Object > populateJsonResponse ( String responseBody ) throws JoseException { if ( responseBody == null || responseBody . isEmpty ( ) ) { return null ; } return JsonUtil . parseJson ( responseBody ) ; } | Populates a Map from the response body . This method expects the responseBody value to be in JSON format . |
161,212 | @ FFDCIgnore ( SocialLoginException . class ) public Map < String , Object > executeRequest ( SocialLoginConfig config , String requestMethod , String authzHeaderString , String url , String endpointType , String verifierValue ) { if ( endpointType == null ) { endpointType = TwitterConstants . TWITTER_ENDPOINT_REQUEST_... | Sends a request to the specified Twitter endpoint and returns a Map object containing the evaluated response . |
161,213 | @ FFDCIgnore ( IllegalStateException . class ) private void updateMonitorService ( ) { if ( ! coveringPaths . isEmpty ( ) ) { if ( service == null ) { try { BundleContext bundleContext = getContainerFactoryHolder ( ) . getBundleContext ( ) ; setServiceProperties ( ) ; service = bundleContext . registerService ( FileMon... | Update the monitor service according to whether any listeners are registered . That is if any covering paths are present . |
161,214 | private void updateEnclosingMonitor ( ) { if ( ! coveringPaths . isEmpty ( ) ) { if ( ! listenerRegistered ) { ArtifactContainer enclosingRootContainer = entryInEnclosingContainer . getRoot ( ) ; ArtifactNotification enclosingNotification = new DefaultArtifactNotification ( enclosingRootContainer , Collections . single... | Update the enclosing monitor according to whether any listeners are registered . That is if any covering paths are present . |
161,215 | private boolean registerListener ( String newPath , ArtifactListenerSelector newListener ) { boolean updatedCoveringPaths = addCoveringPath ( newPath ) ; Collection < ArtifactListenerSelector > listenersForPath = listeners . get ( newPath ) ; if ( listenersForPath == null ) { listenersForPath = new LinkedList < Artifac... | Register a listener to a specified path . |
161,216 | private boolean addCoveringPath ( String newPath ) { int newLen = newPath . length ( ) ; Iterator < String > useCoveringPaths = coveringPaths . iterator ( ) ; boolean isCovered = false ; boolean isCovering = false ; while ( ! isCovered && useCoveringPaths . hasNext ( ) ) { String coveringPath = useCoveringPaths . next ... | Add a path to the covering paths collection . |
161,217 | private String validateNotification ( Collection < ? > added , Collection < ? > removed , Collection < ? > updated ) { boolean isAddition = ! added . isEmpty ( ) ; boolean isRemoval = ! removed . isEmpty ( ) ; boolean isUpdate = ! updated . isEmpty ( ) ; if ( ! isAddition && ! isRemoval && ! isUpdate ) { return "null" ... | Validate change data which is expected to be collections of files or collections of entry paths . |
161,218 | private void notifyAllListeners ( boolean isUpdate , String filter ) { List < QueuedNotification > notifications = null ; synchronized ( listenersLock ) { for ( Map . Entry < String , Collection < ArtifactListenerSelector > > listenersEntry : listeners . entrySet ( ) ) { List < String > a_registeredPaths = new ArrayLis... | A notification which was either an update to the entire zip or was the removal of the entire zip file was received . For each listener that is registered collect the paths for that listener and forward the notification . |
161,219 | public AuthenticationService getAuthenticationService ( SecurityService securityService ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "getAuthenticationService" , securityService ) ; } if ( _authenticationService == null ) { if ( securityService != nu... | Get Authentication Service from the Liberty Security component It will get the AuthenticationService only if the SecurityService is activated |
161,220 | protected Subject login ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "login" ) ; } Subject subject = null ; try { if ( _authenticationService != null ) { subject = _authenticationService . authenticate ( MESSAGING_JASS_ENTRY_NAME , _authenticationD... | The method to authenticate a User |
161,221 | private void rejectHandshake ( Conversation conversation , int requestNumber , String rejectedField ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "rejectHandshake" , new Object [ ] { conversation , requestNumber , rejectedField } ) ; SIConnectionLostException... | This method is used to inform the client that we are rejecting their handshake . Typically this will never happen unless a third party client is written or an internal error occurs . However we should check for an inproperly formatted handshake and inform the client if such an error occurs . |
161,222 | void register ( CloudantService svc , ConcurrentMap < ClientKey , Object > clients ) { registrations . put ( svc , clients ) ; } | Lazily registers a CloudantService to have its client cache purged of entries related to a stopped application . |
161,223 | @ FFDCIgnore ( NoSuchMethodException . class ) private void setRRSTransactional ( ) { try { ivRRSTransactional = ( Boolean ) activationSpec . getClass ( ) . getMethod ( "getRRSTransactional" ) . invoke ( activationSpec ) ; } catch ( NoSuchMethodException x ) { ivRRSTransactional = false ; } catch ( Exception x ) { ivRR... | If an RA wants to enable RRS Transactions it should return true for the method getRRSTransactional . |
161,224 | public void setJCAVersion ( int majorJCAVer , int minorJCAVer ) { majorJCAVersion = majorJCAVer ; minorJCAVersion = minorJCAVer ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "MessageEndpointFactoryImpl.setJCAVersionJCA: Version " + majorJCAVersion + "." + minorJCAVersi... | Indicates what version of JCA specification the RA using this MessageEndpointFactory requires compliance with . |
161,225 | private void setup ( BeanMetaData bmd ) { if ( ! ivSetup ) { int slotSize = bmd . container . getEJBRuntime ( ) . getMetaDataSlotSize ( MethodMetaData . class ) ; for ( int i = 0 ; i < capacity ; ++ i ) { EJBMethodInfoImpl methodInfo = bmd . createEJBMethodInfoImpl ( slotSize ) ; methodInfo . initializeInstanceData ( n... | Construct capacity sized stack |
161,226 | public final void done ( EJBMethodInfoImpl mi ) { if ( orig || ( mi == null ) || ( topOfStack == 0 ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "In orig mode returning:" + " orig: " + orig + " top: " + topOfStack + " mi: " + mi ) ; orig = true ; elements = null ; ... | Indicate that the caller is finished with the instance that was last obtained . |
161,227 | final public EJBMethodInfoImpl get ( String methodSignature , String methodNameOnly , EJSWrapperBase wrapper , MethodInterface methodInterface , TransactionAttribute txAttr ) { EJBMethodInfoImpl retVal = null ; BeanMetaData bmd = wrapper . bmd ; setup ( bmd ) ; if ( ( topOfStack < 0 ) || orig ) { if ( TraceComponent . ... | Get an instance of EJBMethodInfoImpl . Either return EJBMethod off the stack or new up a new instance after stack capacity is exhausted returns EJBMethodInfoImpl |
161,228 | Class < ? > loadClass ( String name ) throws ClassNotFoundException { ServiceReference < DeserializationClassProvider > provider = classProviders . getReference ( name ) ; if ( provider != null ) { return loadClass ( provider , name ) ; } int index = name . lastIndexOf ( '.' ) ; if ( index != - 1 ) { String pkg = name ... | Attempts to resolve a class from registered class providers . |
161,229 | public void begin ( ) throws ResourceException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "begin" , ivMC ) ; if ( ivMC . _mcStale ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "MC is stale" ) ; throw new DataStoreAdapterException ( "INVALID_CONNECTION" , AdapterUtil . staleX ( ) , WSRdbSpiL... | Begin a local transaction |
161,230 | public void commit ( ) throws ResourceException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "commit" , ivMC ) ; if ( ivMC . _mcStale ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "MC is stale" ) ; throw new DataStoreAdapterException ( "INVALID_CONNECTION" , AdapterUtil . staleX ( ) , WSRdbSp... | Commit a local transaction |
161,231 | public void rollback ( ) throws ResourceException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( this , tc , "rollback" , ivMC ) ; if ( ivMC . _mcStale ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "MC is stale" ) ; throw new DataStoreAdapterException ( "INVALID_CONNECTION" , AdapterUtil . staleX ( ) , WSR... | Rollback a local transaction |
161,232 | private void serializeRealObject ( ) throws ObjectFailedToSerializeException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "serializeRealObject" ) ; if ( hasRealObject ) { if ( realObject != null ) { try { ByteArrayOutputStream baos = new ByteArrayOutputStream ... | Private method to serialize the real object into the payload . |
161,233 | private Serializable deserializeToRealObject ( ) throws IOException , ClassNotFoundException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deserializeToRealObject" ) ; Serializable obj = null ; ObjectInputStream ois = null ; byte [ ] bytes = getDataFromPayload... | Private method to deserialize the real object from the payload . |
161,234 | public SICoreConnection getConnection ( ) throws SISessionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && CoreSPIProducerSession . tc . isEntryEnabled ( ) ) { SibTr . entry ( CoreSPIProducerSession . tc , "getConnection" , this ) ; SibTr . exit ( CoreSPIProducerSession . tc , "getConnection" , _... | Returns this sessions connection |
161,235 | void disableDiscriminatorAccessCheckAtSend ( String discriminatorAtCreate ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "disableDiscriminatorAccessCheckAtSend" ) ; _checkDiscriminatorAccessAtSend = false ; this . _discriminatorAtCreate = discriminatorAtCreate ; if (... | Disable discriminator access checks at send time |
161,236 | public void addEntry ( TimerWorkItem addItem , long curTime ) { this . mostRecentlyAccessedTime = curTime ; this . lastEntryIndex ++ ; this . entries [ lastEntryIndex ] = addItem ; } | Add a timer item . |
161,237 | @ Generated ( value = "com.ibm.jtc.jax.tools.xjc.Driver" , date = "2014-06-11T05:49:00-04:00" , comments = "JAXB RI v2.2.3-11/28/2011 06:21 AM(foreman)-" ) public List < Flow > getFlows ( ) { if ( flows == null ) { flows = new ArrayList < Flow > ( ) ; } return this . flows ; } | Gets the value of the flows property . |
161,238 | public JMFMessage decode ( JSchema schema , byte [ ] contents , int offset , int length ) throws JMFMessageCorruptionException { return new JSMessageImpl ( schema , contents , offset , length , true ) ; } | Implementation of decode |
161,239 | protected String read ( SocketChannel sc ) throws IOException { sc . read ( buffer ) ; buffer . flip ( ) ; decoder . decode ( buffer , charBuffer , true ) ; charBuffer . flip ( ) ; String result = charBuffer . toString ( ) ; buffer . clear ( ) ; charBuffer . clear ( ) ; decoder . reset ( ) ; return result ; } | Reads a command or command response from a socket channel . |
161,240 | protected void write ( SocketChannel sc , String s ) throws IOException { sc . write ( encoder . encode ( CharBuffer . wrap ( s ) ) ) ; } | Writes a command or command response to a socket channel . |
161,241 | public void MPJwtBadMPConfigAsEnvVars_GoodMpJwtConfigSpecifiedInServerXml ( ) throws Exception { resourceServer . reconfigureServerUsingExpandedConfiguration ( _testName , "rs_server_AltConfigNotInApp_goodServerXmlConfig.xml" ) ; standardTestFlow ( resourceServer , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_ROOT_CONTEXT ,... | The server will be started with all mp - config properties set to bad values in environment variables . The server . xml has a valid mp_jwt config specified . The config settings should come from server . xml . The test should run successfully . |
161,242 | public void MPJwtBadMPConfigAsEnvVars_MpJwtConfigNotSpecifiedInServerXml ( ) throws Exception { standardTestFlow ( resourceServer , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_ROOT_CONTEXT , MpJwtFatConstants . NO_MP_CONFIG_IN_APP_APP , MpJwtFatConstants . MPJWT_APP_CLASS_NO_MP_CONFIG_IN_APP , setBadIssuerExpectations ( re... | The server will be started with all mp - config properties set to bad values in environment variables . The server . xml has NO mp_jwt config specified . The config settings should come from the env vars . The test should fail |
161,243 | private boolean doRead ( int amountToRead ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "doRead, Current buffer, " + _buffer + ", reading from the TCP Channel, readLine : " + _isReadLine ) ; } try { if ( _tcpChannelCallback != null && ! _isReadLine... | This method will call the synchronous or asynchronous method depending on how everything is set up |
161,244 | private boolean syncRead ( int amountToRead ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "syncRead, Executing a synchronous read" ) ; } setAndAllocateBuffer ( amountToRead ) ; try { long bytesRead = _tcpContext . getReadInterface ( ) . read ( 1 , ... | Issues a synchronous read to the TCP Channel . |
161,245 | private boolean immediateRead ( int amountToRead ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "immediateRead, Executing a read" ) ; } if ( amountToRead > 1 ) { WsByteBuffer tempBuffer = allocateBuffer ( amountToRead ) ; tempBuffer . position ( 0 ) ; tempBuffer . lim... | This method will execute an immediate read The immediate read will issue a read to the TCP Channel and immediately return with whatever can fit in the buffers This will only ever be called after we had read the 1 byte from the isReady or initialRead methods . As such we will allocate a buffer and add in the 1 byte . Th... |
161,246 | public int read ( ) throws IOException { validate ( ) ; int rc = - 1 ; if ( doRead ( 1 ) ) { rc = _buffer . get ( ) & 0x000000FF ; } _buffer . release ( ) ; _buffer = null ; return rc ; } | Read the first available byte |
161,247 | public int read ( byte [ ] output , int offset , int length ) throws IOException { int size = - 1 ; validate ( ) ; if ( 0 == length ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "read(byte[],int,int), Target length was 0" ) ; } return length ; } if ( doRead ( length ... | Read into the provided byte array with the length and offset provided |
161,248 | private void setAndAllocateBuffer ( int sizeToAllocate ) { if ( _buffer == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setAndAllocateBuffer, Buffer is null, size to allocate is : " + sizeToAllocate ) ; } _buffer = allocateBuffer ( sizeToAllocate ) ; } configu... | Allocate the buffer size we need and then pre - configure the buffer to prepare it to be read into Once it has been prepared set the buffer to the TCP Channel |
161,249 | private void validate ( ) throws IOException { if ( null != _error ) { throw _error ; } if ( ! _isReadLine && ! _isReady ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isErrorEnabled ( ) ) Tr . error ( tc , "read.failed.isReady.false" ) ; throw new IllegalStateException ( Tr . formatMessage ( tc , "read.fail... | This checks if we have already had an exception thrown . If so it just rethrows that exception This check is done before any reads are done |
161,250 | public void setupReadListener ( ReadListener readListenerl , SRTUpgradeInputStream31 srtUpgradeStream ) { if ( readListenerl == null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isErrorEnabled ( ) ) Tr . error ( tc , "readlistener.is.null" ) ; throw new NullPointerException ( Tr . formatMessage ( tc , "rea... | Sets the ReadListener provided by the application to this stream Once the ReadListener is set we will kick off the initial read |
161,251 | public void initialRead ( ) { _isInitialRead = true ; if ( _buffer != null ) { _buffer . release ( ) ; _buffer = null ; } setAndAllocateBuffer ( 1 ) ; configurePreReadBuffer ( 1 ) ; _tcpContext . getReadInterface ( ) . setBuffer ( _buffer ) ; _tcpContext . getReadInterface ( ) . read ( 1 , _tcpChannelCallback , true , ... | This method triggers the initial read on the connection or the read for after the ReadListener . onDataAvailable has run The read done in this method is a forced async read meaning it will always return on another thread The provided callback will be called when the read is completed and that callback will invoke the R... |
161,252 | public void configurePostInitialReadBuffer ( ) { _isInitialRead = false ; _isFirstRead = false ; _buffer = _tcpContext . getReadInterface ( ) . getBuffer ( ) ; configurePostReadBuffer ( ) ; } | Called after the initial read is completed . This will set the first read flag to false get the buffer from the TCP Channel and post configure the buffer . Without this method we would lose the first byte we are reading |
161,253 | public Boolean close ( ) { _isClosing = true ; boolean closeResult = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "close, Initial read outstanding : " + _isInitialRead ) ; } if ( _isInitialRead ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnab... | Close the connection down by immediately timing out any existing read |
161,254 | public synchronized int getDurableSubscriptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDurableSubscriptions" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getDurableSubscriptions" , new Integer ( durableSubscriptions ) ) ; return durableSubscriptions ; } | Get number of durable subscriptions . |
161,255 | public synchronized int getNonDurableSubscriptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getNonDurableSubscriptions" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getNonDurableSubscriptions" , new Integer ( nonDurableSubscriptions ) ) ; return nonDurableSubscriptions ; } | Get number of non - durable subscriptions . |
161,256 | public synchronized int getTotalSubscriptions ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getTotalSubscriptions" ) ; int totalSubscriptions = durableSubscriptions + nonDurableSubscriptions ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "getTotalSubscriptions" , new Integer ( totalSubscriptions ) ) ... | Get total number of subscriptions . |
161,257 | void balance ( NodeStack stack , GBSNode q ) { GBSNode p ; int bpidx = stack . balancePointIndex ( ) ; int x = bpidx ; GBSNode bpoint = stack . node ( x ) ; GBSNode bfather = stack . node ( x - 1 ) ; if ( bpoint . leftChild ( ) == stack . node ( x + 1 ) ) p = bpoint . leftChild ( ) ; else p = bpoint . rightChild ( ) ; ... | Restore the height balance of a tree following an insert . |
161,258 | private void rotateLeft ( GBSNode bfather , GBSNode bpoint ) { GBSNode bson = bpoint . leftChild ( ) ; if ( bson . balance ( ) == - 1 ) { bpoint . setLeftChild ( bson . rightChild ( ) ) ; bson . setRightChild ( bpoint ) ; if ( bfather . rightChild ( ) == bpoint ) bfather . setRightChild ( bson ) ; else bfather . setLef... | Do an LL or LR rotation . |
161,259 | public Entry getPrevious ( ) { checkEntryParent ( ) ; Entry entry = null ; if ( ! isFirst ( ) ) { entry = previous ; } return entry ; } | Unsynchronized . Get the previous entry in the list . |
161,260 | public boolean analyzeJar ( Analyzer analyzer ) throws Exception { try { if ( scanAgain ) { resetErrorMarker ( ) ; List < String > newlyAddedPackages = new ArrayList < String > ( ) ; System . out . println ( "ImportlessPackager plugin: iteration " + iteration ) ; setupFilters ( analyzer ) ; Set < PackageRef > importedP... | all class types that need to be exported |
161,261 | private void collectClassDependencies ( Clazz classInstance , Analyzer analyzer ) throws Exception { Set < TypeRef > importedClasses = classInstance . parseClassFile ( ) ; for ( TypeRef importedClass : importedClasses ) { if ( canBeSkipped ( importedClass ) ) continue ; Clazz classInstanceImported = analyzer . findClas... | Collect the imports from a class and add the imported classes to the map of all known classes importedReferencedTypes is updated to contain newly added imports allReferencedTypes is updated to avoid the duplicated process |
161,262 | private boolean canBeSkipped ( TypeRef importedClass ) { if ( allReferencedTypes . contains ( importedClass ) || importedReferencedTypes . contains ( importedClass ) || importedClass . isJava ( ) ) return true ; String classPackage = importedClass . getPackageRef ( ) . getFQN ( ) ; for ( String excludePrefix : excludeP... | check whether a imported class should be considered in further dependency check |
161,263 | private Set < PackageRef > collectPackageDependencies ( ) { Set < PackageRef > referencedPackages = new HashSet < PackageRef > ( ) ; for ( TypeRef newReferencedType : importedReferencedTypes ) { PackageRef packageRef = newReferencedType . getPackageRef ( ) ; if ( referencedPackages . contains ( packageRef ) ) continue ... | Collect the referenced packages information from the referenced classes information |
161,264 | public boolean addMetatypeAd ( MetatypeAd metatypeAd ) { if ( this . metatypeAds == null ) this . metatypeAds = new LinkedList < MetatypeAd > ( ) ; for ( MetatypeAd ad : metatypeAds ) if ( ad . getID ( ) . equals ( metatypeAd . getID ( ) ) ) return false ; this . metatypeAds . add ( metatypeAd ) ; return true ; } | Adds a metatype AD . |
161,265 | public synchronized void prepareSocket ( ) throws IOException { if ( ! prepared ) { final long fd = getFileDescriptor ( ) ; if ( fd == INVALID_SOCKET ) { throw new AsyncException ( AsyncProperties . aio_handle_unavailable ) ; } channelIdentifier = provider . prepare2 ( fd , asyncChannelGroup . getCompletionPort ( ) ) ;... | Perform initialization steps for this new connection . |
161,266 | public String getParameterClassName ( String attributeName , JspCoreContext context ) throws JspCoreException { String parameterClassName = null ; if ( parameterClassNameMap == null ) { parameterClassNameMap = new HashMap ( ) ; } parameterClassName = ( String ) parameterClassNameMap . get ( attributeName ) ; if ( param... | PK36246 && 417178 override method in TagClassInfo but since we aren t loading a class right now we don t have to worry about the classpath in the context |
161,267 | public ReturnCode rollback ( ) { while ( ! history . isEmpty ( ) ) { final Action action = ( Action ) history . pop ( ) ; final ReturnCode ret = action . execute ( ) ; if ( ret . getCode ( ) != 0 ) { return ret ; } } return ReturnCode . OK ; } | Attempts to undo changes in reverse order of actions taken ; |
161,268 | public void updateState ( SSLContext context , SSLEngine engine , SSLEngineResult result , WsByteBuffer decNetBuf , int position , int limit ) { this . sslContext = context ; this . sslEngine = engine ; this . sslEngineResult = result ; this . decryptedNetBuffer = decNetBuf ; this . netBufferPosition = position ; this ... | Update this state object with current information . This is called when a YES response comes from the discriminator . The position and limit must be saved here so the ready method can adjust them right away . |
161,269 | private void setXMLBeanInterface ( String homeInterfaceName , String interfaceName ) throws InjectionException { if ( homeInterfaceName != null && homeInterfaceName . length ( ) != 0 ) { ivHomeInterface = true ; setInjectionClassTypeName ( homeInterfaceName ) ; if ( isValidationLoggable ( ) ) { loadClass ( homeInterfac... | Sets the beanInterface as specified by XML . |
161,270 | private void setBindingName ( ) throws InjectionException { Map < String , String > ejbRefBindings = ivNameSpaceConfig . getEJBRefBindings ( ) ; if ( ejbRefBindings != null ) { ivBindingName = ejbRefBindings . get ( getJndiName ( ) ) ; if ( ivBindingName != null && ivBindingName . equals ( "" ) ) { ivBindingName = null... | Returns true if the user has configured a binding for this reference . |
161,271 | public void addInjectionTarget ( Member member ) throws InjectionException { if ( ivBeanName != null && ivBeanNameClass == null ) { ivBeanNameClass = member . getDeclaringClass ( ) ; } super . addInjectionTarget ( member ) ; } | d638111 . 1 |
161,272 | public void visitInsn ( int opcode ) { if ( opcode == ATHROW && ! enabledListeners . isEmpty ( ) ) { String key = createKey ( ) ; ProbeImpl probe = getProbe ( key ) ; long probeId = probe . getIdentifier ( ) ; setProbeInProgress ( true ) ; visitInsn ( DUP ) ; visitLdcInsn ( Long . valueOf ( probeId ) ) ; visitInsn ( DU... | Inject code to fire a probe before any throw instruction . |
161,273 | public void addData ( int index , byte [ ] data ) throws InternalLogException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addData" , new java . lang . Object [ ] { new Integer ( index ) , RLSUtils . toHexString ( data , RLSUtils . MAX_DISPLAY_BYTES ) , this } ) ; if ( _recLog . failed ( ) ) { if ( tc . isEntryE... | recovery method to add data directly to _writtenData array |
161,274 | public int identity ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "identity" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "identity" , new Integer ( _identity ) ) ; return _identity ; } | Returns the identity of the recoverable unit section . |
161,275 | public static int decode ( WsByteBuffer headerBlock , int N ) { int I = HpackUtils . getLSB ( headerBlock . get ( ) , N ) ; if ( I < HpackUtils . ipow ( 2 , N ) - 1 ) { return I ; } else { int M = 0 ; boolean done = false ; byte b ; while ( done == false ) { b = headerBlock . get ( ) ; I = I + ( ( b ) & 127 ) * HpackUt... | Decodes a provided byte array that was encoded using an N - bit prefix . |
161,276 | static protected int getPadBits ( int bitString ) { int val = 0 ; for ( int i = 3 ; i >= 0 ; i -- ) { if ( i != 0 ) { if ( ( bitString >> ( i * 8 ) ) != 0 ) { val = ( bitString >> ( i * 8 ) ) & 0xFF ; break ; } } else { if ( bitString != 0 ) { val = bitString & 0xFF ; break ; } } } if ( val == 0 ) { return 7 ; } int bi... | return the correct number of pad bits for a bit string defined in a 32 bit constant |
161,277 | static protected byte [ ] getBytes ( int bitString ) { int bytes = 4 ; for ( int i = 3 ; i >= 1 ; i -- ) { if ( ( bitString & ( 0xFF << ( i * 8 ) ) ) != 0 ) { break ; } bytes -- ; } byte [ ] result = new byte [ bytes ] ; for ( int i = 0 ; i < bytes ; i ++ ) { result [ i ] = ( byte ) ( ( bitString >> ( i * 8 ) ) & 0xFF ... | return the correct number of bytes for a bit string defined in a 32 bit constant |
161,278 | public static DERBitString getInstance ( Object obj ) { if ( obj == null || obj instanceof DERBitString ) { return ( DERBitString ) obj ; } if ( obj instanceof ASN1OctetString ) { byte [ ] bytes = ( ( ASN1OctetString ) obj ) . getOctets ( ) ; int padBits = bytes [ 0 ] ; byte [ ] data = new byte [ bytes . length - 1 ] ;... | return a Bit String from the passed in object |
161,279 | private AuthenticationResult handleBasicAuth ( String inRealm , HttpServletRequest req , HttpServletResponse res ) { AuthenticationResult result = null ; String hdrValue = req . getHeader ( BASIC_AUTH_HEADER_NAME ) ; if ( hdrValue == null || ! hdrValue . startsWith ( "Basic " ) ) { result = new AuthenticationResult ( A... | handleBasicAuth generates AuthenticationResult This routine invokes basicAuthenticate which also generates AuthenticationResult . |
161,280 | protected String getBasicAuthRealmName ( WebRequest webRequest ) { SecurityMetadata securityMetadata = webRequest . getSecurityMetadata ( ) ; if ( securityMetadata != null ) { LoginConfiguration loginConfig = securityMetadata . getLoginConfiguration ( ) ; if ( loginConfig != null && loginConfig . getRealmName ( ) != nu... | Return a realm name if it s defined in the web . xml file . If it s not defined in the web . xml and displayAuthenticationRealm is set to true then return the userRegistry realm . Otherwise return the realm as Default Realm . |
161,281 | protected String decodeBasicAuth ( String data , String encoding ) { String output = "" ; byte decodedByte [ ] = null ; decodedByte = Base64Coder . base64DecodeString ( data ) ; if ( decodedByte != null && decodedByte . length > 0 ) { boolean decoded = false ; if ( encoding != null ) { try { output = new String ( decod... | 2 . This method intentionally returns empty string in case of error . With that a caller doesn t need to check null object prior to introspect it . |
161,282 | public static boolean isUninstallable ( Set < IFixInfo > installedFixes , IFixInfo fixToBeUninstalled ) { if ( Boolean . valueOf ( System . getenv ( S_DISABLE ) ) . booleanValue ( ) ) { return true ; } if ( fixToBeUninstalled != null ) { for ( IFixInfo fix : installedFixes ) { if ( ! ( fixToBeUninstalled . getId ( ) . ... | Return true if fixToBeUninstalled can be uninstalled . fixToBeUninstalled can only be uninstalled if there are no file conflicts with other fixes in the installedFixes Set that supersedes fixToBeUninstalled |
161,283 | public boolean isUninstallable ( UninstallAsset uninstallAsset , Set < IFixInfo > installedFixes , List < UninstallAsset > uninstallAssets ) { if ( Boolean . valueOf ( System . getenv ( S_DISABLE ) ) . booleanValue ( ) ) { return true ; } IFixInfo fixToBeUninstalled = uninstallAsset . getIFixInfo ( ) ; for ( IFixInfo f... | Verfiy whether the fix is uninstallable and there is no other installed fix still require this feature . |
161,284 | public static ArrayList < String > fixRequiredByFeature ( String fixApar , Map < String , ProvisioningFeatureDefinition > installedFeatures ) { ArrayList < String > dependencies = new ArrayList < String > ( ) ; for ( ProvisioningFeatureDefinition fd : installedFeatures . values ( ) ) { String requireFixes = fd . getHea... | Determine the fix apar is required by one of the installed features |
161,285 | public List < UninstallAsset > determineOrder ( List < UninstallAsset > list ) { if ( list != null ) { List < FixDependencyComparator > fixCompareList = new ArrayList < FixDependencyComparator > ( ) ; for ( UninstallAsset asset : list ) { fixCompareList . add ( new FixDependencyComparator ( asset . getIFixInfo ( ) ) ) ... | Determine the order of the fixes according to their dependency |
161,286 | private static boolean isSupersededBy ( List < Problem > apars1 , List < Problem > apars2 ) { boolean result = true ; for ( Iterator < Problem > iter1 = apars1 . iterator ( ) ; iter1 . hasNext ( ) ; ) { boolean currAparMatch = false ; Problem currApar1 = iter1 . next ( ) ; for ( Iterator < Problem > iter2 = apars2 . it... | Returns if the apars list apars1 is superseded by apars2 . Apars1 is superseded by apars2 if all the apars in apars1 is also included in apars2 |
161,287 | private static boolean confirmNoFileConflicts ( Set < UpdatedFile > updatedFiles1 , Set < UpdatedFile > updatedFiles2 ) { for ( Iterator < UpdatedFile > iter1 = updatedFiles1 . iterator ( ) ; iter1 . hasNext ( ) ; ) { UpdatedFile currFile1 = iter1 . next ( ) ; for ( Iterator < UpdatedFile > iter2 = updatedFiles2 . iter... | Confirms that UpdatedFile lists does not contain any common files |
161,288 | public void close ( boolean deleteProgressFile ) { final String methodName = "close()" ; traceDebug ( methodName , "cacheName=" + this . cacheName + " deleteProgressFile=" + deleteProgressFile ) ; if ( deleteProgressFile ) { deleteInProgressFile ( ) ; } try { htod . close ( ) ; } catch ( Throwable t ) { com . ibm . ws ... | Call this method to close the disk file manager and operation . |
161,289 | public int writeAuxiliaryDepTables ( ) { int returnCode = htod . writeAuxiliaryDepTables ( ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } else { updatePropertyFile ( ) ; } return returnCode ; } | Call this method to offload auxiliary dependency tables to the disk and update property file . |
161,290 | private void readLastScanFile ( ) { final String methodName = "readLastScanFile()" ; final File f = new File ( lastScanFileName ) ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; if ( f . exists ( ) ) { final CacheOnDisk cod = this ; AccessController . doPrivileged ( new PrivilegedAction ( ) { public Obj... | Call this method to read the timestamp of the last scan in Last Scan file . |
161,291 | protected void updateLastScanFile ( ) { final String methodName = "updateLastScanFile()" ; final File f = new File ( lastScanFileName ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { File... | Call this method to update the timestamp of the last scan in Last Scan file . |
161,292 | private void deletePropertyFile ( ) { final String methodName = "deletePropertyFile()" ; final File f = new File ( htodPropertyFileName ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { tr... | Call this method to delete the HTOD property file . |
161,293 | public void deleteDiskCacheFiles ( ) { final String methodName = "deleteDiskCacheFiles()" ; final File f = new File ( swapDirPath ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName ) ; AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { File fl ... | Call this method to delete all disk cache files per cache instance . |
161,294 | protected ValueSet readAndDeleteInvalidationFile ( ) { final String methodName = "readAndDeleteInvalidationFile()" ; final File f = new File ( invalidationFileName ) ; final CacheOnDisk cod = this ; this . valueSet = new ValueSet ( 1 ) ; if ( f . exists ( ) ) { AccessController . doPrivileged ( new PrivilegedAction ( )... | Call this method to read in all invalidation cache ids if the invalidation file exists . and then delete the invalidation file . |
161,295 | protected void createInvalidationFile ( ) { final String methodName = "createInvalidationFile()" ; final File f = new File ( invalidationFileName ) ; final CacheOnDisk cod = this ; traceDebug ( methodName , "cacheName=" + this . cacheName + " valueSet=" + cod . valueSet . size ( ) ) ; AccessController . doPrivileged ( ... | Call this method to create invalidation file to offload the invalidation cache ids . When the server is restarted the invalidation cache ids are read back . The LPBT will be called to remove these cache ids from the disk . |
161,296 | public void alarm ( final Object alarmContext ) { final String methodName = "alarm()" ; synchronized ( this ) { if ( ! stopping && ! this . htod . invalidationBuffer . isDiskClearInProgress ( ) ) { this . htod . invalidationBuffer . invokeBackgroundInvalidation ( HTODInvalidationBuffer . SCAN ) ; } else if ( stopping )... | Call this method when the alarm is triggered . It is being checked to see whether a disk cleanup is scheduled to run . |
161,297 | public void clearDiskCache ( ) { if ( htod . clearDiskCache ( ) == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } else { updateLastScanFile ( ) ; updatePropertyFile ( ) ; createInProgressFile ( ) ; } } | Call this method to clear the disk cache per cache instance . |
161,298 | public int writeCacheEntry ( CacheEntry ce ) { int returnCode = htod . writeCacheEntry ( ce ) ; if ( returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( this . htod . diskCacheException ) ; } return returnCode ; } | Call this method to write a cache entry to the disk . |
161,299 | public CacheEntry readCacheEntry ( Object id ) { Result result = htod . readCacheEntry ( id ) ; if ( result . returnCode == HTODDynacache . DISK_EXCEPTION ) { stopOnError ( result . diskException ) ; this . htod . returnToResultPool ( result ) ; return null ; } CacheEntry cacheEntry = ( CacheEntry ) result . data ; thi... | Call this method to read a cache entry from the disk . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.