BerkeleyDB
view release on metacpan or search on metacpan
BerkeleyDB.pod view on Meta::CPAN
=item $env->get_shm_key($id)
Writes the base segment ID for the shared memory region used by the
Berkeley DB environment into C<$id>. Returns 0 on success.
This option requires Berkeley DB 4.2 or better.
Use the C<-SharedMemKey> option when opening the environmet to set the
base segment ID.
=item $env->set_isalive()
Set the callback that determines if the thread of control, identified by
the pid and tid arguments, is still running. This method should only be
used in combination with $env->failchk.
This option requires Berkeley DB 4.4 or better.
=item $env->failchk($flags)
The $env->failchk method checks for threads of control (either a true
BerkeleyDB.pod view on Meta::CPAN
library data structures, while holding a logical database lock, or with an
unresolved transaction (that is, a transaction that was never aborted or
committed).
If $env->failchk determines a thread of control exited while holding
database read locks, it will release those locks. If $env->failchk
determines a thread of control exited with an unresolved transaction, the
transaction will be aborted.
Applications calling the $env->failchk method must have already called the
$env->set_isalive method, on the same DB environment, and must have
configured their database environment using the -ThreadCount flag. The
ThreadCount flag cannot be used on an environment that wasn't previously
initialized with it.
This option requires Berkeley DB 4.4 or better.
=item $env->stat_print
Prints statistical information.
BerkeleyDB.pod.P view on Meta::CPAN
=item $env->get_shm_key($id)
Writes the base segment ID for the shared memory region used by the
Berkeley DB environment into C<$id>. Returns 0 on success.
This option requires Berkeley DB 4.2 or better.
Use the C<-SharedMemKey> option when opening the environmet to set the
base segment ID.
=item $env->set_isalive()
Set the callback that determines if the thread of control, identified by
the pid and tid arguments, is still running. This method should only be
used in combination with $env->failchk.
This option requires Berkeley DB 4.4 or better.
=item $env->failchk($flags)
The $env->failchk method checks for threads of control (either a true
BerkeleyDB.pod.P view on Meta::CPAN
library data structures, while holding a logical database lock, or with an
unresolved transaction (that is, a transaction that was never aborted or
committed).
If $env->failchk determines a thread of control exited while holding
database read locks, it will release those locks. If $env->failchk
determines a thread of control exited with an unresolved transaction, the
transaction will be aborted.
Applications calling the $env->failchk method must have already called the
$env->set_isalive method, on the same DB environment, and must have
configured their database environment using the -ThreadCount flag. The
ThreadCount flag cannot be used on an environment that wasn't previously
initialized with it.
This option requires Berkeley DB 4.4 or better.
=item $env->stat_print
Prints statistical information.
BerkeleyDB.xs view on Meta::CPAN
if (db_errpfx)
sv_setpvf(sv, "%s: %s", db_errpfx, buffer) ;
else
sv_setpv(sv, buffer) ;
}
}
#if defined(AT_LEAST_DB_4_4) && ! defined(_WIN32)
int
db_isalive_cb(DB_ENV *dbenv, pid_t pid, db_threadid_t tid, u_int32_t flags)
{
bool processAlive = ( kill(pid, 0) == 0 ) || ( errno != ESRCH );
return processAlive;
}
#endif
static SV *
readHash(HV * hash, char * key)
BerkeleyDB.xs view on Meta::CPAN
#ifdef _WIN32
softCrash("$env->failchk not supported on Windows") ;
#endif
#else
RETVAL = env->Status = env->Env->failchk(env->Env, flags);
#endif
OUTPUT:
RETVAL
int
set_isalive(env)
BerkeleyDB::Env env
INIT:
ckActive_Database(env->active) ;
CODE:
#if ! defined(AT_LEAST_DB_4_4) || defined(_WIN32)
#ifndef AT_LEAST_DB_4_4
softCrash("$env->set_isalive needs Berkeley DB 4.4 or better") ;
#endif
#ifdef _WIN32
softCrash("$env->set_isalive not supported on Windows") ;
#endif
#else
RETVAL = env->Status = env->Env->set_isalive(env->Env, db_isalive_cb);
#endif
OUTPUT:
RETVAL
DualType
get_blob_threshold(env, bytes)
BerkeleyDB::Env env
u_int32_t bytes = NO_INIT
PREINIT:
0.34 27th March 2008
* Updates to support building with Berkeley DB version 4.7
* Typo in #ifdef for ThreadCount support. Spotted by Mark Hindley
* Updated dbinfo
0.33 17th January 2008
* Added failchk, set_isalive, lock_stat_print & mutex_stat_print.
Patch provided by Thomas Busch.
0.32 10th July 2007
* Updates to support Berkeley DB 4.6
* Remove all global static data from BerkeleyDB.xs.
0.31 15th Oct 2006
( run in 2.170 seconds using v1.01-cache-2.11-cpan-df04353d9ac )