Date: Thu, 28 Mar 2024 16:18:01 +0000 (UTC) Message-ID: <49385513.41.1711642681946@e5a10724c66b> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_40_558612894.1711642681946" ------=_Part_40_558612894.1711642681946 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
For information on the APIs available to client applications, consult th= e RAMCloud doxygen docs, which are generated from the RAMCloud source code.= There are two ways you can access the doxygen docs:
=
make doc
in the RAMCloud directory. Then open the file docs/do=
xygen/index.html
in a Web browser.The doxygen documentation covers the entire source base, most of which i=
s internal RAMCloud classes that are not useful to application writers.&nbs=
p; The primary API documentation for client applications is that for the cl=
ass RAMCloud::RamCloud
(click on the Classes
tab =
at the top of the main page, then search down for the link to RAMClou=
d::RamCloud
). There is one method in this class for each RPC support=
ed by RAMCloud. These methods invoke RPCs synchronously: for example, the <=
code>createTable method will not return until the operation has comp=
leted and a response has been received from the coordinator.
You can also invoke any of the RAMCloud RPCs asynchronously, and it is r= elatively straightforward to manage multiple simultaneous outstanding RPCs.=
RAMCloud::CreateTableRpc
corres=
ponding to the createTable
method.RAMCloud::CreateTableRpc
; the constructor arguments a=
re the same as those for the synchronous method such as createTable. =
C
onstructing the Rpc object initiates the RPC, but does not wait for=
it to complete.RAMCloud::CreateTableRpc
support the follow=
ing methods:
wait
: waits synchronously for the RPC to completeisReady
: tests whether the RPC has completed, without bloc=
kingcancel
: aborts the RPC (deleting the object also has this =
effect)wait
method on an asynchronous Rpc ob=
ject, the RAMCloud poller will automatically be invoked. However, if your p=
rogram only calls isReady
to test for completion, then you mus=
t also occasionally invoke the RAMCloud poller. If you have created a RamCl=
oud object named rc
, the following statement will invoke the p=
oller: rc.clientContext->dispatch->=
poll();
isReady
method on an Rpc ob=
ject from time to time to ensure that the RPC "makes progress". Certain act=
ions, such as retrying RPCs after server failures, are invoked only f=
rom within isReady
.isReady
has returned true for an RPC, you should call=
wait
to complete the RPC. At this point, wait
is=
guaranteed not to block. There are two reasons for calling wait. First, this is the only way to get any results returned by the RPC. Sec=
ond, if the RPC completed with an error condition, this is the only way to =
find out about that error: wait
may throw exceptions, but isReady
never throws any exceptions.