idx
int64
0
41.2k
question
stringlengths
73
5.81k
target
stringlengths
5
918
25,800
public static String [ ] extractList ( String input , char delimiter ) { int end = input . indexOf ( delimiter ) ; if ( - 1 == end ) { return new String [ ] { input . trim ( ) } ; } List < String > output = new LinkedList < String > ( ) ; int start = 0 ; do { output . add ( input . substring ( start , end ) . trim ( ) ...
Convert the input string to a list of strings based on the provided delimiter .
25,801
public static String extractKey ( String input ) { int index = input . indexOf ( '=' ) ; if ( - 1 == index ) { return input . trim ( ) ; } return input . substring ( 0 , index ) . trim ( ) ; }
Extract the key of a key = value pair contained withint the provided string . If no equals sign is found then the input is returned with white space trimmed .
25,802
public static String extractValue ( String input ) { int index = input . indexOf ( '=' ) + 1 ; if ( 0 == index || index >= input . length ( ) ) { return "" ; } return input . substring ( index ) . trim ( ) ; }
Extract the value of a key = value pair contained within the provided string . If no value exists then an empty string is returned .
25,803
private static synchronized Map < String , List < String > > load ( Map < String , Object > config , boolean start , boolean restart ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; if ( bTrace && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Loading CHFW config from " + config ) ; } Map < String ...
Load and possibly start the provided configuration information .
25,804
public static synchronized Map < String , List < String > > loadConfig ( Map < String , Object > config ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; boolean usingDelayed = false ; if ( null == config ) { if ( delayedConfig . isEmpty ( ) ) { return null ; } if ( bTrace && tc . isDebugEnabled ( )...
Using the provided configuration create or update channels chains and groups within the channel framework .
25,805
public static void stopChains ( List < String > chains , long timeout , final Runnable runOnStop ) { if ( null == chains || chains . isEmpty ( ) ) { return ; } final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; final ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; final long qui...
Utility method that stops any of the chains created by the configuration that might still be running . The provided timeout is used to quiesce any active connections on the chains .
25,806
private static List < String > loadFactories ( Map < String , String [ ] > factories ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; final ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; List < String > createdFactories = new ArrayList < String > ( factories . size ( ) ) ...
Load channel factories in the framework based on the provided factory configurations .
25,807
private static EndPointInfo defineEndPoint ( EndPointMgr epm , String name , String [ ] config ) { String host = null ; String port = null ; for ( int i = 0 ; i < config . length ; i ++ ) { String key = ChannelUtils . extractKey ( config [ i ] ) ; if ( "host" . equalsIgnoreCase ( key ) ) { host = ChannelUtils . extract...
Define a new endpoint definition using the input name and list of properties .
25,808
private static List < String > loadEndPoints ( Map < String , String [ ] > endpoints ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; final EndPointMgr epm = EndPointMgrImpl . getRef ( ) ; List < String > createdEndpoints = new ArrayList < String > ( endpoints . size ( ) ) ; for ( Entry < String , ...
Load chain endpoints based on the provided configuration .
25,809
private static void fireMissingEvent ( ) { if ( delayCheckSignaled ) { return ; } ScheduledEventService scheduler = CHFWBundle . getScheduleService ( ) ; if ( null != scheduler ) { delayCheckSignaled = true ; ChannelFrameworkImpl cf = ( ChannelFrameworkImpl ) ChannelFrameworkFactory . getChannelFramework ( ) ; schedule...
Fire the missing config delayed event .
25,810
private static void unloadChains ( Iterator < String > chains ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; final ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; List < String > runningChains = new LinkedList < String > ( ) ; while ( chains . hasNext ( ) ) { ChainData c...
Stop and unload any of the provided chain names that might exist and be currently running .
25,811
private static List < String > loadGroups ( Map < String , String [ ] > groups , boolean start , boolean restart ) { final boolean bTrace = TraceComponent . isAnyTracingEnabled ( ) ; final ChannelFramework cf = ChannelFrameworkFactory . getChannelFramework ( ) ; List < String > createdGroups = new ArrayList < String > ...
Load chain groups in the framework based on the provided group configurations .
25,812
public static synchronized void checkMissingConfig ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Checking for missing config" ) ; } if ( delayedConfig . isEmpty ( ) ) { return ; } delayCheckSignaled = false ; final ChannelFramework cf = ChannelFrameworkFactory . g...
Check and report on any missing configuration .
25,813
public Object getObjectInstance ( Object obj , Name name , Context nameCtx , Hashtable < ? , ? > environment ) throws Exception { AmbiguousEJBReferenceException ambiguousEx ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "getObjectInstance : " + obj ) ; if ( ! ( obj instan...
The method is part of the java . naming . spi . ObjectFactory interface and is invoked by javax . naming . spi . NamingManager to process a Reference object .
25,814
private LocalThreadObjectPool getThreadLocalObjectPool ( ) { if ( threadPoolSize <= 0 ) { return null ; } LocalThreadObjectPool localPool = null ; if ( threadLocals != null ) { localPool = threadLocals . get ( ) ; if ( localPool == null ) { localPool = new LocalThreadObjectPool ( threadPoolSize , null , destroyer ) ; t...
get a local thread specific pool . To be used for threads that frequently access this pool system .
25,815
public void removeFromInUse ( Object o ) { if ( null == o ) { throw new NullPointerException ( ) ; } if ( inUseTracking ) { inUseTable . remove ( o ) ; } }
remove the object from the inUse before normal release processing would remove it . To be used in when some other code knows that leaving it in the InUse table would create false - positive leak detection hits .
25,816
public void purgeThreadLocal ( ) { if ( null != threadLocals ) { LocalThreadObjectPool pool = threadLocals . get ( ) ; if ( null != pool ) { Object [ ] data = pool . purge ( ) ; if ( 0 < data . length ) { mainPool . putBatch ( data ) ; } } } }
This is used to purge the ThreadLocal level information back to the main group when the thread is being killed off .
25,817
public void batchUpdate ( HashMap invalidateIdEvents , HashMap invalidateTemplateEvents , ArrayList pushEntryEvents , ArrayList aliasEntryEvents ) { notificationService . batchUpdate ( invalidateIdEvents , invalidateTemplateEvents , pushEntryEvents , aliasEntryEvents , cacheUnit ) ; }
This allows the BatchUpdateDaemon to send its batch update events to all CacheUnits .
25,818
private boolean isOsgiApp ( IServletContext isc ) { Object bundleCtxAttr = isc . getAttribute ( BUNDLE_CONTEXT_KEY ) ; Tr . debug ( tc , "Servet context attr for key = " + BUNDLE_CONTEXT_KEY + ", = " + bundleCtxAttr ) ; if ( bundleCtxAttr != null ) { return true ; } else { return false ; } }
Will look into this in the future hopefully .
25,819
private String getBindingName ( ResourceInfo resourceInfo ) { String destBindingName = null ; String link = resourceInfo . getLink ( ) ; if ( link == null ) { destBindingName = getBindingName ( resourceInfo . getName ( ) ) ; } else { destBindingName = InjectionEngineAccessor . getMessageDestinationLinkInstance ( ) . fi...
When a message - destination - link is available look up the binding from message destination link map . If that binding is not available default to the link name .
25,820
public static String getBindingName ( String name ) { if ( name . startsWith ( "java:" ) ) { int begin = "java:" . length ( ) ; int index = name . indexOf ( '/' , begin ) ; if ( index != - 1 ) { begin = index + 1 ; } if ( begin + "env/" . length ( ) <= name . length ( ) && name . regionMatches ( begin , "env/" , 0 , "e...
Determine the binding name that will be used for a reference name . This implements basically the same algorithm as default bindings in traditional WAS .
25,821
public void reset ( ) { this . location = 0 ; this . first_created = 0 ; this . expiration = - 1 ; this . validatorExpiration = - 1 ; this . tableid = 0 ; this . key = null ; this . value = null ; this . next = 0 ; this . previous = 0 ; this . valuelen = - 1 ; this . hash = 0 ; this . index = 0 ; this . size = - 1 ; th...
resets this HashtableEntry for reuse
25,822
static void rcvCreateUCTransaction ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvCreateUCTransaction" , new Object [ ] { request ...
Create an SIUncoordinatedTransaction .
25,823
static void rcvCommitTransaction ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvCommitTransaction" , new Object [ ] { request , co...
Commit the transaction provided by the client .
25,824
static void rcvRollbackTransaction ( CommsByteBuffer request , Conversation conversation , int requestNumber , boolean allocatedFromBufferPool , boolean partOfExchange ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "rcvRollbackTransaction" , new Object [ ] { request ...
Rollback the transaction provided by the client .
25,825
public String toPayloadString ( ) { String digits = "0123456789ABCDEF" ; StringBuilder retval = new StringBuilder ( "DataSlice@" ) ; retval . append ( hashCode ( ) ) ; retval . append ( "[" ) ; for ( int i = _offset ; i < ( _offset + _length ) ; i ++ ) { retval . append ( digits . charAt ( ( _bytes [ i ] >> 4 ) & 0xf )...
This method will output the contents of the slice designated by the provided offset and length .
25,826
public static String getClearHiddenCommandFormParamsFunctionName ( String formName ) { final char separatorChar = FacesContext . getCurrentInstance ( ) . getNamingContainerSeparatorChar ( ) ; if ( formName == null ) { return "'" + HtmlRendererUtils . CLEAR_HIDDEN_FIELD_FN_NAME + "_'+formName.replace(/-/g, '\\$" + separ...
Prefixes the given String with clear_ and removes special characters
25,827
public void eventPostCommitRemove ( Transaction tran ) throws SevereMessageStoreException { super . eventPostCommitRemove ( tran ) ; if ( stream != null ) stream . removeFromIndex ( this ) ; }
from its parent s stream s index .
25,828
public List < DataSlice > getPersistentData ( ) { List < DataSlice > slices = new ArrayList < DataSlice > ( 1 ) ; slices . add ( new DataSlice ( schema . toByteArray ( ) ) ) ; return slices ; }
The serialized form is wrapped in a DataSlice and returned in a single - entry List . SIB0112b . mfp . 1
25,829
public void restore ( List < DataSlice > slices ) { schema = JMFRegistry . instance . createJMFSchema ( slices . get ( 0 ) . getBytes ( ) ) ; }
Restore this item from serialized form
25,830
synchronized protected void addMessagingEngine ( final JsMessagingEngine messagingEngine ) throws ResourceException { final String methodName = "addMessagingEngine" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } if ( is...
If the messaging engine is one of the required set or there are no required messaging engines and there are no other connections then create a listener .
25,831
private boolean isListenerRequired ( final JsMessagingEngine messagingEngine ) throws ResourceException { final String methodName = "isListenerRequired" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } boolean listenerReq...
Determines if a listener is required for the given messaging engine .
25,832
private static String validateDestination ( final JsMessagingEngine messagingEngine , final String busName , final String destinationName , final DestinationType destinationType ) throws NotSupportedException , ResourceAdapterInternalException { final String methodName = "validateDestination" ; if ( TraceComponent . is...
Validates the given destination information with administration .
25,833
private Set getRequiredMessagingEngines ( final JsMessagingEngine messagingEngine ) throws NotSupportedException , ResourceAdapterInternalException { final String methodName = "getRequiredMessagingEngines" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , m...
Determines which of the local messaging engines the resource adapter should try and obtain connections to .
25,834
private void createListener ( final JsMessagingEngine messagingEngine ) throws ResourceException { final String methodName = "createListener" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } final SibRaMessagingEngineConn...
Creates a listener to the configured destination on the given messaging engine .
25,835
public synchronized void messagingEngineStopping ( final JsMessagingEngine messagingEngine , final int mode ) { final String methodName = "messagingEngineStopping" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new Object [ ] { messagingEngi...
Overrides the parent method so that if the messaging engine that is stopping was the any one messaging engine to which a connection had been made if there are still active messaging engines then connect to one of those instead .
25,836
public synchronized void messagingEngineInitializing ( final JsMessagingEngine messagingEngine ) { final String methodName = "messagingEngineInitializing" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } if ( _remoteMessa...
Notifies the listener that the given messaging engine is initializing .
25,837
public void messagingEngineDestroyed ( final JsMessagingEngine messagingEngine ) { final String methodName = "messagingEngineDestroyed" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , messagingEngine ) ; } final JsMessagingEngine [ ] localMes...
Notifies the listener that the given messaging engine is being destroyed .
25,838
synchronized void messagingEngineTerminated ( final SibRaMessagingEngineConnection connection ) { final String methodName = "messagingEngineTerminated" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , connection ) ; } if ( connection . equals ...
Indicates that the messaging engine for the given connection has terminated .
25,839
private void scheduleCreateRemoteListener ( ) { final String methodName = "scheduleCreateRemoteListener" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } _timer . schedule ( new TimerTask ( ) { public void run ( ) { createRemoteListenerDea...
Schedules the creation of a remote listener to take place after the retry interval .
25,840
private Message createMessageProxy ( Message msgObject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createMessageProxy" , msgObject ) ; Message retObj ; try { retObj = ( Message ) Proxy . newProxyInstance ( msgObject . getClass ( ) . getClassLoader ( ) , ms...
This method creates proxy for the given message object . This is used only in Async Send .. Hence this method is called only by client environments .
25,841
void checkNotClosed ( ) throws JMSException { int currentState ; synchronized ( stateLock ) { currentState = state ; } if ( currentState == CLOSED ) { throw ( javax . jms . IllegalStateException ) JmsErrorUtils . newThrowable ( javax . jms . IllegalStateException . class , "SESSION_CLOSED_CWSIA0049" , null , tc ) ; } }
This method is called at the beginning of every method that should not work if the Session has been closed . It prevents further execution by throwing a JMSException with a suitable I m closed message .
25,842
Map getPassThruProps ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getPassThruProps" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getPassThruProps" , passThruProps ) ; return passThruProps ; }
Return the passThruProps for this Session .
25,843
Object getAsyncDeliveryLock ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getAsyncDeliveryLock" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getAsyncDeliveryLock" , asyncDeliveryLock ) ; return ...
Returns the asyncDeliveryLock for this Session .
25,844
Connection getConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConnection" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getConnection" , connection ) ; return connection ; }
This method is used by the JmsMsgConsumerImpl . Consumer constructor to obtain a reference to the exception listener target .
25,845
SICoreConnection getCoreConnection ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getCoreConnection" ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getCoreConnection" , coreConnection ) ; return co...
Returns the coreConnection for this Connection
25,846
JmsMsgProducer instantiateProducer ( Destination jmsDestination ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "instantiateProducer" , jmsDestination ) ; JmsMsgProducer messageProducer = new JmsMsgProducerImpl ( jmsDestination , coreConnect...
This method is overriden by subclasses in order to instantiate an instance of the MsgProducer class . This means that the QueueSession . createSender method can delegate straight to Session . createProducer and still get back an instance of a QueueSender rather than a vanilla MessageProducer .
25,847
JmsMsgConsumer instantiateConsumer ( ConsumerProperties consumerProperties ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "instantiateConsumer" , consumerProperties ) ; JmsMsgConsumer messageConsumer = new JmsMsgConsumerImpl ( coreConnectio...
This method is overriden by subclasses in order to instantiate an instance of the MsgConsumer class . This means that the QueueSession . createReceiver method can delegate straight to Session . createConsumer and still get back an instance of a QueueReceiver rather than a vanilla MessageConsumer .
25,848
public int getProducerCount ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getProducerCount" ) ; int producerCount = producers . size ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getProducerCou...
Return a count of the number of Producers currently open on this Session .
25,849
public int getConsumerCount ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getConsumerCount" ) ; int consumerCount = syncConsumers . size ( ) ; consumerCount += asyncConsumers . size ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled...
Return a count of the number of Consumers currently open on this Session .
25,850
void removeProducer ( JmsMsgProducerImpl producer ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeProducer" , producer ) ; producers . remove ( producer ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , ...
This method is called by a JmsMsgProducer in order to remove itself from the list of Producers held by the Session .
25,851
void removeConsumer ( JmsMsgConsumerImpl consumer ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeConsumer" , consumer ) ; if ( ( acknowledgeMode == Session . DUPS_OK_ACKNOWLEDGE ) && ( uncommittedReceiveCount > 0 ) ) { commitTransact...
This method is called by a JmsMsgConsumer in order to remove itself from the list of consumers held by the Session .
25,852
void removeBrowser ( JmsQueueBrowserImpl browser ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "removeBrowser" , browser ) ; browsers . remove ( browser ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , ...
This method is called by a JmsQueueBrowser in order to remove itself from the list of Browsers held by the Session .
25,853
void notifyMessagePreConsume ( SITransaction transaction ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "notifyMessagePreConsume" , transaction ) ; if ( ! ( transaction instanceof SIXAResource ) ) { uncommittedReceiveCount ++ ; if ( TraceCo...
This method should be called when a message has been received by JMS consumer code but not yet delivered to user code .
25,854
void notifyMessagePostConsume ( ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "notifyMessagePostConsume" ) ; if ( ( acknowledgeMode == Session . DUPS_OK_ACKNOWLEDGE ) && ( uncommittedReceiveCount >= dupsCommitThreshold ) ) { commitTransact...
This method should be called when a previously received message has been delivered by JMS consumer code to user code .
25,855
int getAndResetCommitCount ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getAndResetCommitCount" ) ; int currentUncommittedReceiveCount = uncommittedReceiveCount ; uncommittedReceiveCount = 0 ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryE...
This method exists for the sole purpose of querying whether an application onMessage called recover under an auto_ack session . It returns the current value of the commit count and then zeros the value .
25,856
private SIDestinationAddress createTemporaryDestination ( Distribution destType , String prefix ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "createTemporaryDestination" , new Object [ ] { destType , prefix } ) ; SIDestinationAddress da =...
Handles the call to core connection in which the temporary destination gets created .
25,857
protected void deleteTemporaryDestination ( SIDestinationAddress dest ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "deleteTemporaryDestination" , dest ) ; try { getCoreConnection ( ) . deleteTemporaryDestination ( dest ) ; } catch ( SITem...
Handles the call to CoreConnection to delete a temporary destination .
25,858
boolean isAsync ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "isAsync" ) ; boolean isAsync = ! asyncConsumers . isEmpty ( ) && getState ( ) == STARTED ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "...
Test to see if any of the consumers of this session are using async message delivery .
25,859
void checkSynchronousUsage ( String methodName ) throws JMSException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "checkSynchronousUsage" , methodName ) ; if ( isAsync ( ) && ! Thread . holdsLock ( asyncDeliveryLock ) ) { throw ( JMSException ) JmsErrorUtils ....
Utility method to generate JMSExceptions if a synchronous method is called on an asynchronous session . This method should be called at the beginning of every method that should not work if the owning session is being used for asynchronous receipt .
25,860
void validateStopCloseForMessageListener ( String functionCall ) throws IllegalStateException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "validateStopForMessageListener" ) ; if ( ( JmsSessionImpl . asyncReceiverThreadLocal . get ( ) != null ) && ( JmsSession...
A message listener must not attempt to stop its own connection or context as this would lead to deadlock . IllegalStateException has to be thrown in case if it calls stop . THIS FUNCTION is called only in non - managed environments .
25,861
void addtoAsysncSendQueue ( JmsMsgProducerImpl msgProducer , CompletionListener cListner , Message msg , int sendMethodType , Object [ ] params ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "addtoAsysncSendQueue" , new Object [ ] { msgProducer , cListner , cL...
Adds AsynSend operation details to the Queue . This function would get called only in case of non - managed environements .
25,862
private AttributeDefinitionSpecification [ ] getADs ( boolean isRequired ) { AttributeDefinitionSpecification [ ] retVal = null ; Vector < AttributeDefinitionSpecification > vector = new Vector < AttributeDefinitionSpecification > ( ) ; for ( Map . Entry < String , AttributeDefinitionSpecification > entry : attributes ...
Helper method to filter between required and optional ADs
25,863
protected void cleanup ( ) { final String methodName = "cleanup" ; if ( TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } if ( _unsuccessfulMessages . size ( ) > 0 ) { try { try { SIUncoordinatedTransaction localTran = _connection . createUncoordinatedTransaction ( ) ; deleteMessages ( getM...
Invoked after all messages in the batch have been delivered . Unlocks any unsuccessful messages .
25,864
public Locale calculateLocale ( FacesContext facesContext ) { Application application = facesContext . getApplication ( ) ; for ( Iterator < Locale > requestLocales = facesContext . getExternalContext ( ) . getRequestLocales ( ) ; requestLocales . hasNext ( ) ; ) { Locale requestLocale = requestLocales . next ( ) ; for...
Get the locales specified as acceptable by the original request compare them to the locales supported by this Application and return the best match .
25,865
@ SuppressWarnings ( "unchecked" ) private JSONObject toJSONObjectForThrowable ( Map < String , ? > errorInfo , Throwable error ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( this , tc , "toJSONObjectForThrowable" , errorInfo , error ) ; LinkedHashMap < String , List < ? > >...
Populate JSON object for a top level exception or error .
25,866
private ScriptEngine getScriptEngine ( String value ) { String engineName = value . substring ( 0 , value . indexOf ( ":" ) ) ; if ( engines . containsKey ( engineName ) ) { return engines . get ( engineName ) ; } else { ScriptEngine engine = manager . getEngineByName ( engineName ) ; if ( engine != null ) { engines . ...
Parses table cell to get script engine
25,867
private Object getScriptResult ( String script , ScriptEngine engine ) throws ScriptException { String scriptToExecute = script . substring ( script . indexOf ( ":" ) + 1 ) ; return engine . eval ( scriptToExecute ) ; }
Evaluates the script expression
25,868
private Connection createConnection ( ) { try { EntityTransaction tx = this . em . getTransaction ( ) ; if ( isHibernatePresentOnClasspath ( ) && em . getDelegate ( ) instanceof Session ) { connection = ( ( SessionImpl ) em . unwrap ( Session . class ) ) . connection ( ) ; } else { tx . begin ( ) ; connection = em . un...
unfortunately there is no standard way to get jdbc connection from JPA entity manager
25,869
protected void compareData ( ITable expectedTable , ITable actualTable , ComparisonColumn [ ] comparisonCols , FailureHandler failureHandler ) throws DataSetException { logger . debug ( "compareData(expectedTable={}, actualTable={}, " + "comparisonCols={}, failureHandler={}) - start" , new Object [ ] { expectedTable , ...
Same as DBUnitAssert with support for regex in row values
25,870
public static synchronized EntityManagerProvider instance ( String unitName , Map < String , String > overridingPersistenceProps ) { overridingProperties = overridingPersistenceProps ; return instance ( unitName ) ; }
Allows to pass in overriding Properties that may be specific to the JPA Vendor .
25,871
public void startWithInitialStateProbabilities ( Collection < S > initialStates , Map < S , Double > initialLogProbabilities ) { initializeStateProbabilities ( null , initialStates , initialLogProbabilities ) ; }
Lets the HMM computation start with the given initial state probabilities .
25,872
public void startWithInitialObservation ( O observation , Collection < S > candidates , Map < S , Double > emissionLogProbabilities ) { initializeStateProbabilities ( observation , candidates , emissionLogProbabilities ) ; }
Lets the HMM computation start at the given first observation and uses the given emission probabilities as the initial state probability for each starting state s .
25,873
public void nextStep ( O observation , Collection < S > candidates , Map < S , Double > emissionLogProbabilities , Map < Transition < S > , Double > transitionLogProbabilities , Map < Transition < S > , D > transitionDescriptors ) { if ( message == null ) { throw new IllegalStateException ( "startWithInitialStateProbab...
Processes the next time step . Must not be called if the HMM is broken .
25,874
private boolean hmmBreak ( Map < S , Double > message ) { for ( double logProbability : message . values ( ) ) { if ( logProbability != Double . NEGATIVE_INFINITY ) { return false ; } } return true ; }
Returns whether the specified message is either empty or only contains state candidates with zero probability and thus causes the HMM to break .
25,875
private ForwardStepResult < S , O , D > forwardStep ( O observation , Collection < S > prevCandidates , Collection < S > curCandidates , Map < S , Double > message , Map < S , Double > emissionLogProbabilities , Map < Transition < S > , Double > transitionLogProbabilities , Map < Transition < S > , D > transitionDescri...
Computes the new forward message and the back pointers to the previous states .
25,876
private S mostLikelyState ( ) { assert ! message . isEmpty ( ) ; S result = null ; double maxLogProbability = Double . NEGATIVE_INFINITY ; for ( Map . Entry < S , Double > entry : message . entrySet ( ) ) { if ( entry . getValue ( ) > maxLogProbability ) { result = entry . getKey ( ) ; maxLogProbability = entry . getVa...
Retrieves the first state of the current forward message with maximum probability .
25,877
private List < SequenceState < S , O , D > > retrieveMostLikelySequence ( ) { assert ! message . isEmpty ( ) ; final S lastState = mostLikelyState ( ) ; final List < SequenceState < S , O , D > > result = new ArrayList < > ( ) ; ExtendedState < S , O , D > es = lastExtendedStates . get ( lastState ) ; while ( es != nul...
Retrieves most likely sequence from the internal back pointer sequence .
25,878
private List < SequenceState < State , Observation , Path > > computeViterbiSequence ( List < TimeStep < State , Observation , Path > > timeSteps , int originalGpxEntriesCount , QueryGraph queryGraph ) { final HmmProbabilities probabilities = new HmmProbabilities ( measurementErrorSigma , transitionProbabilityBeta ) ; ...
Computes the most likely candidate sequence for the GPX entries .
25,879
private Map < String , EdgeIteratorState > createVirtualEdgesMap ( List < Collection < QueryResult > > queriesPerEntry , EdgeExplorer explorer ) { Map < String , EdgeIteratorState > virtualEdgesMap = new HashMap < > ( ) ; for ( Collection < QueryResult > queryResults : queriesPerEntry ) { for ( QueryResult qr : queryRe...
Returns a map where every virtual edge maps to its real edge with correct orientation .
25,880
public double transitionLogProbability ( double routeLength , double linearDistance ) { Double transitionMetric = Math . abs ( linearDistance - routeLength ) ; return Distributions . logExponentialDistribution ( beta , transitionMetric ) ; }
Returns the logarithmic transition probability density for the given transition parameters .
25,881
public Key register ( Watchable watchable , Iterable < ? extends WatchEvent . Kind < ? > > eventTypes ) throws IOException { checkOpen ( ) ; return new Key ( this , watchable , eventTypes ) ; }
Registers the given watchable with this service returning a new watch key for it . This implementation just checks that the service is open and creates a key ; subclasses may override it to do other things as well .
25,882
public DirectoryEntry lookUp ( File workingDirectory , JimfsPath path , Set < ? super LinkOption > options ) throws IOException { checkNotNull ( path ) ; checkNotNull ( options ) ; DirectoryEntry result = lookUp ( workingDirectory , path , options , 0 ) ; if ( result == null ) { throw new NoSuchFileException ( path . t...
Returns the result of the file lookup for the given path .
25,883
private DirectoryEntry lookUp ( File dir , Iterable < Name > names , Set < ? super LinkOption > options , int linkDepth ) throws IOException { Iterator < Name > nameIterator = names . iterator ( ) ; Name name = nameIterator . next ( ) ; while ( nameIterator . hasNext ( ) ) { Directory directory = toDirectory ( dir ) ; ...
Looks up the given names against the given base file . If the file is not a directory the lookup fails .
25,884
private DirectoryEntry followSymbolicLink ( File dir , SymbolicLink link , int linkDepth ) throws IOException { if ( linkDepth >= MAX_SYMBOLIC_LINK_DEPTH ) { throw new IOException ( "too many levels of symbolic links" ) ; } return lookUp ( dir , link . target ( ) , Options . FOLLOW_LINKS , linkDepth + 1 ) ; }
Returns the directory entry located by the target path of the given symbolic link resolved relative to the given directory .
25,885
private static boolean isValidFileSystemUri ( URI uri ) { return isNullOrEmpty ( uri . getPath ( ) ) && isNullOrEmpty ( uri . getQuery ( ) ) && isNullOrEmpty ( uri . getFragment ( ) ) ; }
Returns whether or not the given URI is valid as a base file system URI . It must not have a path query or fragment .
25,886
private static URI toFileSystemUri ( URI uri ) { try { return new URI ( uri . getScheme ( ) , uri . getUserInfo ( ) , uri . getHost ( ) , uri . getPort ( ) , null , null , null ) ; } catch ( URISyntaxException e ) { throw new AssertionError ( e ) ; } }
Returns the given URI with any path query or fragment stripped off .
25,887
@ SuppressWarnings ( "unused" ) public static Runnable removeFileSystemRunnable ( final URI uri ) { return new Runnable ( ) { public void run ( ) { fileSystems . remove ( uri ) ; } } ; }
Returns a runnable that when run removes the file system with the given URI from this provider .
25,888
public static JimfsFileSystem newFileSystem ( JimfsFileSystemProvider provider , URI uri , Configuration config ) throws IOException { PathService pathService = new PathService ( config ) ; FileSystemState state = new FileSystemState ( removeFileSystemRunnable ( uri ) ) ; JimfsFileStore fileStore = createFileStore ( co...
Initialize and configure a new file system with the given provider and URI using the given configuration .
25,889
private static JimfsFileStore createFileStore ( Configuration config , PathService pathService , FileSystemState state ) { AttributeService attributeService = new AttributeService ( config ) ; HeapDisk disk = new HeapDisk ( config ) ; FileFactory fileFactory = new FileFactory ( disk ) ; Map < Name , Directory > roots =...
Creates the file store for the file system .
25,890
private static FileSystemView createDefaultView ( Configuration config , JimfsFileStore fileStore , PathService pathService ) throws IOException { JimfsPath workingDirPath = pathService . parsePath ( config . workingDirectory ) ; Directory dir = fileStore . getRoot ( workingDirPath . root ( ) ) ; if ( dir == null ) { t...
Creates the default view of the file system using the given working directory .
25,891
public synchronized void allocate ( RegularFile file , int count ) throws IOException { int newAllocatedBlockCount = allocatedBlockCount + count ; if ( newAllocatedBlockCount > maxBlockCount ) { throw new IOException ( "out of disk space" ) ; } int newBlocksNeeded = Math . max ( count - blockCache . blockCount ( ) , 0 ...
Allocates the given number of blocks and adds them to the given file .
25,892
public static ImmutableSet < OpenOption > getOptionsForChannel ( Set < ? extends OpenOption > options ) { if ( options . isEmpty ( ) ) { return DEFAULT_READ ; } boolean append = options . contains ( APPEND ) ; boolean write = append || options . contains ( WRITE ) ; boolean read = ! write || options . contains ( READ )...
Returns an immutable set of open options for opening a new file channel .
25,893
@ SuppressWarnings ( "unchecked" ) public static ImmutableSet < OpenOption > getOptionsForInputStream ( OpenOption ... options ) { boolean nofollowLinks = false ; for ( OpenOption option : options ) { if ( checkNotNull ( option ) != READ ) { if ( option == LinkOption . NOFOLLOW_LINKS ) { nofollowLinks = true ; } else {...
Returns an immutable set of open options for opening a new input stream .
25,894
public static ImmutableSet < OpenOption > getOptionsForOutputStream ( OpenOption ... options ) { if ( options . length == 0 ) { return DEFAULT_WRITE ; } ImmutableSet < OpenOption > result = addWrite ( Arrays . asList ( options ) ) ; if ( result . contains ( READ ) ) { throw new UnsupportedOperationException ( "'READ' n...
Returns an immutable set of open options for opening a new output stream .
25,895
public static ImmutableSet < CopyOption > getMoveOptions ( CopyOption ... options ) { return ImmutableSet . copyOf ( Lists . asList ( LinkOption . NOFOLLOW_LINKS , options ) ) ; }
Returns an immutable set of the given options for a move .
25,896
public static ImmutableSet < CopyOption > getCopyOptions ( CopyOption ... options ) { ImmutableSet < CopyOption > result = ImmutableSet . copyOf ( options ) ; if ( result . contains ( ATOMIC_MOVE ) ) { throw new UnsupportedOperationException ( "'ATOMIC_MOVE' not allowed" ) ; } return result ; }
Returns an immutable set of the given options for a copy .
25,897
private void appendNormal ( char c ) { if ( REGEX_RESERVED . matches ( c ) ) { builder . append ( '\\' ) ; } builder . append ( c ) ; }
Appends the regex form of the given normal character from the glob .
25,898
private void appendSeparator ( ) { if ( separators . length ( ) == 1 ) { appendNormal ( separators . charAt ( 0 ) ) ; } else { builder . append ( '[' ) ; for ( int i = 0 ; i < separators . length ( ) ; i ++ ) { appendInBracket ( separators . charAt ( i ) ) ; } builder . append ( "]" ) ; } }
Appends the regex form matching the separators for the path type .
25,899
private void appendNonSeparator ( ) { builder . append ( "[^" ) ; for ( int i = 0 ; i < separators . length ( ) ; i ++ ) { appendInBracket ( separators . charAt ( i ) ) ; } builder . append ( ']' ) ; }
Appends the regex form that matches anything except the separators for the path type .