env_set_rpc_server.html   [plain text]


<!--"@(#)env_set_rpc_server.so	10.1 (Sleepycat) 8/25/99"-->
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DbEnv.set_rpc_server</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td>
<h1>DbEnv.set_rpc_server</h1>
</td>
<td align=right>
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<hr size=1 noshade>
<tt>
<h3><pre>
import com.sleepycat.db.*;
<p>
public void set_rpc_server(DbClient client,
  String host, long cl_timeout, long sv_timeout, int flags)
    throws DbException;
</pre></h3>
<h1>Description</h1>
<p>Establishes a connection for this <b>dbenv</b> to a RPC server.  If
the <b>client</b> argument is NULL, this call creates a connection to
the Berkeley DB server on the indicated hostname and sets up a channel for
communication.
The <b>client</b> argument is reserved for future use.
If it is not NULL, an exception is thrown.
<a name="3"><!--meow--></a>
<p>The <b>cl_timeout</b> argument specifies the number of seconds the client
should wait for results to come back from the server.  Once the timeout
has expired on any communication with the server, Db.DB_NOSERVER will
be returned.  If this value is zero, a default timeout is used.
<a name="4"><!--meow--></a>
<p>The <b>sv_timeout</b> argument specifies the number of seconds the server
should allow a client connection to remain idle before assuming that the
client is gone.  Once that timeout has been reached, the server releases
all resources associated with that client connection.  Subsequent attempts
by that client to communicate with the server result in
Db.DB_NOSERVER_ID, indicating that an invalid identifier has been
given to the server.  This value can be considered a hint to the server.
The server may alter this value based on its own policies or allowed
values.  If this value is zero, a default timeout is used.
<p>The <b>flags</b> parameter is currently unused, and must be set to 0.
<p>When the DbEnv.set_rpc_server method has been called, subsequent calls
to Berkeley DB library interfaces may return or throw exceptions encapsulating
<a name="Db.DB_NOSERVER">Db.DB_NOSERVER</a>, <a name="Db.DB_NOSERVER_ID">Db.DB_NOSERVER_ID</a>, or
<a name="Db.DB_NOSERVER_HOME">Db.DB_NOSERVER_HOME</a>.
<p>The DbEnv.set_rpc_server method configures operations performed using the specified
<a href="../api_java/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
database environment.
<p>The DbEnv.set_rpc_server interface may not be called after the <a href="../api_java/env_open.html">DbEnv.open</a>
interface is called.
<p>The DbEnv.set_rpc_server method throws an exception that encapsulates a non-zero error value on
failure.
<h1>Errors</h1>
<p>The DbEnv.set_rpc_server method may fail and throw an exception encapsulating a non-zero error for the following conditions:
<p><dl compact>
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
</dl>
<p>The DbEnv.set_rpc_server method may fail and throw an exception for errors specified for other Berkeley DB and C library or system methods.
If a catastrophic error has occurred, the DbEnv.set_rpc_server method may fail and
throw a <a href="../api_java/runrec_class.html">DbRunRecoveryException</a>,
in which case all subsequent Berkeley DB calls will fail in the same way.
<h1>Class</h1>
<a href="../api_java/env_class.html">DbEnv</a>
<h1>See Also</h1>
<a href="../api_java/env_list.html">Database Environments and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>