清单8中的代码为队列定义了适当的行为。
可是,这些较大的平均窗口也意味着SACK接收代码需要对收到的每个包做很多工作,因为需要扫描的队列包含更多的包。
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.
事实上,大多数应用程序代码从来不需要知道对象是否表示队列或主题,甚至不需要知道使用的是哪一个供应商的提供程序。
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.
在清单5所示的代码片段中,进程创建了一个可包含20个整数的消息队列。
Listing 5 shows a code snippet in which a process has created a message queue of 20 integers.
侦听发送到输入队列的消息的某个后端守护程序进程将接收此消息,并将其分派到可以处理此消息的某段代码。
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.
代码样本显示了EJB组件如何使用连接对象来访问消息队列资源。
This code sample shows how an EJB component might access a message queue resource, using connection objects.
在旧的规范下,必须专门为队列或主题编写应用程序代码,因为类本身是特定于域的。
Under the older specification, the application code had to be written specifically for queues or topics because the classes themselves were domain-specific.
也许会通过应用程序的代码在数据库更新失败的时候“撤销”对队列的操作。
Perhaps the application code will try to "undo" the queue operation if the database update fails.
向一个sqs队列写一条消息需要三行代码。
Writing a message to an SQS queue takes three lines of code.
因为线程执行的是相同的代码,所以它们应作出类似的动态优先级调整并在相同的运行队列中轮替执行。
Because the threads execute identical code, they should have similar dynamic priority adjustments and execute in a round-robin fashion from the same run-queues.
数据流充当值的绑定队列,因此可以通过代码定义的结构灌注数据,保留相同的有益属性。
Dataflow streams act as bounded queues of values, so data can be poured through the structure defined by the code, maintaining many of the same beneficial properties.
虽然AWSSDK提供大量其他功能和特性,目前为止的代码是您读写消息到SQS队列所需的一切。
While the AWS SDK provides a number of other functions and features, the code so far is all you need to read and write messages to SQS queues.
对于这个示例,有更多的代码需要说明,但与第一个线程示例相比,它并没有复杂多少,这正是因为使用了队列模块。
This example has a bit more code to explain, but it isn't that much more complicated than the first threading example, thanks to the use of the queuing module.
处理代码将处理请求,并准备要发送到输出队列的响应消息。
The handling code would process the request and prepare some response message that is posted to an output queue.
从这里,您的代码同样使用JNDI访问JMS连接代理和jms队列,并且使用它们来发送和接收消息。
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.
下面是显示消息队列提供者束如何以束服务的形式提供消息队列框架功能的源代码。
Following is the source code showing how message queue provider Bundle provides message queue framework functions in the form of a Bundle service.
该代码从对话框中获得订阅名、要使用的队列管理器以及要发送消息的队列名。
The code gets the subscription name, the queue manager to use, and the queue name to send the message from the dialog.
就这么简单—将一条消息放到sqs队列仅需要那三行代码。
That's it - it took just those three lines of code to place a message on an SQS queue.
客户机代码将轮询输出队列以获得响应,或等待响应消息交付时的回调通知。
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.
发布者的代码与点到点应用程序的对应项完全一样,这是因为JMS 1.1API允许使用可以产生发布到队列和主题的消息的JMS代码。
The code for the publisher is identical to that of the point-to-point application, because the JMS 1.1 API enables JMS code that can produce messages onto either a queue or a topic.
本文中列出的一个进程间通信(Inter - Process Communication,IPC)消息队列示例代码将向您展示如何来解决此问题。
An Inter-Process Communication (IPC) message queues sample code listed in this article to show you how to work around it.
您可以在一行代码中使用这个gem清除所有任务和实现优先级队列,这样您的重要任务就不需要在例程作业后等待了。
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.
客户端部署描述符,在一个称为application-client.xml的文件中,包含对用于上述代码中JMS连接工厂和队列中JNDI名称的引用。
The client deployment descriptor, in a file called application-client.xml, contains references to the JNDI names of the JMS connection factory and queue that are used in the above code.
现在,使用清单14中的代码将包含购买订单的消息发送到AmazonSQS队列。
Now, send the message containing the purchase order to the Amazon SQS queue using the code in Listing 14.
现在,我们不是在代码中直接使用队列和主题,而是使用通用基类(例如Destination)来产生消息。
Now, instead of using queues and topics directly in the code, we can use generic base classes, such as Destination, to produce the message.
使用JNDI可以让您随时调整服务器上的JMS主题或队列的位置和实现,而不必修改您的代码。
Using JNDI allows you to change the locations and implementations of your topics or queues on the server without having to update any of your code.
然后,该代码调用send()方法,这个方法将发送指定队列上的消息。
Then the code call the send() method, which will send that message on the specified queue.
本文研究了Python的线程,并且说明了如何使用队列来降低复杂性和减少细微的错误、并提高代码可读性的最佳实践。
This article explored threads in Python and demonstrated the best practice of using queues to allieviate complexity and subtle errors, and to promote readable code.
WebSphereMQ监视工具可能采取此操作,此类工具会在应用程序检索到相应的返回代码前检测到队列或介质已满的情况。
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.
下面是用于创建MQseriesQueueConnectionFactory和获取特定队列管理器连接的样本代码。
Here's the sample code to create an MQSeries QueueConnectionFactory and acquire a connection to a specific queue manager.
应用推荐