Logo Search packages:      
Sourcecode: qdbm version File versions  Download package

qdbm::Villa Class Reference

#include <xvilla.h>

Inheritance diagram for qdbm::Villa:

qdbm::ADBM qdbm::ADBM

List of all members.


Detailed Description

The Java API of Villa, the advanced API of QDBM. This class depends on the native library `jqdbm'.

C++ API of Villa, the basic API of QDBM.

Definition at line 25 of file Villa.java.


Public Member Functions

virtual void close () throw (Villa_error)
void close () throws VillaException
virtual void curfirst () throw (Villa_error)
void curfirst () throws VillaException
virtual void curjump (const char *kbuf, int ksiz, int jmode=Villa::JFORWARD) throw (Villa_error)
void curjump (byte[] key) throws VillaException
void curjump (byte[] key, int jmode) throws VillaException
void curjumpobj (Object key, int jmode) throws VillaException
virtual char * curkey (int *sp=0) throw (Villa_error)
byte[] curkey () throws VillaException
Object curkeyobj () throws VillaException
virtual void curlast () throw (Villa_error)
void curlast () throws VillaException
virtual void curnext () throw (Villa_error)
void curnext () throws VillaException
virtual void curprev () throw (Villa_error)
void curprev () throws VillaException
virtual char * curval (int *sp=0) throw (Villa_error)
byte[] curval () throws VillaException
Object curvalobj () throws VillaException
void delete (byte[] key) throws VillaException
virtual void deleterec (const Datum &key) throw (Villa_error)
virtual bool error () throw (Villa_error)
boolean error () throws VillaException
virtual bool fatalerror () throw (Villa_error)
boolean fatalerror () throws VillaException
byte[] fetch (byte[] key) throws VillaException
virtual Datum fetchrec (const Datum &key) throw (Villa_error)
virtual Datum firstkey () throw (Villa_error)
byte[] firstkey () throws VillaException
virtual int fsiz () throw (Villa_error)
int fsiz () throws VillaException
virtual char * get (const char *kbuf, int ksiz, int *sp=0) throw (Villa_error)
byte[] get (byte[] key) throws VillaException
Object getobj (Object key) throws VillaException
virtual int inode () throw (Villa_error)
virtual int lnum () throw (Villa_error)
int lnum () throws VillaException
virtual int mtime () throw (Villa_error)
virtual char * name () throw (Villa_error)
String name () throws VillaException
virtual Datum nextkey () throw (Villa_error)
byte[] nextkey () throws VillaException
virtual int nnum () throw (Villa_error)
int nnum () throws VillaException
virtual void optimize () throw (Villa_error)
void optimize () throws VillaException
virtual void out (const char *kbuf, int ksiz) throw (Villa_error)
void out (byte[] key) throws VillaException
void outobj (Object key) throws VillaException
virtual void put (const char *kbuf, int ksiz, const char *vbuf, int vsiz, int dmode=Villa::DOVER) throw (Villa_error)
void put (byte[] key, byte[] val) throws VillaException
void put (byte[] key, byte[] val, int dmode) throws VillaException
void putobj (Object key, Object val, int dmode) throws VillaException
virtual int rnum () throw (Villa_error)
int rnum () throws VillaException
virtual void settuning (int lrecmax, int nidxmax, int lcnum, int ncnum) throw (Villa_error)
void settuning (int lrecmax, int nidxmax, int lcnum, int ncnum) throws VillaException
void store (byte[] key, byte[] val, boolean replace) throws VillaException
virtual void storerec (const Datum &key, const Datum &val, bool replace=true) throw (Villa_error)
virtual void sync () throw (Villa_error)
void sync () throws VillaException
virtual void tranabort () throw (Villa_error)
void tranabort () throws VillaException
virtual void tranbegin () throw (Villa_error)
void tranbegin () throws VillaException
virtual void trancommit () throw (Villa_error)
void trancommit () throws VillaException
 Villa (const char *name, int omode=Villa::OREADER, VLCFUNC cmp=Villa::cmplex) throw (Villa_error)
 Villa (String name) throws VillaException
 Villa (String name, int omode, int cmode) throws VillaException
virtual int vnum (const char *kbuf, int ksiz) throw (Villa_error)
int vnum (byte[] key) throws VillaException
int vnumobj (Object key) throws VillaException
virtual bool writable () throw (Villa_error)
boolean writable () throws VillaException
virtual ~Villa () throw ()

Static Public Member Functions

static int cmpdec (const char *aptr, int asiz, const char *bptr, int bsiz) throw ()
static int cmpint (const char *aptr, int asiz, const char *bptr, int bsiz) throw ()
static int cmplex (const char *aptr, int asiz, const char *bptr, int bsiz) throw ()
static int cmpnum (const char *aptr, int asiz, const char *bptr, int bsiz) throw ()
static synchronized String errmsg (int ecode)
static void remove (const char *name) throw (Villa_error)
static void remove (String name) throws VillaException
static const char * version () throw ()
static synchronized String version ()

Static Public Attributes

static final int CMPDEC = 2
static final int CMPLEX = 0
static final int CMPNUM = 1
static final int CMPOBJ = 3
static const int DDUP
 write mode: concatenate values
static final int DDUP = 2
static const int DKEEP
 write mode: keep the existing value
static final int DKEEP = 1
static const int DOVER
 write mode: overwrite the existing value
static final int DOVER = 0
static const int EALLOC
 error code: memory allocation error
static final int EALLOC = 6
static const int EBROKEN
 error code: broken database file
static final int EBROKEN = 3
static const int ECLOSE
 error code: close error
static final int ECLOSE = 9
static const int EFATAL
 error code: with fatal error
static final int EFATAL = 1
static const int EKEEP
 error code: existing record
static final int EKEEP = 4
static const int ELOCK
 error code: lock error
static final int ELOCK = 16
static const int EMAP
 error code: memory mapping error
static final int EMAP = 7
static const int EMISC
 error code: miscellaneous error
static final int EMISC = 20
static const int EMKDIR
 error code: mkdir error
static final int EMKDIR = 18
static const int EMODE
 error code: invalid mode
static final int EMODE = 2
static const int ENOERR
 error code: no error
static final int ENOERR = 0
static const int ENOITEM
 error code: no item found
static final int ENOITEM = 5
static const int EOPEN
 error code: open error
static final int EOPEN = 8
static const int EREAD
 error code: read error
static final int EREAD = 14
static const int ERMDIR
 error code: rmdir error
static final int ERMDIR = 19
static const int ESEEK
 error code: seek error
static final int ESEEK = 13
static const int ESTAT
 error code: stat error
static final int ESTAT = 12
static const int ESYNC
 error code: sync error
static final int ESYNC = 11
static const int ETRUNC
 error code: trunc error
static final int ETRUNC = 10
static const int EUNLINK
 error code: unlink error
static final int EUNLINK = 17
static const int EWRITE
 error code: write error
static final int EWRITE = 15
static const int JBACKWARD
 jump mode: step backward
static final int JBACKWARD = 1
static const int JFORWARD
 jump mode: step forward
static final int JFORWARD = 0
static const int OCREAT
 open mode: writer creating
static final int OCREAT = 1 << 2
static const int OLCKNB
 open mode: lock without blocking
static final int OLCKNB = 1 << 5
static const int ONOLCK
 open mode: open without locking
static final int ONOLCK = 1 << 4
static const int OREADER
 open mode: open as a reader
static final int OREADER = 1 << 0
static const int OTRUNC
 open mode: writer truncating
static final int OTRUNC = 1 << 3
static const int OWRITER
 open mode: open as a writer
static final int OWRITER = 1 << 1
static const int OZCOMP
 open mode: compress leaves
static final int OZCOMP = 1 << 6

Protected Member Functions

void finalize () throws Throwable

Static Package Functions

 [static initializer]

Private Member Functions

Villaoperator= (const Villa &villa) throw (Villa_error)
 Villa (const Villa &villa) throw (Villa_error)

Static Private Member Functions

static final int objcompare (byte[] abuf, byte[] bbuf)
static synchronized final
native int 
vlclose (int index)
static synchronized final
native int 
vlcurfirst (int index)
static synchronized final
native int 
vlcurjump (int index, byte[] key, int ksiz, int jmode)
static synchronized final
native byte[] 
vlcurkey (int index)
static synchronized final
native int 
vlcurlast (int index)
static synchronized final
native int 
vlcurnext (int index)
static synchronized final
native int 
vlcurprev (int index)
static synchronized final
native byte[] 
vlcurval (int index)
static synchronized final
native int 
vlecode ()
static synchronized final
native String 
vlerrmsg (int ecode)
static synchronized final
native int 
vlfatalerror (int index)
static synchronized final
native int 
vlfsiz (int index)
static synchronized final
native byte[] 
vlget (int index, byte[] key, int ksiz)
static synchronized final
native void 
vlinit ()
static synchronized final
native int 
vllnum (int index)
static synchronized final
native String 
vlname (int index)
static synchronized final
native int 
vlnnum (int index)
static synchronized final
native int 
vlopen (String name, int omode, int cmode)
static synchronized final
native int 
vloptimize (int index)
static synchronized final
native int 
vlout (int index, byte[] key, int ksiz)
static synchronized final
native int 
vlput (int index, byte[] key, int ksiz, byte[] val, int vsiz, int dmode)
static synchronized final
native int 
vlremove (String name)
static synchronized final
native int 
vlrnum (int index)
static synchronized final
native void 
vlsettuning (int index, int lrecmax, int nidxmax, int lcnum, int ncnum)
static synchronized final
native int 
vlsync (int index)
static synchronized final
native int 
vltranabort (int index)
static synchronized final
native int 
vltranbegin (int index)
static synchronized final
native int 
vltrancommit (int index)
static synchronized final
native String 
vlversion ()
static synchronized final
native int 
vlvnum (int index, byte[] key, int ksiz)
static synchronized final
native int 
vlwritable (int index)

Private Attributes

int index
boolean tran
Object tranmonitor
pthread_mutex_t tranmutex
 mutex for the transaction
VILLA * villa
 internal database handle

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index