ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/dtaqseq.htm

62 lines
4.2 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="Sequential data queues" />
<meta name="abstract" content="Entries on a sequential data queue on the server are removed in first-in first-out (FIFO) or last-in first-out (LIFO) sequence." />
<meta name="description" content="Entries on a sequential data queue on the server are removed in first-in first-out (FIFO) or last-in first-out (LIFO) sequence." />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="dtaqseq" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Sequential data queues</title>
</head>
<body id="dtaqseq"><a name="dtaqseq"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Sequential data queues</h1>
<div><p>Entries on a sequential data queue on the server are removed in
first-in first-out (FIFO) or last-in first-out (LIFO) sequence.</p>
<div class="section"><p> The <a href="javadoc/com/ibm/as400/access/BaseDataQueue.html#NAVBAR_TOP"> BaseDataQueue</a> and <a href="javadoc/com/ibm/as400/access/DataQueue.html#NAVBAR_TOP"> DataQueue</a> classes provide the following methods for
working with sequential data queues:</p>
<ul><li><a href="javadoc/com/ibm/as400/access/DataQueue.html#CREATE(COM.IBM.AS400.ACCESS.DATAQUEUEATTRIBUTES)"> Create</a> a data queue on the server. The Java™ program
must specify the maximum size of an entry on the data queue. The Java program
can optionally specify additional data queue parameters (FIFO vs LIFO, save
sender information, specify authority information, force to disk, and provide
a queue description) when the queue is created.</li>
<li><a href="javadoc/com/ibm/as400/access/DataQueue.html#PEEK()"> Peek</a> at an entry on the data queue without removing
it from the queue. The Java program can wait or return immediately
if no entry is currently on the queue.</li>
<li><a href="javadoc/com/ibm/as400/access/DataQueue.html#READ()"> Read</a> an entry off the queue. The Java program
can wait or return immediately if no entry is available on the queue.</li>
<li><a href="javadoc/com/ibm/as400/access/DataQueue.html#WRITE(BYTE[])"> Write</a> an entry to the queue.</li>
<li><a href="javadoc/com/ibm/as400/access/BaseDataQueue.html#CLEAR()">Clear</a> all entries from the queue.</li>
<li><a href="javadoc/com/ibm/as400/access/BaseDataQueue.html#DELETE()"> Delete</a> the queue.</li>
</ul>
<p>The BaseDataQueue class provides additional methods for retrieving
the attributes of the data queue.</p>
</div>
<div class="section"><h4 class="sectiontitle">Examples: Working with sequential data queues</h4><p>The
following sequential data queue examples illustrate how a producer puts items
on a data queue and how a consumer takes the items off the queue and processes
them:</p>
<blockquote><p><a href="dqproducerexample.htm#dqproducerexample">Example: Using DataQueue classes to put data on a queue</a></p>
<p><a href="dqconsumerexample.htm#dqconsumerexample">Example: Using DataQueue classes to read entries off a data queue</a></p>
</blockquote>
</div>
</div>
</body>
</html>