idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
160,400
private String getCallerUniqueName ( ) throws WIMApplicationException { String uniqueName = null ; Subject subject = null ; WSCredential cred = null ; try { /* Get the subject */ if ( ( subject = WSSubject . getRunAsSubject ( ) ) == null ) { subject = WSSubject . getCallerSubject ( ) ; } /* Get the credential */ if ( s...
Helper function returns the caller s unique name . Created to use for logging the calls to clear cache with clearAll mode .
214
24
160,401
private Entity createEntityFromLdapEntry ( Object parentDO , String propName , LdapEntry ldapEntry , List < String > propNames ) throws WIMException { final String METHODNAME = "createEntityFromLdapEntry" ; String outEntityType = ldapEntry . getType ( ) ; Entity outEntity = null ; // For changed entities, when change t...
Create an Entity object corresponding to the LdapEntry object returned by the LdapConnection object .
723
21
160,402
@ Trivial private String getString ( boolean isOctet , Object ldapValue ) { if ( isOctet ) { return LdapHelper . getOctetString ( ( byte [ ] ) ldapValue ) ; } else { return ldapValue . toString ( ) ; } }
Convert the value into an appropriate string value .
66
10
160,403
private String getDateString ( Object ldapValue ) throws WIMSystemException { return String . valueOf ( getDateString ( ldapValue , false ) ) ; }
Convert the value into an appropriate date string value .
38
11
160,404
@ Trivial private IdentifierType createIdentiferFromLdapEntry ( LdapEntry ldapEntry ) throws WIMException { IdentifierType outId = new IdentifierType ( ) ; outId . setUniqueName ( ldapEntry . getUniqueName ( ) ) ; outId . setExternalId ( ldapEntry . getExtId ( ) ) ; outId . setExternalName ( ldapEntry . getDN ( ) ) ; o...
Create an IdentifierType object for the LdapEntry .
118
13
160,405
@ SuppressWarnings ( "unchecked" ) private void setPropertyValue ( Entity entity , Attribute attr , String propName , LdapAttribute ldapAttr ) throws WIMException { String dataType = entity . getDataType ( propName ) ; boolean isMany = entity . isMultiValuedProperty ( propName ) ; String syntax = LDAP_ATTR_SYNTAX_STRIN...
Set the appropriate value for the specified property .
620
9
160,406
private Object processPropertyValue ( Entity entity , String propName , final String dataType , final String syntax , Object ldapValue ) throws WIMException { if ( DATA_TYPE_STRING . equals ( dataType ) ) { boolean octet = LDAP_ATTR_SYNTAX_OCTETSTRING . equalsIgnoreCase ( syntax ) ; return getString ( octet , ldapValue...
Process the value of a property .
608
7
160,407
private void getGroups ( Entity entity , LdapEntry ldapEntry , GroupMembershipControl grpMbrshipCtrl ) throws WIMException { if ( grpMbrshipCtrl == null ) { return ; } int level = grpMbrshipCtrl . getLevel ( ) ; List < String > propNames = grpMbrshipCtrl . getProperties ( ) ; String [ ] bases = null ; List < String > s...
Method to get the Groups for the given entity .
556
10
160,408
private List < String > getDynamicMembers ( Attribute groupMemberURLs ) throws WIMException { final String METHODNAME = "getDynamicMembers" ; List < String > memberDNs = new ArrayList < String > ( ) ; if ( groupMemberURLs != null ) { try { for ( NamingEnumeration < ? > enu = groupMemberURLs . getAll ( ) ; enu . hasMore...
Method to get the list of dynamic members from the given Group Member URL .
627
15
160,409
private void getDescendants ( Entity entity , LdapEntry ldapEntry , DescendantControl descCtrl ) throws WIMException { if ( descCtrl == null ) { return ; } List < String > propNames = descCtrl . getProperties ( ) ; int level = descCtrl . getLevel ( ) ; List < String > descTypes = getEntityTypes ( descCtrl ) ; String [ ...
Method to get the list of descendants .
688
8
160,410
private void getAncestors ( Entity entity , LdapEntry ldapEntry , AncestorControl ancesCtrl ) throws WIMException { if ( ancesCtrl == null ) { return ; } List < String > propNames = ancesCtrl . getProperties ( ) ; int level = ancesCtrl . getLevel ( ) ; List < String > ancesTypes = getEntityTypes ( ancesCtrl ) ; String ...
Method to get the ancestors of the given entity .
375
10
160,411
public static Set < String > getSpecifiedRealms ( Root root ) { Set < String > result = new HashSet < String > ( ) ; List < Context > contexts = root . getContexts ( ) ; for ( Context context : contexts ) { String key = context . getKey ( ) ; if ( key != null && key . equals ( SchemaConstants . PROP_REALM ) ) { String ...
return the specified realms from the root object of the input data graph
113
13
160,412
public static String getContextProperty ( Root root , String propertyName ) { String result = "" ; List < Context > contexts = root . getContexts ( ) ; for ( Context context : contexts ) { String key = context . getKey ( ) ; if ( key != null && key . equals ( propertyName ) ) { result = ( String ) context . getValue ( ...
return the customProperty from the root object of the input data graph
87
13
160,413
private boolean isEntitySearchBaseConfigured ( List < String > mbrTypes ) { String METHODNAME = "isEntitySearchBaseConfigured(mbrTypes)" ; boolean isConfigured = false ; if ( mbrTypes != null ) { for ( String mbrType : mbrTypes ) { LdapEntity ldapEntity = iLdapConfigMgr . getLdapEntity ( mbrType ) ; if ( ldapEntity != ...
Checks if a search base is configured for the entity types .
180
13
160,414
private List < LdapEntry > deleteAll ( LdapEntry ldapEntry , boolean delDescendant ) throws WIMException { String dn = ldapEntry . getDN ( ) ; List < LdapEntry > delEntries = new ArrayList < LdapEntry > ( ) ; List < LdapEntry > descs = getDescendants ( dn , SearchControls . ONELEVEL_SCOPE ) ; if ( descs . size ( ) > 0 ...
Delete the descendants of the specified ldap entry .
360
11
160,415
private List < LdapEntry > getDescendants ( String DN , int level ) throws WIMException { int scope = SearchControls . ONELEVEL_SCOPE ; if ( level == 0 ) { scope = SearchControls . SUBTREE_SCOPE ; } List < LdapEntry > descendants = new ArrayList < LdapEntry > ( ) ; Set < LdapEntry > ldapEntries = iLdapConn . searchEnti...
Get all the descendants of the given DN .
179
9
160,416
private List < String > getGroups ( String dn ) throws WIMException { List < String > grpList = new ArrayList < String > ( ) ; String filter = iLdapConfigMgr . getGroupMemberFilter ( dn ) ; String [ ] searchBases = iLdapConfigMgr . getGroupSearchBases ( ) ; for ( int i = 0 ; i < searchBases . length ; i ++ ) { String s...
Get the groups that contain the specified DN as its member .
267
12
160,417
private void updateGroupMember ( String oldDN , String newDN ) throws WIMException { if ( ! iLdapConfigMgr . updateGroupMembership ( ) ) { return ; } String filter = iLdapConfigMgr . getGroupMemberFilter ( oldDN ) ; String [ ] mbrAttrs = iLdapConfigMgr . getMemberAttributes ( ) ; Map < String , ModificationItem [ ] > m...
Update the Group member
756
4
160,418
private AuditUtilityTask getTask ( String taskName ) { AuditUtilityTask task = null ; for ( AuditUtilityTask availTask : tasks ) { if ( availTask . getTaskName ( ) . equals ( taskName ) ) { task = availTask ; } } return task ; }
Given a task name return the corresponding AuditUtilityTask .
62
12
160,419
static int objectType ( Object value ) { if ( value instanceof String ) return STRING ; else if ( value instanceof Boolean ) // was BooleanValue return BOOLEAN ; else if ( value instanceof Number ) //was NumericValue // NumericValue types are ordered INT..DOUBLE starting at zero. Selector types are // ordered INT..DOUB...
Determine Selector type code of a Literal value according to its class . Used by the Literal constructor and by the Evaluator
136
29
160,420
private Cookie convertHttpCookie ( HttpCookie cookie ) { Cookie rc = new Cookie ( cookie . getName ( ) , cookie . getValue ( ) ) ; rc . setVersion ( cookie . getVersion ( ) ) ; if ( null != cookie . getPath ( ) ) { rc . setPath ( cookie . getPath ( ) ) ; } if ( null != cookie . getDomain ( ) ) { rc . setDomain ( cookie...
Convert the transport cookie to a J2EE cookie .
132
12
160,421
private static ResponseSwitch getResponseSwitch ( Object response ) { // unwrap the response until we find a ResponseSwitch while ( response != null ) { if ( response instanceof ResponseSwitch ) { // found return ( ResponseSwitch ) response ; } if ( response instanceof ServletResponseWrapper ) { // unwrap response = ( ...
Trys to obtain a ResponseSwitch from the Response .
102
11
160,422
private static ResponseSwitch createResponseSwitch ( Object response ) { if ( response instanceof HttpServletResponse ) { return new HttpServletResponseSwitch ( ( HttpServletResponse ) response ) ; } else if ( response instanceof ServletResponse ) { return new ServletResponseSwitch ( ( ServletResponse ) response ) ; } ...
Try to create a ResponseSwitch for this response .
75
10
160,423
private void updateFederatedManagerService ( ) { if ( ! activated ) { return ; } if ( profileManager . getReference ( ) != null ) { Tr . info ( tc , "FEDERATED_MANAGER_SERVICE_READY" ) ; } else { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Some required federated mana...
Federated Manager is ready when all of these required services have been registered .
104
16
160,424
private SSLConfig parseSSLConfig ( Map < String , Object > properties , boolean reinitialize ) throws Exception { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "parseSSLConfig: " + properties . get ( LibertyConstants . KEY_ID ) , properties ) ; SSLConfig rc = parseSecureSo...
Helper method to build the SSLConfig properties from the SSLConfig model object .
127
15
160,425
public synchronized SSLConfig getSSLConfig ( String alias ) throws IllegalArgumentException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getSSLConfig: " + alias ) ; SSLConfig rc = null ; if ( alias == null || alias . equals ( "" ) ) { rc = getDefaultSSLConfig ( ) ; } e...
Finds an SSLConfig from the Map given an alias .
149
12
160,426
public synchronized void loadGlobalProperties ( Map < String , Object > map ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "loadGlobalProperties" ) ; // clear before reloading. globalConfigProperties . clear ( ) ; for ( Entry < String , Object > prop : map . entrySet ( ...
Helper method for loading global properties .
269
7
160,427
@ Trivial private void set ( Class < ? > builderCls , Object builder , String propName , Object value ) throws IntrospectionException , IllegalArgumentException , IllegalAccessException , InvocationTargetException { try { Class < ? > cls = COUCHDB_CLIENT_OPTIONS_TYPES . get ( propName ) ; // setter methods are just pro...
Configure a couchdb option .
419
7
160,428
private void configureJMSConnectionFactories ( List < JMSConnectionFactory > jmsConnFactories ) { Map < String , ConfigItem < JMSConnectionFactory > > jmsCfConfigItemMap = configurator . getConfigItemMap ( JNDIEnvironmentRefType . JMSConnectionFactory . getXMLElementName ( ) ) ; for ( JMSConnectionFactory jmsConnFactor...
To configure JMS ConnectionFactory
556
6
160,429
private void configureJMSDestinations ( List < JMSDestination > jmsDestinations ) { Map < String , ConfigItem < JMSDestination > > jmsDestinationConfigItemMap = configurator . getConfigItemMap ( JNDIEnvironmentRefType . JMSConnectionFactory . getXMLElementName ( ) ) ; for ( JMSDestination jmsDestination : jmsDestinatio...
To configure JMS Destinations
553
6
160,430
public static final RequestType getRequestType ( ExternalContext externalContext ) { //Stuff is laid out strangely in this class in order to optimize //performance. We want to do as few instanceof's as possible so //things are laid out according to the expected frequency of the //various requests occurring. if ( _PORTL...
Returns the requestType of this ExternalContext .
266
9
160,431
public static final RequestType getRequestType ( Object context , Object request ) { //Stuff is laid out strangely in this class in order to optimize //performance. We want to do as few instanceof's as possible so //things are laid out according to the expected frequency of the //various requests occurring. if ( _PORTL...
This method is used when a ExternalContext object is not available like in TomahawkFacesContextFactory .
265
22
160,432
public static InputStream getRequestInputStream ( ExternalContext ec ) throws IOException { RequestType type = getRequestType ( ec ) ; if ( type . isRequestFromClient ( ) ) { Object req = ec . getRequest ( ) ; if ( type . isPortlet ( ) ) { return ( InputStream ) _runMethod ( req , "getPortletInputStream" ) ; } else { r...
Returns the request input stream if one is available
111
9
160,433
private static Object _runMethod ( Object obj , String methodName ) { try { Method sessionIdMethod = obj . getClass ( ) . getMethod ( methodName ) ; return sessionIdMethod . invoke ( obj ) ; } catch ( Exception e ) { return null ; } }
Runs a method on an object and returns the result
58
11
160,434
public static HttpServletResponse getHttpServletResponse ( Object response ) { // unwrap the response until we find a HttpServletResponse while ( response != null ) { if ( response instanceof HttpServletResponse ) { // found return ( HttpServletResponse ) response ; } if ( response instanceof ServletResponseWrapper ) {...
Trys to obtain a HttpServletResponse from the Response . Note that this method also trys to unwrap any ServletResponseWrapper in order to retrieve a valid HttpServletResponse .
119
42
160,435
public String addSymbol ( String symbol ) { // search for identical symbol int bucket = hash ( symbol ) % fTableSize ; int length = symbol . length ( ) ; OUTER : for ( Entry entry = fBuckets [ bucket ] ; entry != null ; entry = entry . next ) { if ( length == entry . characters . length ) { for ( int i = 0 ; i < length...
Adds the specified symbol to the symbol table and returns a reference to the unique symbol . If the symbol already exists the previous symbol reference is returned instead in order guarantee that symbol references remain unique .
157
38
160,436
static XARecoveryWrapper deserialize ( byte [ ] serializedWrapper ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "deserialize" ) ; XARecoveryWrapper wrapper = null ; try { final ByteArrayInputStream bis = new ByteArrayInputStream ( serializedWrapper ) ; final ObjectInputStream oin = new ObjectInputStream ( bis ) ...
which classloader is passed in and which is on the thread .
405
13
160,437
private String [ ] canonicalise ( final String [ ] xaResInfoClasspath ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "canonicalise" , xaResInfoClasspath ) ; final String [ ] result ; if ( xaResInfoClasspath != null ) { final ArrayList < String > al = new ArrayList < String > ( ) ; for ( final String pathElement :...
Canonicalise inbound paths so they can be compared with paths held in the classloaders
418
20
160,438
@ Override public void localTransactionCommitted ( ConnectionEvent event ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( this , tc , "localTransactionCommitted" ) ; } if ( event . getId ( ) == ConnectionEvent . LOCAL_TRANSACTION_COMMITTED ) { if ( mcWrapper . involvedInTran...
This method is called by a resource adapter when a CCI local transation commit is called by the application on a connection . If the MC is associated with a UOW delist its corresponding transaction wrapper .
675
41
160,439
public boolean hasObjectWithPrefix ( NamingConstants . JavaColonNamespace namespace , String name ) throws NamingException { if ( namespace == NamingConstants . JavaColonNamespace . COMP ) { return hasObjectWithPrefix ( compLock , compBindings , name ) ; } if ( namespace == NamingConstants . JavaColonNamespace . COMP_E...
Returns true if a JNDI subcontext exists .
140
11
160,440
public Collection < ? extends NameClassPair > listInstances ( NamingConstants . JavaColonNamespace namespace , String contextName ) throws NamingException { if ( namespace == NamingConstants . JavaColonNamespace . COMP ) { return listInstances ( compLock , compBindings , contextName ) ; } if ( namespace == NamingConsta...
Lists the contents of a JNDI subcontext .
149
12
160,441
private synchronized void disableDeferredReferenceData ( ) { deferredReferenceDataEnabled = false ; if ( parent != null && deferredReferenceDatas != null ) { parent . removeDeferredReferenceData ( this ) ; deferredReferenceDatas = null ; } }
Unregister this scope data with its parent if necessary for deferred reference data processing .
52
16
160,442
public synchronized void addDeferredReferenceData ( DeferredReferenceData refData ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "addDeferredReferenceData" , "this=" + this , refData ) ; } if ( deferredReferenceDatas == null ) { deferredReferenceDatas = new LinkedHash...
Add a child deferred reference data to this scope .
172
10
160,443
public synchronized void removeDeferredReferenceData ( DeferredReferenceData refData ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "removeDeferredReferenceData" , "this=" + this , refData ) ; } if ( deferredReferenceDatas != null ) { deferredReferenceDatas . remove (...
Remove a child deferred reference data to this scope .
125
10
160,444
@ Override public boolean processDeferredReferenceData ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "processDeferredReferenceData" , "this=" + this ) ; } Map < DeferredReferenceData , Boolean > deferredReferenceDatas ; synchronized ( this ) { deferredReferenceData...
Process all child reference datas .
293
6
160,445
@ SuppressWarnings ( "unused" ) private static void releaseRenderer ( ) { if ( log . isLoggable ( Level . FINEST ) ) { log . finest ( "releaseRenderer rendererMap -> " + delegateRendererMap . toString ( ) ) ; } ClassLoader classLoader = Thread . currentThread ( ) . getContextClassLoader ( ) ; if ( log . isLoggable ( Le...
The idea of this method is to be called from AbstractFacesInitializer .
208
16
160,446
public static String generateNonce ( int length ) { if ( length < 0 ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Negative length provided. Will default to nonce of length " + NONCE_LENGTH ) ; } length = NONCE_LENGTH ; } StringBuilder randomString = new StringBuilder ( ) ; SecureRandom r = new SecureRandom ( ...
Generates a random string with the specified length .
138
10
160,447
public Subject authenticate ( CallbackHandler callbackHandler , Subject subject ) throws WSLoginFailedException , CredentialException { if ( callbackHandler == null ) { throw new WSLoginFailedException ( TraceNLS . getFormattedMessage ( this . getClass ( ) , TraceConstants . MESSAGE_BUNDLE , "JAAS_LOGIN_NO_CALLBACK_HAN...
Authenticating on the client will only create a dummy basic auth subject and does not truly authenticate anything . This subject is sent to the server ove CSIv2 where the real authentication happens .
472
38
160,448
protected Subject createBasicAuthSubject ( AuthenticationData authenticationData , Subject subject ) throws WSLoginFailedException , CredentialException { Subject basicAuthSubject = subject != null ? subject : new Subject ( ) ; String loginRealm = ( String ) authenticationData . get ( AuthenticationData . REALM ) ; Str...
Create the basic auth subject using the given authentication data
331
10
160,449
static RLSSuspendTokenManager getInstance ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getInstance" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "getInstance" , _instance ) ; return _instance ; }
Returns the single instance of the RLSSuspendTokenManager
64
12
160,450
RLSSuspendToken registerSuspend ( int timeout ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerSuspend" , new Integer ( timeout ) ) ; // Generate the suspend token // RLSSuspendToken token = new RLSSuspendTokenImpl(); RLSSuspendToken token = Configuration . getRecoveryLogComponent ( ) . createRLSSuspendTok...
Registers that a suspend call has been made on the RecoveryLogService and generates a unique RLSSuspendToken which must be passed in to registerResume to cancel this suspend operation
305
37
160,451
void registerResume ( RLSSuspendToken token ) throws RLSInvalidSuspendTokenException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "registerResume" , token ) ; if ( token != null && _tokenMap . containsKey ( token ) ) { // Cast the token to its actual type // RLSSuspendTokenImpl tokenImpl = (RLSSuspendTokenImpl) t...
Cancels the suspend request that returned the matching RLSSuspendToken . The suspend call s alarm if there is one will also be cancelled
294
29
160,452
boolean isResumable ( ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "isResumable" ) ; boolean isResumable = true ; synchronized ( _tokenMap ) { if ( ! _tokenMap . isEmpty ( ) ) { isResumable = false ; } } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "isResumable" , new Boolean ( isResumable ) ) ; return isRes...
Returns true if there are no tokens in the map indicating that no active suspends exist .
110
18
160,453
public static String formatUniqueName ( String uniqueName ) throws InvalidUniqueNameException { String validName = getValidUniqueName ( uniqueName ) ; if ( validName == null ) { if ( tc . isErrorEnabled ( ) ) { Tr . error ( tc , WIMMessageKey . INVALID_UNIQUE_NAME_SYNTAX , WIMMessageHelper . generateMsgParms ( uniqueNa...
Formats the specified entity unique name and also check it using the LDAP DN syntax rule . The formatting including remove
170
23
160,454
public static String constructUniqueName ( String [ ] RDNs , Entity entity , String parentDN , boolean throwExc ) throws WIMException { boolean found = false ; String uniqueName = null ; String missingPropName = null ; for ( int i = 0 ; i < RDNs . length ; i ++ ) { String [ ] localRDNs = getRDNs ( RDNs [ i ] ) ; int si...
Returns the unique name based on the input value .
540
10
160,455
private static String escapeAttributeValue ( String value ) { final String escapees = ",=+<>#;\"\\" ; char [ ] chars = value . toCharArray ( ) ; StringBuffer buf = new StringBuffer ( 2 * value . length ( ) ) ; // Find leading and trailing whitespace. int lead ; // index of first char that is not leading whitespace for ...
Given the value of an attribute returns a string suitable for inclusion in a DN .
243
16
160,456
public static String unescapeSpaces ( String in ) { char [ ] chars = in . toCharArray ( ) ; int end = chars . length ; StringBuffer out = new StringBuffer ( in . length ( ) ) ; for ( int i = 0 ; i < end ; i ++ ) { /* * Remove any backslashes that precede spaces. */ boolean isSlashSpace = ( chars [ i ] == ' ' ) && ( i +...
Replace any unnecessary escaped spaces from the input DN .
210
11
160,457
public static String getChildText ( Element elem , String childTagName ) { NodeList nodeList = elem . getElementsByTagName ( childTagName ) ; int len = nodeList . getLength ( ) ; if ( len == 0 ) { return null ; } return getElementText ( ( Element ) nodeList . item ( len - 1 ) ) ; }
Return content of child element with given tag name . If more than one children with this name are present the content of the last element is returned .
79
29
160,458
public static List getChildTextList ( Element elem , String childTagName ) { NodeList nodeList = elem . getElementsByTagName ( childTagName ) ; int len = nodeList . getLength ( ) ; if ( len == 0 ) { return Collections . EMPTY_LIST ; } List list = new ArrayList ( len ) ; for ( int i = 0 ; i < len ; i ++ ) { list . add (...
Return list of content Strings of all child elements with given tag name .
116
15
160,459
@ Override public void sendNackMessage ( SIBUuid8 upstream , SIBUuid12 destUuid , SIBUuid8 busUuid , long startTick , long endTick , int priority , Reliability reliability , SIBUuid12 stream ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "s...
Called by one of our input stream data structures when we don t have any info for a tick and need to nack upstream .
266
27
160,460
private void processAckExpected ( ControlAckExpected ackExpMsg ) throws SIResourceException { // This is called by a PubSubOutputHandler when it finds Unknown // ticks in it's own stream and need the InputStream to resend them if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc...
Process an AckExpected message .
277
7
160,461
private long processNackWithReturnValue ( ControlNack nackMsg ) throws SIResourceException { // This is called by a PubSubOutputHandler when it finds Unknown // ticks in it's own stream and need the InputStream to resend them if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc ...
Process a nack from a PubSubOutputHandler .
414
11
160,462
private void remotePut ( MessageItem msg , SIBUuid8 sourceMEUuid ) throws SIResourceException , SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "remotePut" , new Object [ ] { msg , sourceMEUuid } ) ; // Update the origin map if this is a n...
The remote put method is driven when the producer is remote to this PubSub Input handler .
570
18
160,463
protected void remoteToLocalPutSilence ( MessageItem msgItem ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "remoteToLocalPutSilence" , new Object [ ] { msgItem } ) ; // Write Silence to the targetStream instead // If the targetStream does ...
This is a put message that has oringinated from another ME When there are no matching local consumers we need to write Silence into the stream instead
142
29
160,464
private MessageProcessorSearchResults matchMessage ( MessageItem msg ) throws SIDiscriminatorSyntaxException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "matchMessage" , new Object [ ] { msg } ) ; //Extract the message from the MessageItem JsMessage jsMsg = msg . ge...
Returns a list of matching OutputHandlers for a particular message . Note that this method takes a MessageProcessorSearchResults object from a pool . This object must be returned by the caller when it is finished with .
345
43
160,465
private boolean restoreFanOut ( MessageItemReference ref , boolean commitInsert ) throws SIDiscriminatorSyntaxException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "restoreFanOut" , new Object [ ] { ref , new Boolean ( commitInsert ) } ) ; bool...
Restore fan out of the given message to subscribers .
706
11
160,466
private MessageItemReference addProxyReference ( MessageItem msg , MessageProcessorSearchResults matchingPubsubOutputHandlers , TransactionCommon tran ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addProxyReference" , new Object [ ] { msg...
Add a msg reference to the proxy subscription reference stream .
616
11
160,467
public void setPropertiesInMessage ( JsMessage jsMsg , SIBUuid12 destinationUuid , SIBUuid12 producerConnectionUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setPropertiesInMessage" , new Object [ ] { jsMsg , destinationUuid , producerConnectionUuid } ) ; SIMPU...
Sets properties in the message that are common to both links and non - links .
315
17
160,468
@ Override public void validate ( ) { //validate the parameters String target = getTargetName ( ) ; if ( value ( ) < 1 ) { throw new FaultToleranceDefinitionException ( Tr . formatMessage ( tc , "bulkhead.parameter.invalid.value.CWMFT5016E" , "value " , value ( ) , target ) ) ; } //validate the parameters if ( waitingT...
Validate Bulkhead configure and make sure the value and waitingTaskQueue must be greater than or equal to 1 .
152
23
160,469
public void updateCacheSizes ( long max , long current ) { final String methodName = "updateCacheSizes()" ; if ( tc . isDebugEnabled ( ) && null != _maxInMemoryCacheEntryCount && null != _inMemoryCacheEntryCount ) { if ( max != _maxInMemoryCacheEntryCount . getCount ( ) && _inMemoryCacheEntryCount . getCount ( ) != cur...
Updates statistics using two supplied arguments - maxInMemoryCacheSize and currentInMemoryCacheSize .
190
20
160,470
public void onCacheHit ( String template , int locality ) { final String methodName = "onCacheHit()" ; CacheStatsModule csm = null ; if ( ( csm = getCSM ( template ) ) == null ) { return ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , methodName + " cacheName=" + _sCacheName + " template=" + template + " locality=...
Updates statistics for the cache hit case .
403
9
160,471
public void onCacheMiss ( String template , int locality ) { final String methodName = "onCacheMiss()" ; CacheStatsModule csm = null ; if ( ( csm = getCSM ( template ) ) == null ) { return ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , methodName + " cacheName=" + _sCacheName + " template=" + template + " localit...
Updates statistics for the cache miss case .
141
9
160,472
public void onEntryCreation ( String template , int source ) { final String methodName = "onEntryCreation()" ; CacheStatsModule csm = null ; if ( ( csm = getCSM ( template ) ) == null ) { return ; } if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , methodName + " cacheName=" + _sCacheName + " template=" + template + " s...
Updates statistics for the cache entry creation case .
192
10
160,473
private static void applyElement ( Annotated member , Schema property ) { final XmlElementWrapper wrapper = member . getAnnotation ( XmlElementWrapper . class ) ; if ( wrapper != null ) { final XML xml = getXml ( property ) ; xml . setWrapped ( true ) ; // No need to set the xml name if the name provided by xmlelementw...
Puts definitions for XML element .
232
7
160,474
private static void applyAttribute ( Annotated member , Schema property ) { final XmlAttribute attribute = member . getAnnotation ( XmlAttribute . class ) ; if ( attribute != null ) { final XML xml = getXml ( property ) ; xml . setAttribute ( true ) ; setName ( attribute . namespace ( ) , attribute . name ( ) , propert...
Puts definitions for XML attribute .
81
7
160,475
private static boolean setName ( String ns , String name , Schema property ) { boolean apply = false ; final String cleanName = StringUtils . trimToNull ( name ) ; final String useName ; if ( ! isEmpty ( cleanName ) && ! cleanName . equals ( ( ( SchemaImpl ) property ) . getName ( ) ) ) { useName = cleanName ; apply = ...
Puts name space and name for XML node or attribute .
179
12
160,476
private static boolean isAttributeAllowed ( Schema property ) { if ( property . getType ( ) == SchemaType . ARRAY || property . getType ( ) == SchemaType . OBJECT ) { return false ; } if ( ! StringUtils . isBlank ( property . getRef ( ) ) ) { return false ; } return true ; }
Checks whether the passed property can be represented as node attribute .
76
13
160,477
public static Attribute getInstance ( Object o ) { if ( o == null || o instanceof Attribute ) { return ( Attribute ) o ; } if ( o instanceof ASN1Sequence ) { return new Attribute ( ( ASN1Sequence ) o ) ; } throw new IllegalArgumentException ( "unknown object in factory" ) ; }
return an Attribute object from the given object .
76
10
160,478
synchronized void unregister ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "unregister" , this ) ; } if ( registration != null ) { registration . unregister ( ) ; registration = null ; } }
Remove the service registration Package private .
66
7
160,479
@ Override public void printStackTrace ( PrintWriter p ) { if ( wrapped == null ) { p . println ( "none" ) ; } else { StackTraceElement [ ] stackElements = getStackTraceEliminatingDuplicateFrames ( ) ; // format and print p . println ( wrapped ) ; for ( int i = 0 ; i < stackElements . length ; i ++ ) { StackTraceElemen...
This method will print a trimmed stack trace to stderr .
265
13
160,480
public StackTraceElement [ ] getStackTraceEliminatingDuplicateFrames ( ) { // If this isn't a cause, there can't be any duplicate frames, so proceed no further if ( parentFrames == null ) { return getStackTrace ( ) ; } if ( noduplicatesStackTrace == null ) { List < StackTraceElement > list = new ArrayList < StackTraceE...
Useful for exceptions which are the causes of other exceptions . Gets the stack frames but not only does it eliminate internal classes it eliminates frames which are redundant with the parent exception . In the case where the exception is not a cause it returns a normal exception . If duplicate frames are stripped it w...
357
60
160,481
public void record ( CircuitBreakerStateImpl . CircuitBreakerResult result ) { boolean isFailure = ( result == FAILURE ) ; if ( resultCount < size ) { // Window is not yet full resultCount ++ ; } else { // Window is full, roll off the oldest result boolean oldestResultIsFailure = results . get ( nextResultIndex ) ; if ...
Record a result in the rolling window
132
7
160,482
protected MetadataViewKey deriveViewKey ( FacesContext facesContext , UIViewRoot root ) { MetadataViewKey viewKey ; if ( ! facesContext . getResourceLibraryContracts ( ) . isEmpty ( ) ) { String [ ] contracts = new String [ facesContext . getResourceLibraryContracts ( ) . size ( ) ] ; contracts = facesContext . getReso...
Generates an unique key according to the metadata information stored in the passed UIViewRoot instance that can affect the way how the view is generated . By default the view params are the viewId the locale the renderKit and the contracts associated to the view .
174
52
160,483
public void modified ( List < String > newSources ) { if ( collectorMgr == null || isInit == false ) { this . sourcesList = newSources ; return ; } try { //Old sources ArrayList < String > oldSources = new ArrayList < String > ( sourcesList ) ; //Sources to remove -> In Old Sources, the difference between oldSource and...
Without osgi this modified method is called explicility from the update method in JsonTrService
229
20
160,484
public void writingState ( ) { if ( ! this . writtenState ) { this . writtenState = true ; this . writtenStateWithoutWrapper = false ; this . fast = new FastWriter ( this . initialSize ) ; this . out = this . fast ; } }
Mark that state is about to be written . Contrary to what you d expect we cannot and should not assume that this location is really going to have state ; it is perfectly legit to have a ResponseWriter that filters out content and ignores an attempt to write out state at this point . So we have to check after the fact t...
57
73
160,485
@ Reference ( name = "extensionProvider" , service = ExtensionProvider . class , policy = ReferencePolicy . DYNAMIC , cardinality = ReferenceCardinality . MULTIPLE ) protected void registerExtensionProvider ( ExtensionProvider provider ) { LibertyApplicationBusFactory . getInstance ( ) . registerExtensionProvider ( pro...
Register a new extension provier
72
6
160,486
@ Trivial private String dumpMap ( Map < String , String [ ] > m ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( " --- request parameters: ---\n" ) ; Iterator < String > it = m . keySet ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { String key = it . next ( ) ; String [ ] values = m . get ( key ) ; sb . a...
dump parameter map for trace .
153
6
160,487
private void forwardMessage ( AbstractMessage aMessage , SIBUuid8 targetMEUuid ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "forwardMessage" , new Object [ ] { aMessage , targetMEUuid } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && UserTrace . tc_mt . isDebu...
Forwards a message onto a foreign bus
422
8
160,488
SIMPMessage getAttachedMessage ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getAttachedMessage" , this ) ; SIMPMessage msg = null ; //check if there really is a message attached if ( _msgAttached ) { // If the message wasn't locked whe...
If a message has been attached to this LCP detach it and return it
247
15
160,489
private boolean checkReceiveAllowed ( ) throws SISessionUnavailableException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkReceiveAllowed" ) ; boolean allowed = _destinationAttachedTo . isReceiveAllowed ( ) ; if ( ! allowed ) { // Register ...
Checks the destination allows receive
242
6
160,490
private void checkReceiveState ( ) throws SIIncorrectCallException , SISessionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkReceiveState" ) ; // Only valid if the consumer session is still open checkNotClosed ( ) ; //if there is an AsynchCon...
Checks the state for the synchronous consumer
433
9
160,491
protected void waitingNotify ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "waitingNotify" ) ; this . lock ( ) ; try { if ( _waiting ) _waiter . signal ( ) ; } finally { this . unlock ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( )...
Wakeup our thread if we re waiting on a receive . This method is normally called as part of remoteDurable when we need to resubmit a get because a previous get caused a noLocal discard .
115
43
160,492
private SIMPMessage retrieveMsgLocked ( ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "retrieveMsgLocked" , new Object [ ] { this } ) ; SIMPMessage msg = null ; // Look in the Cd's ItenStream for the next available message try { msg = _con...
Attempt to retrieve a message from the CD s itemStream in a locked state .
460
16
160,493
private void checkParams ( int maxActiveMessages , long messageLockExpiry , int maxBatchSize ) throws SIIncorrectCallException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkParams" , new Object [ ] { Integer . valueOf ( maxActiveMessages ) , Long . valueOf ( mes...
Checks that the maxBatchSize is > 0 Checks that messasgeLockExpiry > = 0 Checks that maxActiveMessages > = 0
517
32
160,494
public boolean isClosed ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "isClosed" , this ) ; SibTr . exit ( tc , "isClosed" , Boolean . valueOf ( _closed ) ) ; } return _closed ; }
Returns true if this LCP is closed .
77
9
160,495
@ Override public void start ( boolean deliverImmediately ) throws SISessionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "start" , new Object [ ] { Boolean . valueOf ( deliverImmediately ) , this } ) ; // Register that LCP has been stopped by a r...
Start this LCP . If there are any synchronous receives waiting wake them up If there is a AsynchConsumerCallback registered look on the QP for messages for asynch delivery . If deliverImmediately is set this Thread is used to deliver any initial messages rather than starting up a new Thread .
141
62
160,496
@ Override public void checkForMessages ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "checkForMessages" , this ) ; try { //start a new thread to run the callback _messageProcessor . startNewThread ( new AsynchThread ( this , false ) ) ; } catch ( InterruptedExcep...
Spin off a thread that checks for any stored messages . This is called by a consumerKeyGroup to try to kick a group back into life after a stopped member detaches and makes the group ready again .
235
42
160,497
@ Override public void unlockAll ( ) throws SISessionUnavailableException , SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "unlockAll" , this ) ; synchronized ( _asynchConsumerBusyLock ) { this . lock ( ) ; try { // Only valid if the consumer sessio...
Unlock all messages which have been locked to this LCP but not consumed
238
15
160,498
private void setBaseRecoverability ( Reliability unrecoverableReliability ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setBaseRecoverability" , new Object [ ] { this , unrecoverableReliability } ) ; setUnrecoverability ( unrecoverableReliability ) ; _baseUnrecover...
Set the consumerSession s recoverability
136
7
160,499
private void resetBaseUnrecoverability ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetBaseUnrecoverability" , this ) ; _unrecoverableOptions = _baseUnrecoverableOptions ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ...
Restore the original unrecoverability of the session
107
10