The code in Listing 8 defines proper behavior for a queue.
清单8中的代码为队列定义了适当的行为。
However, those larger average Windows also mean the SACK receiving code needs to do a lot more work for every packet received as the queue to be scanned contains more packets.
可是,这些较大的平均窗口也意味着SACK接收代码需要对收到的每个包做很多工作,因为需要扫描的队列包含更多的包。
As before, the code begins by connecting to the queue manager and opening the queue handle, but this time for retrieving messages using the default queue definition.
和前面一样,该代码首先连接到队列管理器,并打开队列句柄,但这次是为了使用缺省队列定义接收消息。
In fact, most of the application code need never know whether the object represents a queue or a topic, or even which vendor's provider is being used.
事实上,大多数应用程序代码从来不需要知道对象是否表示队列或主题,甚至不需要知道使用的是哪一个供应商的提供程序。
Listing 5 shows a code snippet in which a process has created a message queue of 20 integers.
在清单5所示的代码片段中,进程创建了一个可包含20个整数的消息队列。
The code gets the subscription name, the queue manager to use, and the queue name to send the message from the dialog.
该代码从对话框中获得订阅名、要使用的队列管理器以及要发送消息的队列名。
Some back-end daemon process listening for messages posted to the input queue would receive the message and dispatch it to some piece of code capable of handling the message.
侦听发送到输入队列的消息的某个后端守护程序进程将接收此消息,并将其分派到可以处理此消息的某段代码。
Perhaps the application code will try to "undo" the queue operation if the database update fails.
也许会通过应用程序的代码在数据库更新失败的时候“撤销”对队列的操作。
To do that, I can take advantage of the fact that PHP is an interpreted language by storing PHP code in a queue in the database, then executing it later.
为此,可以利用一个事实:PHP是一种解释型语言。可以将PHP代码存储在数据库中的队列中,以后再执行它。
The handling code would process the request and prepare some response message that is posted to an output queue.
处理代码将处理请求,并准备要发送到输出队列的响应消息。
Writing a message to an SQS queue takes three lines of code.
向一个sqs队列写一条消息需要三行代码。
From there, your code works the same. It USES JNDI to access the JMS connection factory and JMS queue, and USES them to send and receive messages.
从这里,您的代码同样使用JNDI访问JMS连接代理和jms队列,并且使用它们来发送和接收消息。
That's it - it took just those three lines of code to place a message on an SQS queue.
就这么简单—将一条消息放到sqs队列仅需要那三行代码。
The client code would either poll the output queue for the response or wait for some kind of call-back notification when the response message has been delivered.
客户机代码将轮询输出队列以获得响应,或等待响应消息交付时的回调通知。
This gem lets you fire off jobs in one line of code and implements a priority queue so that your important jobs don't wait behind routine jobs.
您可以在一行代码中使用这个gem清除所有任务和实现优先级队列,这样您的重要任务就不需要在例程作业后等待了。
Then the code call the send() method, which will send that message on the specified queue.
然后,该代码调用send()方法,这个方法将发送指定队列上的消息。
This action may be used by WebSphere MQ monitoring tools that detect the queue or media full condition prior to the application receiving the return code.
WebSphereMQ监视工具可能采取此操作,此类工具会在应用程序检索到相应的返回代码前检测到队列或介质已满的情况。
In looking at the code, you can see that we added another instance of a queue, and then passed that queue into the first thread pool class, ThreadURL.
分析这段代码时您可以看到,我们添加了另一个队列实例,然后将该队列传递给第一个线程池类ThreadURL。
Now, send the message containing the purchase order to the Amazon SQS queue using the code in Listing 14.
现在,使用清单14中的代码将包含购买订单的消息发送到AmazonSQS队列。
Here's the sample code to create an MQSeries QueueConnectionFactory and acquire a connection to a specific queue manager.
下面是用于创建MQseriesQueueConnectionFactory和获取特定队列管理器连接的样本代码。
For example, as an alternative to calling some GetQuote method on an object instance, the client code might post a GetQuote message to an input queue.
例如,作为对对象实例调用某个GetQuote方法的备选方案,客户机代码可以将GetQuote消息传递到输入队列中。
The code in Listing 2 shows how to create the HTTP client for Amazon SQS and how to send a simple message to the queue.
清单2中的代码显示了如何为AmazonSQS创建HTTP客户端,以及如何向队列发送一个简单的消息。
Back in the RetrieveFromPool code, if an entry is not found in the queue, a new object is allocated via the AllocateObject method, as long as fewer than the maximum number of objects is available.
重新观察一下RetrieveFromPool代码,如果在队列中找不到项,则会通过AllocateObject方法分配一个新对象,前提是可用对象的数量低于最大数量。
The code in Listing 1 shows how to create the HTTP client for Amazon SQS, instantiate the CreateQueueRequest object, and invoke the queue creation request.
清单1中的代码显示了如何为AmazonSQS创建HTTP客户端、实例化CreateQueueRequest对象和调用队列创建请求。
In the code snippets for the application in Making use of Amazon SQS, notice the similarities between the handling of the connection to the local JMS queue and the connection to the Amazon SQS queue.
在使用AmazonSQS应用程序代码片段中,注意处理本地J MS队列连接和Amazon SQS队列连接之间的相似之处。
To drive the sample, you can use any application that puts a text message onto the queue, such as the amqsput sample included with WebSphere mq. Here is the MDB code.
要想驱动这个示例,可以使用任何能将一个文本消息放到队列上的应用程序,比如随websphere mq所带的amqsput示例。
The code in Listing 1 demonstrates how to locate a queue and QueueConnectionFactory, create a connection and a session, stuff the XML into a TextMessage, and send the message to the queue.
清单1中的代码说明了如何找到Queue和QueueConnectionFactory、如何创建连接和会话、如何将XML填充到TextMessage,以及如何将消息发送给队列。
Use the Synergy output monitoring code and the Ghosd visuals to track your focus and provide a visual queue to the current focus after a certain time threshold is reached.
使用Synergy输出监视代码和Ghosd视觉效果可以跟踪焦点,并在达到某个时间阈值后将显示效果提供给当前焦点。
The four remaining messages are automatically cleared by the message queue framework when they are expired. Following is the source code of both methods.
当其余四个消息过期时,消息队列框架会自动将其清除。
Using a dispatcher queue to execute the code in parallel with the caller and then an OS event to block a public method that waits for the result (assuming a synchronous future pattern).
使用一个dispatcherqueue来并行的执行调用者和被调用的代码,然后一个操作系统事件会阻塞一个等待结果的公共方法假定一个同步未来模式assuming a synchronous future pattern,看不懂,再汗一个-_- !
应用推荐