idx
int64
0
165k
question
stringlengths
73
4.15k
target
stringlengths
5
918
len_question
int64
21
890
len_target
int64
3
255
160,000
public static boolean repositoryDescriptionFileExists ( RestRepositoryConnectionProxy proxy ) { boolean exists = false ; try { URL propertiesFileURL = getPropertiesFileLocation ( ) ; // Are we accessing the properties file (from DHE) using a proxy ? if ( proxy != null ) { if ( proxy . isHTTPorHTTPS ( ) ) { Proxy javaNe...
Tests if the repository description properties file exists as defined by the location override system property or at the default location
297
22
160,001
private static void checkHttpResponseCodeValid ( URLConnection connection ) throws RepositoryHttpException , IOException { // if HTTP URL not File URL if ( connection instanceof HttpURLConnection ) { HttpURLConnection conn = ( HttpURLConnection ) connection ; conn . setRequestMethod ( "GET" ) ; int respCode = conn . ge...
Checks for a valid response code and throws and exception with the response code if an error
117
18
160,002
public static boolean isZos ( ) { String os = AccessController . doPrivileged ( new PrivilegedAction < String > ( ) { @ Override public String run ( ) { return System . getProperty ( "os.name" ) ; } } ) ; return os != null && ( os . equalsIgnoreCase ( "OS/390" ) || os . equalsIgnoreCase ( "z/OS" ) ) ; }
In general find another way to do what you are trying this is meant as a VERY VERY last resort and agreed to by Gary .
91
26
160,003
private InputStream safeOpen ( String file ) { URL url = bundle . getEntry ( file ) ; if ( url != null ) { try { return url . openStream ( ) ; } catch ( IOException e ) { // if we get an IOException just return null for default page. } } return null ; }
Attempt to open the file in the bundle and return null if something goes wrong .
66
16
160,004
public static String parseTempPrefix ( String destinationName ) { //Temporary dests are of the form _Q/_T<Prefix>_<MEId><TempdestId> String prefix = null ; if ( destinationName != null && ( destinationName . startsWith ( SIMPConstants . TEMPORARY_PUBSUB_DESTINATION_PREFIX ) ) || destinationName . startsWith ( SIMPConst...
Used to extract the destination prefix component of a full temporary destination name .
168
14
160,005
public static void setGuaranteedDeliveryProperties ( ControlMessage msg , SIBUuid8 sourceMEUuid , SIBUuid8 targetMEUuid , SIBUuid12 streamId , SIBUuid12 gatheringTargetDestUuid , SIBUuid12 targetDestUuid , ProtocolType protocolType , byte protocolVersion ) { // Remote to local message properties msg . setGuaranteedSour...
Set up guaranteed delivery message properties . These are compulsory properties on a control message and are therefore set throughout the code . The method makes it easier to cope with new properties in the message .
206
37
160,006
@ Override // Don't log this call: Rely on 'intern(String, boolean)' to log the intern call and result. @ Trivial public String intern ( String value ) { return intern ( value , Util_InternMap . DO_FORCE ) ; }
Intern a string value . Do force the value to be interned .
58
14
160,007
public boolean isChanged ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isChanged" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "isChanged" , changed ) ; return changed ; }
Is the map fluffed up into a HashMap? d317373 . 1
87
16
160,008
public void setUnChanged ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setUnChanged" ) ; changed = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setUnChanged" ) ; }
Set the changed flag back to false if the map is written back to JMF
89
16
160,009
public void setChanged ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setChanged" ) ; changed = true ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "setChanged" ) ; }
Set the changed flag to true if the caller knows better than the map itself
86
15
160,010
public Object put ( String key , Object value ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "put" , new Object [ ] { key , PasswordUtils . replaceValueIfKeyIsPassword ( key , value ) } ) ; // If the value is null (which is allowed for a Map Message) we can't ...
Once we ve made one update others don t matter so save time by not checking . d317373 . 1
396
22
160,011
public void addWebServiceFeatureInfo ( String seiName , WebServiceFeatureInfo featureInfo ) { PortComponentRefInfo portComponentRefInfo = seiNamePortComponentRefInfoMap . get ( seiName ) ; if ( portComponentRefInfo == null ) { portComponentRefInfo = new PortComponentRefInfo ( seiName ) ; seiNamePortComponentRefInfoMap ...
Add a feature info to the PortComponentRefInfo if the target one does not exist a new one with that port component interface will be created
110
28
160,012
@ Trivial final String getName ( ) { Map < String , String > execProps = getExecutionProperties ( ) ; String taskName = execProps == null ? null : execProps . get ( ManagedTask . IDENTITY_NAME ) ; return taskName == null ? task . toString ( ) : taskName ; }
Returns the task name .
75
5
160,013
public static WASConfiguration getDefaultWasConfiguration ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getDefaultWasConfiguration()" ) ; WASConfiguration config = new WASConfiguration ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( )...
Create a new WASConfiguration object
105
6
160,014
public void performRecovery ( ObjectManagerState objectManagerState ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "performRecovery" , "ObjectManagerState=" + objectManagerState ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace ...
Called to perform recovery action during a warm start of the objectManager .
195
15
160,015
public void initialize ( CacheConfig cc ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "initialize" ) ; cacheConfig = cc ; if ( null != cc ) { try { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Initializing CacheUnit " + uniqueServerNameFQ ) ; nullRemoteServices . setCacheUnit ( uniqueServerNameFQ , this ) ;...
This is a helper method called by this CacheUnitImpl s constructor . It creates all the local objects - BatchUpdateDaemon InvalidationAuditDaemon and TimeLimitDaemon . These objects are used by all cache instances .
223
47
160,016
public void batchUpdate ( String cacheName , HashMap invalidateIdEvents , HashMap invalidateTemplateEvents , ArrayList pushEntryEvents ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "batchUpdate():" + cacheName ) ; invalidationAuditDaemon . registerInvalidations ( cacheName , invalidateIdEvents . values ( ) . ite...
This implements the method in the CacheUnit interface . It applies the updates to the local internal caches and the external caches . It validates timestamps to prevent race conditions .
296
35
160,017
public CacheEntry getEntry ( String cacheName , Object id , boolean ignoreCounting ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getEntry: {0}" , id ) ; DCache cache = ServerCache . getCache ( cacheName ) ; CacheEntry cacheEntry = null ; if ( cache != null ) { cacheEntry = ( CacheEntry ) cache . getEntry ( id ,...
This implements the method in the CacheUnit interface . This is called by DRSNotificationService and DRSMessageListener . A returned null indicates that the local cache should execute it and return the result to the coordinating CacheUnit .
147
46
160,018
public void setEntry ( String cacheName , CacheEntry cacheEntry ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setEntry: {0}" , cacheEntry . id ) ; cacheEntry = invalidationAuditDaemon . filterEntry ( cacheName , cacheEntry ) ; if ( cacheEntry != null ) { DCache cache = ServerCache . getCache ( cacheName ) ; cac...
This implements the method in the CacheUnit interface . This is called by DRSNotificationService and DRSMessageListener .
144
25
160,019
public void setExternalCacheFragment ( ExternalInvalidation externalCacheFragment ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "setExternalCacheFragment: {0}" , externalCacheFragment . getUri ( ) ) ; externalCacheFragment = invalidationAuditDaemon . filterExternalCacheFragment ( ServerCache . cache . getCacheNa...
This implements the method in the CacheUnit interface . This is called by DRSRemoteService and NullRemoteServices .
164
23
160,020
public void addAlias ( String cacheName , Object id , Object [ ] aliasArray ) { if ( id != null && aliasArray != null ) { DCache cache = ServerCache . getCache ( cacheName ) ; if ( cache != null ) { try { cache . addAlias ( id , aliasArray , false , false ) ; } catch ( IllegalArgumentException e ) { if ( tc . isDebugEn...
This implements the method in the CacheUnit interface . This is called to add alias ids for cache id .
124
22
160,021
public void removeAlias ( String cacheName , Object alias ) { if ( alias != null ) { DCache cache = ServerCache . getCache ( cacheName ) ; if ( cache != null ) { try { cache . removeAlias ( alias , false , false ) ; } catch ( IllegalArgumentException e ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Removing al...
This implements the method in the CacheUnit interface . This is called to remove alias ids from cache id .
108
22
160,022
public CommandCache getCommandCache ( String cacheName ) throws DynamicCacheServiceNotStarted , IllegalStateException { if ( servletCacheUnit == null ) { throw new DynamicCacheServiceNotStarted ( "Servlet cache service has not been started." ) ; } return servletCacheUnit . getCommandCache ( cacheName ) ; }
This implements the method in the CacheUnit interface . This is called to get Command Cache object .
70
19
160,023
public JSPCache getJSPCache ( String cacheName ) throws DynamicCacheServiceNotStarted , IllegalStateException { if ( servletCacheUnit == null ) { throw new DynamicCacheServiceNotStarted ( "Servlet cache service has not been started." ) ; } return servletCacheUnit . getJSPCache ( cacheName ) ; }
This implements the method in the CacheUnit interface . This is called to get JSP Cache object .
73
20
160,024
public Object createObjectCache ( String cacheName ) throws DynamicCacheServiceNotStarted , IllegalStateException { if ( objectCacheUnit == null ) { throw new DynamicCacheServiceNotStarted ( "Object cache service has not been started." ) ; } return objectCacheUnit . createObjectCache ( cacheName ) ; }
This implements the method in the CacheUnit interface . This is called to create object cache . It calls ObjectCacheUnit to perform this operation .
66
28
160,025
public EventSource createEventSource ( boolean createAsyncEventSource , String cacheName ) throws DynamicCacheServiceNotStarted { if ( objectCacheUnit == null ) { throw new DynamicCacheServiceNotStarted ( "Object cache service has not been started." ) ; } return objectCacheUnit . createEventSource ( createAsyncEventSou...
This implements the method in the CacheUnit interface . This is called to create event source object . It calls ObjectCacheUnit to perform this operation .
74
29
160,026
public DERObject toASN1Object ( ) { ASN1EncodableVector dev = new ASN1EncodableVector ( ) ; dev . add ( policyQualifierId ) ; dev . add ( qualifier ) ; return new DERSequence ( dev ) ; }
Returns a DER - encodable representation of this instance .
60
13
160,027
public void sendAckExpectedMessage ( long ackExpStamp , int priority , Reliability reliability , SIBUuid12 stream ) // not used for ptp throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendAckExpectedMessage" , new Object [ ] { new Long ( ackE...
sendAckExpectedMessage is called from SourceStream timer alarm
853
13
160,028
public void sendSilenceMessage ( long startStamp , long endStamp , long completedPrefix , boolean requestedOnly , int priority , Reliability reliability , SIBUuid12 stream ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "sendSilenceMessage" ...
sendSilenceMessage may be called from SourceStream when a Nack is recevied
711
18
160,029
protected void handleRollback ( LocalTransaction transaction ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "handleRollback" , transaction ) ; // Roll back the transaction if we created it. if ( transaction != null ) { try { transaction . rollback ( ) ; } catch ( SIE...
This method checks to see if rollback is required
185
10
160,030
public void updateTargetCellule ( SIBUuid8 targetMEUuid ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateTargetCellule" , targetMEUuid ) ; this . targetMEUuid = targetMEUuid ; sourceStreamManager . updateTargetCellule ( targetMEUuid ) ...
This method should only be called when the PtoPOutputHandler was created for a Link with an unknown targetCellule and WLM has now told us correct targetCellule .
131
36
160,031
public void updateRoutingCellule ( SIBUuid8 routingME ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "updateRoutingCellule" , routingME ) ; this . routingMEUuid = routingME ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc...
This method should only be called when the PtoPOutputHandler was created for a Link . It is called every time a message is sent
107
28
160,032
public void enqueueWork ( AsyncUpdate unit ) throws ClosedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "enqueueWork" , unit ) ; synchronized ( this ) { if ( closed ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit (...
Enqueue an AsyncUpdate
352
6
160,033
private void startExecutingUpdates ( ) throws ClosedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "startExecutingUpdates" ) ; // swap the enqueuedUnits and executingUnits. ArrayList temp = executingUnits ; executingUnits = enqueuedUnits ; enqueuedUnits = tem...
Internal method . Should be called from within a synchronized block .
362
12
160,034
public void alarm ( Object thandle ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "alarm" , new Object [ ] { this , mp . getMessagingEngineUuid ( ) } ) ; synchronized ( this ) { if ( ! closed ) { if ( ( executeSinceExpiry ) || executing ) { // has committed recently ...
end class ExecutionThread ...
237
5
160,035
public void waitTillAllUpdatesExecuted ( ) throws InterruptedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "waitTillAllUpdatesExecuted" ) ; synchronized ( this ) { while ( enqueuedUnits . size ( ) > 0 || executing ) { try { this . wait ( ) ; } catch ( Interr...
This method blocks till there are 0 enqueued updates and 0 executing updates . Useful for unit testing .
194
21
160,036
public Throwable getRootCause ( ) { Throwable root = getError ( ) ; while ( true ) { if ( root instanceof ServletException ) { ServletException se = ( ServletException ) _error ; Throwable seRoot = se . getRootCause ( ) ; if ( seRoot == null ) { return root ; } else if ( seRoot . equals ( root ) ) { //prevent possible ...
Get the original cause of the error . Use of ServletExceptions by the engine to rethrow errors can cause the original error to be buried within one or more exceptions . This method will sift through the wrapped ServletExceptions to return the original error .
110
53
160,037
protected void activate ( ComponentContext context ) { securityServiceRef . activate ( context ) ; unauthSubjectServiceRef . activate ( context ) ; authServiceRef . activate ( context ) ; credServiceRef . activate ( context ) ; }
Called during service activation .
48
6
160,038
protected void initialise ( String logFileName , int logFileType , java . util . Map objectStoreLocations , ObjectManagerEventCallback [ ] callbacks ) throws ObjectManagerException { final String methodName = "initialise" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cc...
Create a handle for the ObjectManagerState and initialise it of necessary .
502
15
160,039
protected ObjectManagerState createObjectManagerState ( String logFileName , int logFileType , java . util . Map objectStoreLocations , ObjectManagerEventCallback [ ] callbacks ) throws ObjectManagerException { return new ObjectManagerState ( logFileName , this , logFileType , objectStoreLocations , callbacks ) ; }
Instantiate the ObjectManagerState . A subclass of ObjectManager should override this method if a subclass of ObjecManagerState is required .
69
27
160,040
public final boolean warmStarted ( ) { final String methodName = "warmStarted" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName ) ; boolean isWarmStarted = false ; if ( objectManagerState . state == ObjectManagerState . stateWarmStarted ) isWarmStarted ...
returns true if the objectManager was warm started .
141
11
160,041
public final void shutdown ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "shutdown" ) ; objectManagerState . shutdown ( ) ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "...
Terminates the ObjectManager .
92
6
160,042
public final void shutdownFast ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "shutdownFast" ) ; if ( ! testInterfaces ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cclass , "sh...
Terminates the ObjectManager without taking a checkpoint . The allows the ObjectManager to be restarted as if it had crashed and is only intended for testing emergency restart .
173
33
160,043
public final void waitForCheckpoint ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "waitForCheckpoint" ) ; if ( ! testInterfaces ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . exit ( this , cc...
Waits for one checkpoint to complete .
179
8
160,044
public final Transaction getTransaction ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getTransaction" ) ; // If the log is full introduce a delay for a checkpoiunt before allowing the // application to proceed. objectManagerSt...
Factory method to crate a new transaction for use with the ObjectManager .
145
14
160,045
public final Transaction getTransactionByXID ( byte [ ] XID ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getTransactionByXID" , "XIDe=" + XID + "(byte[]" ) ; Transaction transaction = objectManagerState . getTransactionByXID ( ...
Locate a transaction registered with this ObjectManager . with the same XID as the one passed . If a null XID is passed this will return any registered transaction with a null XID .
145
39
160,046
public final java . util . Iterator getTransactionIterator ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getTransactionIterator" ) ; java . util . Iterator transactionIterator = objectManagerState . getTransactionIterator ( ) ...
Create an iterator over all transactions known to this ObjectManager . The iterator returned is safe against concurrent modification of the set of transactions new transactions created after the iterator is created may not be covered by the iterator .
134
41
160,047
public final ObjectStore getObjectStore ( String objectStoreName ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getObjectStore" , "objectStoreName=" + objectStoreName + "(String)" ) ; ObjectStore objectStore = objectManagerState ...
Locate an ObjectStore used by this objectManager .
144
11
160,048
public final java . util . Iterator getObjectStoreIterator ( ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "getObjectStoreIterator" ) ; java . util . Iterator objectStoreIterator = objectManagerState . getObjectStoreIterator ( ) ...
Create an iterator over all ObjectStores known to this ObjectManager .
132
14
160,049
public final Token getNamedObject ( String name , Transaction transaction ) throws ObjectManagerException { final String methodName = "getNamedObject" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { name , transaction } ) ; // Is the...
Locate a Token by name within this objectManager .
261
11
160,050
public final Token removeNamedObject ( String name , Transaction transaction ) throws ObjectManagerException { final String methodName = "removeNamedObject" ; if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , methodName , new Object [ ] { name , transaction } ) ; Tok...
Remove a named ManagedObject locatable by name within this objectManager .
461
15
160,051
public final void setTransactionsPerCheckpoint ( long persistentTransactionsPerCheckpoint , long nonPersistentTransactionsPerCheckpoint , Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setTransactionsPerCh...
Create a named ManagedObject by name within this objectManager .
243
13
160,052
public final void setMaximumActiveTransactions ( int maximumActiveTransactions , Transaction transaction ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "setMaximumActiveTransactions" , new Object [ ] { new Integer ( maximumActiveT...
Change the maximum active transactrions that the ObjectManager will allow to start . If this call reduces the maximum then existing transactions continue but no new ones are allowed until the total has fallen below the new maximum .
187
42
160,053
public java . util . Map captureStatistics ( String name ) throws ObjectManagerException { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "captureStatistics" , new Object [ ] { name } ) ; java . util . Map statistics = new java . util . HashMap ( ) ; // To be retu...
Capture statistics .
448
3
160,054
public void registerEventCallback ( ObjectManagerEventCallback callback ) { if ( Tracing . isAnyTracingEnabled ( ) && trace . isEntryEnabled ( ) ) trace . entry ( this , cclass , "registerEventCallback" , callback ) ; objectManagerState . registerEventCallback ( callback ) ; if ( Tracing . isAnyTracingEnabled ( ) && tr...
Defect 495856 496893
101
8
160,055
public String getLogProviderDefinition ( BootstrapConfig bootProps ) { String logProvider = bootProps . get ( BOOTPROP_LOG_PROVIDER ) ; if ( logProvider == null ) logProvider = defaults . getProperty ( MANIFEST_LOG_PROVIDER ) ; if ( logProvider != null ) bootProps . put ( BOOTPROP_LOG_PROVIDER , logProvider ) ; return ...
Find and return the name of the log provider . Look in bootstrap properties first if not explicitly defined there get the default from the manifest .
93
28
160,056
public String getOSExtensionDefinition ( BootstrapConfig bootProps ) { String osExtension = bootProps . get ( BOOTPROP_OS_EXTENSIONS ) ; if ( osExtension == null ) { String normalizedName = getNormalizedOperatingSystemName ( bootProps . get ( "os.name" ) ) ; osExtension = defaults . getProperty ( MANIFEST_OS_EXTENSION ...
Find and return the name of the os extension . Look in bootstrap properties first if not explicitly defined there get the default from the manifest .
134
28
160,057
private TypeContainer getProperty ( String propName ) { TypeContainer container = cache . get ( propName ) ; if ( container == null ) { container = new TypeContainer ( propName , config , version ) ; TypeContainer existing = cache . putIfAbsent ( propName , container ) ; if ( existing != null ) { return existing ; } } ...
Gets the cached property container or make a new one cache it and return it
77
16
160,058
private void publishStartedEvent ( ) { BatchEventsPublisher publisher = getBatchEventsPublisher ( ) ; if ( publisher != null ) { publisher . publishSplitFlowEvent ( getSplitName ( ) , getFlowName ( ) , getTopLevelInstanceId ( ) , getTopLevelExecutionId ( ) , BatchEventsPublisher . TOPIC_EXECUTION_SPLIT_FLOW_STARTED , c...
Publish started event
95
4
160,059
private void publishEndedEvent ( ) { BatchEventsPublisher publisher = getBatchEventsPublisher ( ) ; if ( publisher != null ) { publisher . publishSplitFlowEvent ( getSplitName ( ) , getFlowName ( ) , getTopLevelInstanceId ( ) , getTopLevelExecutionId ( ) , BatchEventsPublisher . TOPIC_EXECUTION_SPLIT_FLOW_ENDED , corre...
Publish ended event
93
4
160,060
public void setHeaders ( Map < String , String > map ) { headers = new MetadataMap < String , String > ( ) ; for ( Map . Entry < String , String > entry : map . entrySet ( ) ) { String [ ] values = entry . getValue ( ) . split ( "," ) ; for ( String v : values ) { if ( v . length ( ) != 0 ) { headers . add ( entry . ge...
Sets the headers new proxy or WebClient instances will be initialized with .
104
15
160,061
public WebClient createWebClient ( ) { String serviceAddress = getAddress ( ) ; int queryIndex = serviceAddress != null ? serviceAddress . lastIndexOf ( ' ' ) : - 1 ; if ( queryIndex != - 1 ) { serviceAddress = serviceAddress . substring ( 0 , queryIndex ) ; } Service service = new JAXRSServiceImpl ( serviceAddress , g...
Creates a WebClient instance
280
6
160,062
public < T > T create ( Class < T > cls , Object ... varValues ) { return cls . cast ( createWithValues ( varValues ) ) ; }
Creates a proxy
36
4
160,063
public static final Object deserialize ( byte [ ] bytes ) throws Exception { final boolean trace = TraceComponent . isAnyTracingEnabled ( ) ; if ( trace && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "deserialize" ) ; Object o ; try { ByteArrayInputStream bis = new ByteArrayInputStream ( bytes ) ; ObjectInputStream oin...
Deserialize from an array of bytes .
225
9
160,064
public static final String getMessage ( String key , Object ... args ) { return NLS . getFormattedMessage ( key , args , key ) ; }
Get a translated message from J2CAMessages file .
32
13
160,065
public static final void logMessage ( Level level , String key , Object ... args ) { if ( WsLevel . AUDIT . equals ( level ) ) Tr . audit ( tc , key , args ) ; else if ( WsLevel . ERROR . equals ( level ) ) Tr . error ( tc , key , args ) ; else if ( Level . INFO . equals ( level ) ) Tr . info ( tc , key , args ) ; else...
Logs a message from the J2CAMessages file .
131
14
160,066
public static String getSessionID ( HttpServletRequest req ) { String sessionID = null ; final HttpServletRequest f_req = req ; try { sessionID = AccessController . doPrivileged ( new PrivilegedExceptionAction < String > ( ) { @ Override public String run ( ) throws Exception { HttpSession session = f_req . getSession ...
Return the session id if the request has an HttpSession otherwise return null .
480
16
160,067
public static String getRequestScheme ( HttpServletRequest req ) { String scheme ; if ( req . getScheme ( ) != null ) scheme = req . getScheme ( ) . toUpperCase ( ) ; else scheme = AuditEvent . REASON_TYPE_HTTP ; return scheme ; }
Get the scheme from the request - generally HTTP or HTTPS
65
11
160,068
public static String getRequestMethod ( HttpServletRequest req ) { String method ; if ( req . getMethod ( ) != null ) method = req . getMethod ( ) . toUpperCase ( ) ; else method = AuditEvent . TARGET_METHOD_GET ; return method ; }
Get the method from the request - generally GET or POST
62
11
160,069
@ Override public Object get ( ) { Object oObject = null ; synchronized ( this ) { // Check if any are free in the free hashtable if ( lastEntry > - 1 ) { // Free array has entries, get the last one. // remove last one for best performance oObject = free [ lastEntry ] ; free [ lastEntry ] = null ; if ( lastEntry == fir...
Gets an Object from the pool and returns it . If there are currently no entries in the pool then a new object will be created .
171
28
160,070
@ Override public Object put ( Object object ) { Object returnVal = null ; long currentTime = CHFWBundle . getApproxTime ( ) ; synchronized ( this ) { // get next free position, or oldest position if none free lastEntry ++ ; // If last entry is past end of array, go back to the beginning if ( lastEntry == poolSize ) { ...
Puts an Object into the free pool . If the free pool is full then this object will overlay the oldest object in the pool .
407
27
160,071
protected void putBatch ( Object [ ] objectArray ) { int index = 0 ; synchronized ( this ) { while ( index < objectArray . length && objectArray [ index ] != null ) { put ( objectArray [ index ] ) ; index ++ ; } } return ; }
Puts a set of Objects into the free pool . If the free pool is full then this object will overlay the oldest object in the pool .
58
29
160,072
public JsJmsMessage createJmsMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsMessage" ) ; JsJmsMessage msg = null ; try { msg = new JsJmsMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch ( MessageDecodeF...
Create a new empty null - bodied JMS Message . To be called by the API component .
180
20
160,073
public JsJmsBytesMessage createJmsBytesMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsBytesMessage" ) ; JsJmsBytesMessage msg = null ; try { msg = new JsJmsBytesMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ;...
Create a new empty JMS BytesMessage . To be called by the API component .
186
18
160,074
public JsJmsMapMessage createJmsMapMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsMapMessage" ) ; JsJmsMapMessage msg = null ; try { msg = new JsJmsMapMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } catch (...
Create a new empty JMS MapMessage . To be called by the API component .
186
17
160,075
public JsJmsObjectMessage createJmsObjectMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsObjectMessage" ) ; JsJmsObjectMessage msg = null ; try { msg = new JsJmsObjectMessageImpl ( MfpConstants . CONSTRUCTOR_NO_O...
Create a new empty JMS ObjectMessage . To be called by the API component .
186
17
160,076
public JsJmsStreamMessage createJmsStreamMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsStreamMessage" ) ; JsJmsStreamMessage msg = null ; try { msg = new JsJmsStreamMessageImpl ( MfpConstants . CONSTRUCTOR_NO_O...
Create a new empty JMS StreamMessage . To be called by the API component .
186
17
160,077
public JsJmsTextMessage createJmsTextMessage ( ) throws MessageCreateFailedException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "createJmsTextMessage" ) ; JsJmsTextMessage msg = null ; try { msg = new JsJmsTextMessageImpl ( MfpConstants . CONSTRUCTOR_NO_OP ) ; } ca...
Create a new empty JMS TextMessage . To be called by the API component .
186
17
160,078
private void saveDecryptedPositions ( ) { for ( int i = 0 ; i < decryptedNetPosInfo . length ; i ++ ) { decryptedNetPosInfo [ i ] = 0 ; } if ( null != getBuffers ( ) ) { WsByteBuffer [ ] buffers = getBuffers ( ) ; if ( buffers . length > decryptedNetPosInfo . length ) { decryptedNetPosInfo = new int [ buffers . length ...
Save the starting positions of the output buffers so that we can properly calculate the amount of data being returned by the read .
143
24
160,079
@ Override public VirtualConnection read ( long numBytes , TCPReadCompletedCallback userCallback , boolean forceQueue , int timeout ) { // Call the async read with a flag showing this was not done from a queued request. return read ( numBytes , userCallback , forceQueue , timeout , false ) ; }
Note a separate thread is not spawned to handle the decryption . The asynchronous behavior of this call will take place when the device side channel makes a nonblocking IO call and the request is potentially moved to a separate thread .
65
44
160,080
private void handleAsyncComplete ( boolean forceQueue , TCPReadCompletedCallback inCallback ) { boolean fireHere = true ; if ( forceQueue ) { // Complete must be returned on a separate thread. // Reuse queuedWork object (performance), but reset the error parameters. queuedWork . setCompleteParameters ( getConnLink ( ) ...
This method handles calling the complete method of the callback as required by an async read . Appropriate action is taken based on the setting of the forceQueue parameter . If it is true the complete callback is called on a separate thread . Otherwise it is called right here .
265
53
160,081
private void handleAsyncError ( boolean forceQueue , IOException exception , TCPReadCompletedCallback inCallback ) { boolean fireHere = true ; if ( forceQueue ) { // Error must be returned on a separate thread. // Reuse queuedWork object (performance), but reset the error parameters. queuedWork . setErrorParameters ( g...
This method handles errors when they occur during the code path of an async read . It takes appropriate action based on the setting of the forceQueue parameter . If it is true the error callback is called on a separate thread . Otherwise it is called right here .
273
51
160,082
public long readUnconsumedDecData ( ) { long totalBytesRead = 0L ; // Determine if data is left over from a former read request. if ( unconsumedDecData != null ) { // Left over data exists. Is there enough to satisfy the request? if ( getBuffer ( ) == null ) { // Caller needs us to allocate the buffer to return. if ( T...
This method is called when a read is requested . It checks to see if any data is left over from the previous read but there wasn t space in the buffers to store the result .
534
37
160,083
protected void getNetworkBuffer ( long requestedSize ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getNetworkBuffer: size=" + requestedSize ) ; } // Reset the netBuffer mark. this . netBufferMark = 0 ; int allocationSize = getConnLink ( ) . getPacketBufferSize ( ) ;...
Get the buffers that the device channel should read into . These buffers get reused over the course of multiple reads . The size of the buffers are determined by either the allocation size specified by the application channel or if that wasn t set the max packet buffer size specified in the SSL engine .
565
56
160,084
private void cleanupDecBuffers ( ) { // if we have decrypted buffers and they are either JIT created or made // during decryption/expansion (user buffers too small) then release them // here and dereference if ( null != this . decryptedNetBuffers && ( callerRequiredAllocation || decryptedNetBufferReleaseRequired ) ) { ...
Utility method to handle releasing the decrypted network buffers that we may or may not own at this point .
105
22
160,085
public void close ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "close, vc=" + getVCHash ( ) ) ; } synchronized ( closeSync ) { if ( closeCalled ) { return ; } closeCalled = true ; if ( null != this . netBuffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && t...
Release the potential buffer that were created
287
7
160,086
private SSLEngineResult doHandshake ( boolean async ) throws IOException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "doHandshake" ) ; } SSLEngineResult sslResult ; // Line up all the buffers needed for the SSL handshake. Temporary so // use indirect allocation for s...
When data is read there is always the change the a renegotiation will take place . If so this method will be called . Note it is used by both the sync and async writes .
475
37
160,087
protected ContextualStorage getContextualStorage ( boolean createIfNotExist , String clientWindowFlowId ) { //FacesContext facesContext = FacesContext.getCurrentInstance(); //String clientWindowFlowId = getCurrentClientWindowFlowId(facesContext); if ( clientWindowFlowId == null ) { throw new ContextNotActiveException (...
An implementation has to return the underlying storage which contains the items held in the Context .
152
17
160,088
protected void proxyReadHandshake ( ) { // setup the read buffer - use JIT on the first read attempt. If it // works, then any subsequent reads will use that same buffer. connLink . getReadInterface ( ) . setJITAllocateSize ( 1024 ) ; // reader.setBuffer(WsByteBufferPoolManagerImpl.getRef().allocate(1024)); if ( connLi...
Complete the proxy connect handshake by reading for the response and validating any data .
296
16
160,089
protected int checkResponse ( TCPReadRequestContext rsc ) { // Parse the proxy server response // WsByteBuffer [ ] buffers = rsc . getBuffers ( ) ; // check if the correct response was received if ( null == buffers ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Could...
Check for a proxy handshake response .
135
7
160,090
protected void releaseProxyWriteBuffer ( ) { WsByteBuffer buffer = connLink . getWriteInterface ( ) . getBuffer ( ) ; if ( null != buffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Releasing proxy write buffer: " + buffer ) ; } buffer . release ( ) ; connLink . g...
Release the proxy connect write buffer .
100
7
160,091
protected void releaseProxyReadBuffer ( ) { WsByteBuffer buffer = connLink . getReadInterface ( ) . getBuffer ( ) ; if ( null != buffer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Releasing proxy read buffer: " + buffer ) ; } buffer . release ( ) ; connLink . getR...
Release the proxy connect read buffer .
100
7
160,092
protected boolean containsHTTP200 ( byte [ ] data ) { boolean rc = true ; // byte comparison to check for HTTP and 200 in the response // this code is not pretty, it is designed to be fast // code assumes that HTTP/1.0 200 will be contained in one buffer // if ( data . length < 12 || data [ 0 ] != ' ' || data [ 1 ] != ...
Checks if the byte array contains HTTP 200 in a byte array .
173
14
160,093
protected void readProxyResponse ( VirtualConnection inVC ) { int size = 1 ; if ( ! this . isProxyResponseValid ) { // we need at least 12 bytes for the first line size = 12 ; } if ( connLink . isAsyncConnect ( ) ) { VirtualConnection vcRC = connLink . getReadInterface ( ) . read ( size , this . proxyReadCB , false , T...
Start a read for the response from the target proxy this is either the first read or possibly secondary ones if necessary .
236
23
160,094
public synchronized void setDefaultDestLimits ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "setDefaultDestLimits" ) ; // Defaults are based on those defined to the ME, the low is 80% of the high // Use setDestLimits() to set the initi...
Set the default limits for this itemstream
169
8
160,095
public long getDestHighMsgs ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestHighMsgs" ) ; SibTr . exit ( tc , "getDestHighMsgs" , Long . valueOf ( _destHighMsgs ) ) ; } return _destHighMsgs ; }
Gets the destination high messages limit currently being used by this localization .
87
14
160,096
public long getDestLowMsgs ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getDestLowMsgs" ) ; SibTr . exit ( tc , "getDestLowMsgs" , Long . valueOf ( _destLowMsgs ) ) ; } return _destLowMsgs ; }
Gets the destination low messages limit currently being used by this localization .
87
14
160,097
public void fireDepthThresholdReachedEvent ( ControlAdapter cAdapter , boolean reachedHigh , long numMsgs , long msgLimit ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "fireDepthThresholdReachedEvent" , new Object [ ] { cAdapter , new Boolean ( reachedHigh ) , new L...
Fire an event notification of type TYPE_SIB_MESSAGEPOINT_DEPTH_THRESHOLD_REACHED
864
29
160,098
private void reschedule ( ) { // set up a daily roll Calendar cal = Calendar . getInstance ( ) ; long today = cal . getTimeInMillis ( ) ; // adjust to somewhere after midnight of the next day cal . set ( Calendar . HOUR_OF_DAY , 0 ) ; cal . set ( Calendar . MINUTE , 0 ) ; cal . add ( Calendar . DATE , 1 ) ; long tomorr...
Reschedule the task for midnight - ish the next day .
135
14
160,099
@ Override public void run ( ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) // F743-425.CodRev Tr . entry ( tc , "run: " + ivTimer . ivTaskId ) ; // F743-425.CodRev if ( serverStopping ) { if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , ...
Executes the timer work with configured retries .
725
10