DbChannel::close()

#include <db_cxx.h>

int 
DbChannel::close(u_int32_t flags);

The DbChannel::close() method closes the DbChannel handle, freeing any resources allocated to the handle. All DbChannel handles must be closed before the encompassing environment handle is closed. Also, all on-going messaging operations on the channel should be allowed to complete before attempting to close the channel handle.

After DbChannel::close() has been called, regardless of its return, the DbChannel handle may not be accessed again.

The DbChannel::close() method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters

flags

This parameter is currently unused, and must be set to 0.

Errors

The DbChannel::close() method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

EINVAL

If this method is called from a Base API application, or if an invalid flag value or parameter was specified.

Class

DbEnv, DbChannel

See Also

Replication and Related Methods