Import BSDDB 4.7.25 (as of svn r89086)
This commit is contained in:
16
docs_src/seq/Makefile
Normal file
16
docs_src/seq/Makefile
Normal file
@@ -0,0 +1,16 @@
|
||||
# $Id: Makefile,v 1.5 2007/05/17 18:17:18 bostic Exp $
|
||||
|
||||
COMMON= seq_class.html \
|
||||
seq_close.html \
|
||||
seq_get.html \
|
||||
seq_initial_value.html \
|
||||
seq_list.html \
|
||||
seq_open.html \
|
||||
seq_remove.html \
|
||||
seq_set_cachesize.html \
|
||||
seq_set_flags.html \
|
||||
seq_set_range.html \
|
||||
seq_stat.html
|
||||
|
||||
C=
|
||||
CXX=
|
||||
21
docs_src/seq/m4.methods
Normal file
21
docs_src/seq/m4.methods
Normal file
@@ -0,0 +1,21 @@
|
||||
m4_comment([$Id: m4.methods,v 1.7 2004/11/29 15:34:22 bostic Exp $])
|
||||
|
||||
m4_table_begin(, _center)
|
||||
|
||||
m4_table_header(Sequences and Related Methods, Description)
|
||||
m4_comment([DbSequence::])m4_table_element(ifelse(M4API, C_API, m4_ref(seq_create), m4_ref(DbSequence)), Create a sequence handle)
|
||||
m4_comment([DbSequence::close])m4_table_element(m4_ref(seq_close), Close a sequence)
|
||||
m4_comment([DbSequence::get])m4_table_element(m4_ref(seq_get), Get the next sequence element(s))
|
||||
m4_comment([DbSequence::get_dbp])m4_table_element(m4_ref(seq_get_dbp), Return a handle for the underlying sequence database)
|
||||
m4_comment([DbSequence::get_key])m4_table_element(m4_ref(seq_get_key), Return the key for a sequence)
|
||||
m4_comment([DbSequence::initial_value])m4_table_element(m4_ref(seq_initial_value), Set the initial value of a sequence)
|
||||
m4_comment([DbSequence::open])m4_table_element(m4_ref(seq_open), Open a sequence)
|
||||
m4_comment([DbSequence::remove])m4_table_element(m4_ref(seq_remove), Remove a sequence)
|
||||
m4_comment([DbSequence::stat])m4_table_element(m4_ref(seq_stat), Return sequence statistics)
|
||||
|
||||
m4_table_header(Sequences Configuration, _empty)
|
||||
m4_comment([DbSequence::set_cachesize])m4_table_element(m4_ref(seq_set_cachesize), Set the cache size of a sequence)
|
||||
m4_comment([DbSequence::set_flags])m4_table_element(m4_ref(seq_set_flags), Set the flags for a sequence)
|
||||
m4_comment([DbSequence::set_range])m4_table_element(m4_ref(seq_set_range), Set the range for a sequence)
|
||||
|
||||
m4_table_end
|
||||
71
docs_src/seq/seq_class.so
Normal file
71
docs_src/seq/seq_class.so
Normal file
@@ -0,0 +1,71 @@
|
||||
m4_comment([$Id: seq_class.so,v 1.12 2004/10/18 19:46:31 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [seq_create, DbSequence])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
ifelse(M4API, C_API, [dnl
|
||||
m4_pf_header(m4_ref(seq_create), [dnl
|
||||
typedef struct __db_sequence DB_SEQUENCE;
|
||||
m4_blank
|
||||
int
|
||||
db_sequence_create(DB_SEQUENCE **seq, DB *db, u_int32_t flags);
|
||||
])])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
m4_pf_header(m4_ref(DbSequence), [dnl
|
||||
class DbSequence {
|
||||
public:
|
||||
DbSequence(Db *db, u_int32_t flags);
|
||||
~DbSequence();
|
||||
m4_blank
|
||||
DB_SEQUENCE *DbSequence::get_DB();
|
||||
const DB *DbSequence::get_const_DB() const;
|
||||
static DbSequence *DbSequence::get_DbSequence(DB *db);
|
||||
static const DbSequence *DbSequence::get_const_DbSequence(const DB *db);
|
||||
...
|
||||
};])])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_ref(DbSequence) handle is the handle used to manipulate a
|
||||
sequence object. A sequence object is stored in a record in a
|
||||
database.])
|
||||
|
||||
m4_p([dnl
|
||||
m4_ref(DbSequence) handles are free-threaded if the m4_ref(DB_THREAD)
|
||||
flag is specified to the m4_refT(seq_open) when the sequence is opened.
|
||||
Once the m4_ref(seq_close) or m4_refT(seq_remove)s are called, the
|
||||
handle may not be accessed again, regardless of the method's return.])
|
||||
|
||||
m4_p([dnl
|
||||
Each handle opened on a sequence may maintain a separate cache of values
|
||||
which are returned to the application using the m4_ref(seq_get) method
|
||||
either singly or in groups depending on its m4_arg(delta) parameter.])
|
||||
|
||||
m4_p([dnl
|
||||
The
|
||||
ifelse(M4API, C_API, m4_refT(DbSequence), constructor) creates a
|
||||
m4_ref(DbSequence) object that serves as the handle for a sequence.
|
||||
Calling the m4_ref(seq_close) or m4_refT(seq_remove)s will discard the
|
||||
handle.])
|
||||
|
||||
ifelse(M4API, C_API, [m4_return(seq_create, std)])
|
||||
|
||||
m4_parambegin
|
||||
|
||||
ifelse(M4API, C_API, [dnl
|
||||
m4_param(seq, [dnl
|
||||
The m4_arg(seq) parameter references the memory into which the returned
|
||||
structure pointer is stored.])])
|
||||
|
||||
m4_param(db, [dnl
|
||||
The m4_arg(db) parameter is an open database handle which holds the
|
||||
persistent data for the sequence. The database may be of any type,
|
||||
but may not have been configured to support duplicate data items.])
|
||||
|
||||
m4_unusedflags(0)
|
||||
|
||||
m4_paramend
|
||||
|
||||
ifelse(M4API, C_API, [m4_err(seq_create, einval)])
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
31
docs_src/seq/seq_close.so
Normal file
31
docs_src/seq/seq_close.so
Normal file
@@ -0,0 +1,31 @@
|
||||
m4_comment([$Id: seq_close.so,v 1.2 2004/08/13 03:39:02 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, seq_close)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_close),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__close(DB_SEQUENCE *seq, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::close(u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_close) closes the sequence handle. Any unused cached
|
||||
values are lost.])
|
||||
|
||||
m4_destructor(DbSequence, seq_close)
|
||||
|
||||
m4_return(seq_close, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_unusedflags
|
||||
m4_paramend
|
||||
|
||||
m4_err(seq_close, einval)
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
75
docs_src/seq/seq_get.so
Normal file
75
docs_src/seq/seq_get.so
Normal file
@@ -0,0 +1,75 @@
|
||||
m4_comment([$Id: seq_get.so,v 1.11 2005/08/09 14:23:30 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL,
|
||||
[seq_get])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_get),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__get(DB_SEQUENCE *seq,
|
||||
DB_TXN *txnid, int32_t delta, db_seq_t *retp, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::get(DbTxn *txnid, int32_t delta, db_seq_t *retp, u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_get) returns the next available element in the sequence
|
||||
and changes the sequence value by m4_arg(delta). The value of
|
||||
m4_arg(delta) must be greater than zero. If there are enough cached
|
||||
values in the sequence handle then they will be returned. Otherwise the
|
||||
next value will be fetched from the database and incremented
|
||||
(decremented) by enough to cover the m4_arg(delta) and the next batch
|
||||
of cached values.])
|
||||
|
||||
m4_p([dnl
|
||||
For maximum concurrency a non-zero cache size should be specified prior
|
||||
to opening the sequence handle and m4_ref(DB_TXN_NOSYNC) should be
|
||||
specified for each m4_refT(seq_get) call.])
|
||||
|
||||
m4_p([dnl
|
||||
By default, sequence ranges do not wrap; to cause the sequence to wrap
|
||||
around the beginning or end of its range, specify the m4_ref(DB_SEQ_WRAP)
|
||||
flag to the m4_refT(seq_set_flags).])
|
||||
|
||||
m4_return(seq_get,
|
||||
specific, EINVAL, [if the record in the database is not a valid sequence
|
||||
record, or the sequence has reached the beginning or end of its range
|
||||
and is not configured to wrap])
|
||||
|
||||
m4_parambegin
|
||||
m4_param(delta, [dnl
|
||||
Specifies the amount to increment or decrement the sequence.])
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_may
|
||||
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_TXN_NOSYNC), [dnl
|
||||
If the operation is implicitly transaction protected (the m4_arg(txnid)
|
||||
argument is NULL but the operation occurs to a transactional database),
|
||||
do not synchronously flush the log when the transaction commits.])
|
||||
m4_tagend])
|
||||
|
||||
m4_param(retp, [dnl
|
||||
m4_arg(retp) points to the memory to hold the return value from
|
||||
the sequence.])
|
||||
m4_param_txn(seq_get,, [dnl
|
||||
No m4_arg(txnid) handle may be specified if the sequence handle was
|
||||
opened with a non-zero cache size.
|
||||
m4_p([dnl
|
||||
If the underlying database handle was opened in a transaction, calling
|
||||
m4_ref(seq_get) may result in changes to the sequence object; these
|
||||
changes will be automatically committed in a transaction internal to the
|
||||
m4_db library. If the thread of control calling m4_ref(seq_get) has
|
||||
an active transaction, which holds locks on the same database as the
|
||||
one in which the sequence object is stored, it is possible for a thread
|
||||
of control calling m4_ref(seq_get) to self-deadlock because the active
|
||||
transaction's locks conflict with the internal transaction's locks.
|
||||
For this reason, it is often preferable for sequence objects to be
|
||||
stored in their own database.])])
|
||||
m4_paramend
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
34
docs_src/seq/seq_initial_value.so
Normal file
34
docs_src/seq/seq_initial_value.so
Normal file
@@ -0,0 +1,34 @@
|
||||
m4_comment([$Id: seq_initial_value.so,v 1.6 2004/11/29 15:30:23 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [seq_initial_value])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_initial_value),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__initial_value(DB_SEQUENCE *seq, db_seq_t value);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::initial_value(db_seq_t value);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Set the initial value for a sequence. This call is only effective when
|
||||
the sequence is being created.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_initial_value) may not be called after the
|
||||
m4_ref(seq_open) method is called.])
|
||||
|
||||
m4_return(seq_initial_value, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(value, [dnl
|
||||
The initial value to set.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(seq_initial_value, einval)
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
7
docs_src/seq/seq_list.so
Normal file
7
docs_src/seq/seq_list.so
Normal file
@@ -0,0 +1,7 @@
|
||||
m4_comment([$Id: seq_list.so,v 1.2 2004/08/18 02:34:52 bostic Exp $])
|
||||
|
||||
m4_page_title([m4_db: Sequences and Related Methods])
|
||||
|
||||
include(seq/m4.methods)
|
||||
|
||||
m4_page_footer
|
||||
87
docs_src/seq/seq_open.so
Normal file
87
docs_src/seq/seq_open.so
Normal file
@@ -0,0 +1,87 @@
|
||||
m4_comment([$Id: seq_open.so,v 1.9 2005/01/20 01:15:15 ubell Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [dnl
|
||||
seq_open, seq_get_dbp, seq_get_key])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_open),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__open(DB_SEQUENCE *seq, DB_TXN *txnid, DBT *key, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
DB_SEQUENCE-__GT__get_dbp(DB_SEQUENCE *seq, DB **dbp);
|
||||
m4_blank
|
||||
int
|
||||
DB_SEQUENCE-__GT__get_key(DB_SEQUENCE *seq, DBT *key);
|
||||
m4_blank
|
||||
])
|
||||
int
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::open(DbTxn *txnid, Dbt *key, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
DbSequence::get_dbp(Db **dbp);
|
||||
m4_blank
|
||||
int
|
||||
DbSequence::get_key(Dbt *key);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_open) opens the sequence represented by the m4_arg(key).
|
||||
The key must be compatible with the underlying database specified in the
|
||||
corresponding call to m4_ref(seq_create).])
|
||||
|
||||
m4_parambegin
|
||||
m4_param(key, [dnl
|
||||
The m4_arg(key) specifies which record in the database stores
|
||||
the persistent sequence data.])
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_may
|
||||
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_CREATE), [dnl
|
||||
Create the sequence. If the sequence does not already exist and the
|
||||
DB_CREATE flag is not specified, the m4_ref(seq_open) will fail.])
|
||||
|
||||
m4_tag(m4_idef(DB_EXCL), [dnl
|
||||
Return an error if the sequence already exists. The m4_ref(DB_EXCL)
|
||||
flag is only meaningful when specified with the m4_ref(DB_CREATE)
|
||||
flag.])
|
||||
|
||||
m4_tag(m4_idef(DB_THREAD), [dnl
|
||||
Cause the m4_ref(DbSequence) handle returned by m4_ref(seq_open) to be
|
||||
m4_italic(free-threaded); that is, usable by multiple threads within a
|
||||
single address space. Note that if multiple threads create multiple
|
||||
sequences using the same database handle that handle must have been
|
||||
opened specifying m4_idef(DB_THREAD).])
|
||||
m4_tagend])
|
||||
|
||||
m4_param_txn(seq_open,, [dnl
|
||||
Transactionally protected operations on a m4_ref(DbSequence) handle
|
||||
require the m4_ref(DbSequence) handle itself be transactionally
|
||||
protected during its open if the open creates the sequence.])
|
||||
|
||||
m4_paramend
|
||||
|
||||
m4_pf_description(m4_ref(seq_get_dbp))
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_get_dbp) returns the database handle.])
|
||||
m4_parambegin
|
||||
m4_param_co(dbp, database handle, REF)
|
||||
m4_paramend
|
||||
m4_when_any(seq_get_dbp)
|
||||
m4_return(seq_get_dbp, std)
|
||||
|
||||
m4_pf_description(m4_ref(seq_get_key))
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_get_key) returns the key for the sequence.])
|
||||
m4_parambegin
|
||||
m4_param_co(key, key data, REF)
|
||||
m4_paramend
|
||||
m4_when_any(seq_get_key)
|
||||
m4_return(seq_get_key, std)
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
41
docs_src/seq/seq_remove.so
Normal file
41
docs_src/seq/seq_remove.so
Normal file
@@ -0,0 +1,41 @@
|
||||
m4_comment([$Id: seq_remove.so,v 1.6 2004/12/16 19:13:04 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, seq_remove)
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_remove),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__remove(DB_SEQUENCE *seq, DB_TXN *txnid, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::remove(u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_remove) removes the sequence from the database. This
|
||||
method should not be called if there are other open handles on this
|
||||
sequence.])
|
||||
|
||||
m4_destructor(DbSequence, seq_remove)
|
||||
|
||||
m4_return(seq_remove, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_may
|
||||
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_TXN_NOSYNC), [dnl
|
||||
If the operation is implicitly transaction protected (the m4_arg(txnid)
|
||||
argument is NULL but the operation occurs to a transactional database),
|
||||
do not synchronously flush the log when the transaction commits.])
|
||||
m4_tagend])
|
||||
m4_param_txn(seq_get)
|
||||
m4_paramend
|
||||
|
||||
m4_err(seq_remove, einval)
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
41
docs_src/seq/seq_set_cachesize.so
Normal file
41
docs_src/seq/seq_set_cachesize.so
Normal file
@@ -0,0 +1,41 @@
|
||||
m4_comment([$Id: seq_set_cachesize.so,v 1.8 2004/09/07 15:37:41 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL,
|
||||
[seq_set_cachesize, seq_get_cachesize])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_set_cachesize),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__set_cachesize(DB_SEQUENCE *seq, int32_t size);
|
||||
m4_blank
|
||||
int
|
||||
DB_SEQUENCE-__GT__get_cachesize(DB_SEQUENCE *seq, int32_t *sizep);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::set_cachesize(int32_t size);
|
||||
m4_blank
|
||||
int DbSequence::get_cachesize(*sizep);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Configure the number of elements cached by a sequence handle.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_ref(seq_set_cachesize) method may not be called after the
|
||||
m4_ref(seq_open) method is called.])
|
||||
|
||||
m4_return(seq_set_cachesize, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(size, [dnl
|
||||
The number of elements in the cache.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(seq_set_cachesize, einval)
|
||||
|
||||
m4_pf_getter(seq_get_cachesize, current cache size,, sizep)
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
63
docs_src/seq/seq_set_flags.so
Normal file
63
docs_src/seq/seq_set_flags.so
Normal file
@@ -0,0 +1,63 @@
|
||||
m4_comment([$Id: seq_set_flags.so,v 1.7 2004/09/07 15:37:41 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL,
|
||||
[seq_set_flags, seq_get_flags, DB_SEQ_DEC, DB_SEQ_INC, DB_SEQ_WRAP])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_set_flags),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__set_flags(DB_SEQUENCE *seq, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
DB_SEQUENCE-__GT__get_flags(DB_SEQUENCE *seq, u_int32_t *flagsp);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::set_flags(u_int32_t flags);
|
||||
m4_blank
|
||||
int DbSequence::get_flags(u_int32_t *flagsp);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Configure a sequence. The flags are only effective when creating a
|
||||
sequence. Calling m4_ref(seq_set_flags) is additive; there is no way
|
||||
to clear flags.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_ref(seq_set_flags) method may not be called after the
|
||||
m4_ref(seq_open) method is called.])
|
||||
|
||||
m4_return(seq_set_flags, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_may
|
||||
|
||||
m4_tagbegin
|
||||
|
||||
m4_tag(m4_idef(DB_SEQ_DEC), [dnl
|
||||
Specify that the sequence should be decremented.])
|
||||
|
||||
m4_tagend
|
||||
m4_tagbegin
|
||||
|
||||
m4_tag(m4_idef(DB_SEQ_INC), [dnl
|
||||
Specify that the sequence should be incremented. This is the default.])
|
||||
|
||||
m4_tagend
|
||||
m4_tagbegin
|
||||
|
||||
m4_tag(m4_idef(DB_SEQ_WRAP), [dnl
|
||||
Specify that the sequence should wrap around when it is incremented
|
||||
(decremented) past the specified maximum (minimum) value.])
|
||||
|
||||
m4_tagend])
|
||||
m4_paramend
|
||||
|
||||
m4_err(seq_set_flags, einval)
|
||||
|
||||
m4_pf_getter(seq_get_flags, current flags,, flagsp)
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
57
docs_src/seq/seq_set_range.so
Normal file
57
docs_src/seq/seq_set_range.so
Normal file
@@ -0,0 +1,57 @@
|
||||
m4_comment([$Id: seq_set_range.so,v 1.6 2004/09/07 15:37:41 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL,
|
||||
[seq_set_range, seq_get_range])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_set_range),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__set_range(DB_SEQUENCE *seq, db_seq_t min, db_seq_t max);
|
||||
m4_blank
|
||||
int
|
||||
DB_SEQUENCE-__GT__get_range(DB_SEQUENCE *seq, db_seq_t *minp, db_seq_t *maxp);
|
||||
])dnl
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
DbSequence::set_range(db_seq_t min, db_seq_t max);
|
||||
m4_blank
|
||||
int DbSequence::get_range(u_int32_t, db_seq_t *minp, db_seq_t *maxp);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
Configure a sequence range. This call is only effective when the
|
||||
sequence is being created. The range is limited to a signed 64 bit
|
||||
integer.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_ref(seq_set_range) method may not be called after the
|
||||
m4_ref(seq_open) method is called.])
|
||||
|
||||
m4_return(seq_set_range, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(min, [dnl
|
||||
Specifies the minimum value for the sequence.])
|
||||
m4_param(max, [dnl
|
||||
Specifies the maximum value for the sequence.])
|
||||
m4_paramend
|
||||
|
||||
m4_err(seq_set_range, einval)
|
||||
|
||||
m4_pf_description(m4_ref(seq_get_range))
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_get_range) returns the range of values in the sequence.])
|
||||
m4_when_any(seq_get_range)
|
||||
|
||||
m4_return(seq_get_range, std)
|
||||
|
||||
m4_parambegin
|
||||
m4_param(minp,
|
||||
[The m4_refT(seq_get_range) returns the minimum value in m4_arg(minp).])
|
||||
m4_param(maxp,
|
||||
[The m4_refT(seq_get_range) returns the maximum value in m4_arg(maxp).])
|
||||
m4_paramend
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
95
docs_src/seq/seq_stat.so
Normal file
95
docs_src/seq/seq_stat.so
Normal file
@@ -0,0 +1,95 @@
|
||||
m4_comment([$Id: seq_stat.so,v 1.9 2007/06/22 16:57:17 bostic Exp $])
|
||||
|
||||
define(M4PAGELOCAL, [seq_stat, seq_stat_print])
|
||||
include(m4/m4.seealso)
|
||||
|
||||
m4_pf_header(m4_ref(seq_stat),
|
||||
ifelse(M4API, C_API, [dnl
|
||||
int
|
||||
DB_SEQUENCE-__GT__stat(DB_SEQUENCE *db, void *sp, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
DB_SEQUENCE-__GT__stat_print(DB_SEQUENCE *db, u_int32_t flags);
|
||||
])
|
||||
ifelse(M4API, CXX_API, [dnl
|
||||
int
|
||||
Db::stat(void *sp, u_int32_t flags);
|
||||
m4_blank
|
||||
int
|
||||
Db::stat_print(u_int32_t flags);
|
||||
]))
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_stat) creates a statistical structure and copies a
|
||||
pointer to it into user-specified memory locations. Specifically, if
|
||||
m4_arg(sp) is non-NULL, a pointer to the statistics for the database are
|
||||
copied into the memory location to which it refers.])
|
||||
|
||||
m4_alloc([Statistical structures])
|
||||
|
||||
m4_p([dnl
|
||||
In the presence of multiple threads or processes accessing an active
|
||||
sequence, the information returned by m4_ref(seq_stat) may be out-of-date.])
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_stat) cannot be transaction-protected. For this reason,
|
||||
it should be called in a thread of control that has no open cursors or
|
||||
active transactions.])
|
||||
|
||||
m4_p([dnl
|
||||
The statistics are stored in a structure of type DB_SEQUENCE_STAT. The
|
||||
following fields will be filled in:])
|
||||
|
||||
m4_tagbegin
|
||||
m4_field(u_int32_t, st_wait,
|
||||
[The number of times a thread of control was forced to wait on the
|
||||
handle mutex.])
|
||||
m4_field(u_int32_t, st_nowait,
|
||||
[The number of times that a thread of control was able to obtain handle
|
||||
mutex without waiting.])
|
||||
m4_field(db_seq_t, st_current,
|
||||
[The current value of the sequence in the database.])
|
||||
m4_field(db_seq_t, st_value,
|
||||
[The current cached value of the sequence.])
|
||||
m4_field(db_seq_t, st_last_value,
|
||||
[The last cached value of the sequence.])
|
||||
m4_field(db_seq_t, st_min,
|
||||
[The minimum permitted value of the sequence.])
|
||||
m4_field(db_seq_t, st_max,
|
||||
[The maximum permitted value of the sequence.])
|
||||
m4_field(int32_t, st_cache_size,
|
||||
[The number of values that will be cached in this handle.])
|
||||
m4_field(u_int32_t, st_flags,
|
||||
[The flags value for the sequence.])
|
||||
m4_tagend
|
||||
|
||||
m4_parambegin
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_must
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_STAT_CLEAR), [dnl
|
||||
Reset statistics after printing their values.])
|
||||
m4_tagend])
|
||||
m4_paramend
|
||||
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_stat) may not be called before the m4_refT(seq_open) has
|
||||
been called.])
|
||||
|
||||
m4_return(seq_stat, std)
|
||||
|
||||
m4_pf_description(m4_ref(seq_stat_print))
|
||||
m4_p([dnl
|
||||
The m4_refT(seq_stat_print) prints diagnostic information to the output
|
||||
channel described by the m4_refT(dbenv_set_msgfile).])
|
||||
m4_parambegin
|
||||
m4_param(flags, [dnl
|
||||
m4_sf_or_must
|
||||
m4_tagbegin
|
||||
m4_tag(m4_idef(DB_STAT_CLEAR), [dnl
|
||||
Reset statistics after printing their values.])
|
||||
m4_tagend])
|
||||
m4_paramend
|
||||
|
||||
m4_seealso(DbSequence)
|
||||
m4_page_footer
|
||||
Reference in New Issue
Block a user