Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

rep_stub.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1996-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: rep_stub.c,v 12.11 2005/10/09 16:12:07 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #ifndef HAVE_REPLICATION
00013 #ifndef NO_SYSTEM_INCLUDES
00014 #include <sys/types.h>
00015 #endif
00016 
00017 #include "db_int.h"
00018 #include "dbinc/db_page.h"
00019 #include "dbinc/db_am.h"
00020 
00021 /*
00022  * If the library wasn't compiled with replication support, various routines
00023  * aren't available.  Stub them here, returning an appropriate error.
00024  */
00025 static int __db_norep __P((DB_ENV *));
00026 
00027 /*
00028  * __db_norep --
00029  *      Error when a Berkeley DB build doesn't include the access method.
00030  */
00031 static int
00032 __db_norep(dbenv)
00033         DB_ENV *dbenv;
00034 {
00035         __db_err(dbenv,
00036             "library build did not include support for replication");
00037         return (DB_OPNOTSUP);
00038 }
00039 
00040 int
00041 __db_rep_enter(dbp, checkgen, checklock, return_now)
00042         DB *dbp;
00043         int checkgen, checklock, return_now;
00044 {
00045         COMPQUIET(checkgen, 0);
00046         COMPQUIET(checklock, 0);
00047         COMPQUIET(return_now, 0);
00048         return (__db_norep(dbp->dbenv));
00049 }
00050 
00051 int
00052 __env_rep_enter(dbenv, checklock)
00053         DB_ENV *dbenv;
00054         int checklock;
00055 {
00056         COMPQUIET(checklock, 0);
00057         return (__db_norep(dbenv));
00058 }
00059 
00060 int
00061 __env_db_rep_exit(dbenv)
00062         DB_ENV *dbenv;
00063 {
00064         return (__db_norep(dbenv));
00065 }
00066 
00067 int
00068 __op_rep_enter(dbenv)
00069         DB_ENV *dbenv;
00070 {
00071         return (__db_norep(dbenv));
00072 }
00073 
00074 int
00075 __op_rep_exit(dbenv)
00076         DB_ENV *dbenv;
00077 {
00078         return (__db_norep(dbenv));
00079 }
00080 
00081 int
00082 __rep_bulk_message(dbenv, bulkp, repth, lsnp, dbt, flags)
00083         DB_ENV *dbenv;
00084         REP_BULK *bulkp;
00085         REP_THROTTLE *repth;
00086         DB_LSN *lsnp;
00087         const DBT *dbt;
00088         u_int32_t flags;
00089 {
00090         COMPQUIET(bulkp, NULL);
00091         COMPQUIET(repth, NULL);
00092         COMPQUIET(lsnp, NULL);
00093         COMPQUIET(dbt, NULL);
00094         COMPQUIET(flags, 0);
00095         return (__db_norep(dbenv));
00096 }
00097 
00098 int
00099 __rep_dbenv_close(dbenv)
00100         DB_ENV *dbenv;
00101 {
00102         COMPQUIET(dbenv, NULL);
00103         return (0);
00104 }
00105 
00106 void
00107 __rep_dbenv_refresh(dbenv)
00108         DB_ENV *dbenv;
00109 {
00110         COMPQUIET(dbenv, NULL);
00111         return;
00112 }
00113 
00114 int
00115 __rep_elect(dbenv, nsites, nvotes, priority, timeout, eidp, flags)
00116         DB_ENV *dbenv;
00117         int nsites, nvotes, priority;
00118         u_int32_t timeout, flags;
00119         int *eidp;
00120 {
00121         COMPQUIET(nsites, 0);
00122         COMPQUIET(nvotes, 0);
00123         COMPQUIET(priority, 0);
00124         COMPQUIET(timeout, 0);
00125         COMPQUIET(eidp, NULL);
00126         COMPQUIET(flags, 0);
00127         return (__db_norep(dbenv));
00128 }
00129 
00130 int
00131 __rep_flush(dbenv)
00132         DB_ENV *dbenv;
00133 {
00134         return (__db_norep(dbenv));
00135 }
00136 
00137 int
00138 __rep_get_config(dbenv, which, onp)
00139         DB_ENV *dbenv;
00140         u_int32_t which;
00141         int *onp;
00142 {
00143         COMPQUIET(which, 0);
00144         COMPQUIET(onp, NULL);
00145         return (__db_norep(dbenv));
00146 }
00147 
00148 int
00149 __rep_set_config(dbenv, which, on)
00150         DB_ENV *dbenv;
00151         u_int32_t which;
00152         int on;
00153 {
00154         COMPQUIET(which, 0);
00155         COMPQUIET(on, 0);
00156         return (__db_norep(dbenv));
00157 }
00158 
00159 int
00160 __rep_get_limit(dbenv, gbytesp, bytesp)
00161         DB_ENV *dbenv;
00162         u_int32_t *gbytesp, *bytesp;
00163 {
00164         COMPQUIET(gbytesp, NULL);
00165         COMPQUIET(bytesp, NULL);
00166         return (__db_norep(dbenv));
00167 }
00168 
00169 int
00170 __rep_get_gen(dbenv, genp)
00171         DB_ENV *dbenv;
00172         u_int32_t *genp;
00173 {
00174         COMPQUIET(genp, NULL);
00175         return (__db_norep(dbenv));
00176 }
00177 
00178 int
00179 __rep_is_client(dbenv)
00180         DB_ENV *dbenv;
00181 {
00182         COMPQUIET(dbenv, NULL);
00183         return (0);
00184 }
00185 
00186 int
00187 __rep_noarchive(dbenv)
00188         DB_ENV *dbenv;
00189 {
00190         COMPQUIET(dbenv, NULL);
00191         return (0);
00192 }
00193 
00194 int
00195 __rep_open(dbenv)
00196         DB_ENV *dbenv;
00197 {
00198         COMPQUIET(dbenv, NULL);
00199         return (0);
00200 }
00201 
00202 int
00203 __rep_preclose(dbenv)
00204         DB_ENV *dbenv;
00205 {
00206         return (__db_norep(dbenv));
00207 }
00208 
00209 int
00210 __rep_process_message(dbenv, control, rec, eidp, ret_lsnp)
00211         DB_ENV *dbenv;
00212         DBT *control, *rec;
00213         int *eidp;
00214         DB_LSN *ret_lsnp;
00215 {
00216         COMPQUIET(control, NULL);
00217         COMPQUIET(rec, NULL);
00218         COMPQUIET(eidp, NULL);
00219         COMPQUIET(ret_lsnp, NULL);
00220         return (__db_norep(dbenv));
00221 }
00222 
00223 int
00224 __rep_region_destroy(dbenv)
00225         DB_ENV *dbenv;
00226 {
00227         COMPQUIET(dbenv, NULL);
00228         return (0);
00229 }
00230 
00231 int
00232 __rep_region_init(dbenv)
00233         DB_ENV *dbenv;
00234 {
00235         COMPQUIET(dbenv, NULL);
00236         return (0);
00237 }
00238 
00239 int
00240 __rep_send_message(dbenv, eid, rtype, lsnp, dbtp, logflags, repflags)
00241         DB_ENV *dbenv;
00242         int eid;
00243         u_int32_t rtype;
00244         DB_LSN *lsnp;
00245         const DBT *dbtp;
00246         u_int32_t logflags, repflags;
00247 {
00248         COMPQUIET(eid, 0);
00249         COMPQUIET(rtype, 0);
00250         COMPQUIET(lsnp, NULL);
00251         COMPQUIET(dbtp, NULL);
00252         COMPQUIET(logflags, 0);
00253         COMPQUIET(repflags, 0);
00254         return (__db_norep(dbenv));
00255 }
00256 
00257 int
00258 __rep_set_limit(dbenv, gbytes, bytes)
00259         DB_ENV *dbenv;
00260         u_int32_t gbytes, bytes;
00261 {
00262         COMPQUIET(gbytes, 0);
00263         COMPQUIET(bytes, 0);
00264         return (__db_norep(dbenv));
00265 }
00266 
00267 int
00268 __rep_set_rep_transport(dbenv, eid, f_send)
00269         DB_ENV *dbenv;
00270         int eid;
00271         int (*f_send) __P((DB_ENV *, const DBT *, const DBT *, const DB_LSN *,
00272             int, u_int32_t));
00273 {
00274         COMPQUIET(eid, 0);
00275         COMPQUIET(f_send, NULL);
00276         return (__db_norep(dbenv));
00277 }
00278 
00279 int
00280 __rep_set_request(dbenv, min, max)
00281         DB_ENV *dbenv;
00282         u_int32_t min, max;
00283 {
00284         COMPQUIET(min, 0);
00285         COMPQUIET(max, 0);
00286         return (__db_norep(dbenv));
00287 }
00288 
00289 int
00290 __rep_start(dbenv, dbt, flags)
00291         DB_ENV *dbenv;
00292         DBT *dbt;
00293         u_int32_t flags;
00294 {
00295         COMPQUIET(dbt, NULL);
00296         COMPQUIET(flags, 0);
00297         return (__db_norep(dbenv));
00298 }
00299 
00300 int
00301 __rep_stat_pp(dbenv, statp, flags)
00302         DB_ENV *dbenv;
00303         DB_REP_STAT **statp;
00304         u_int32_t flags;
00305 {
00306         COMPQUIET(statp, NULL);
00307         COMPQUIET(flags, 0);
00308         return (__db_norep(dbenv));
00309 }
00310 
00311 int
00312 __rep_stat_print_pp(dbenv, flags)
00313         DB_ENV *dbenv;
00314         u_int32_t flags;
00315 {
00316         COMPQUIET(flags, 0);
00317         return (__db_norep(dbenv));
00318 }
00319 
00320 int
00321 __rep_stat_print(dbenv, flags)
00322         DB_ENV *dbenv;
00323         u_int32_t flags;
00324 {
00325         COMPQUIET(flags, 0);
00326         return (__db_norep(dbenv));
00327 }
00328 
00329 int
00330 __rep_sync(dbenv, flags)
00331         DB_ENV *dbenv;
00332         u_int32_t flags;
00333 {
00334         COMPQUIET(flags, 0);
00335         return (__db_norep(dbenv));
00336 }
00337 #endif /* !HAVE_REPLICATION */

Generated on Sun Dec 25 12:14:45 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2