Mercurial > hg > openjdk > jigsaw > bdb
view src/dbinc_auto/repmgr_auto.h @ 0:a1985f14b030
Initial load
author | chegar |
---|---|
date | Fri, 11 May 2012 10:42:02 +0100 |
parents | |
children |
line wrap: on
line source
/* Do not edit: automatically built by gen_rec.awk. * * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. * * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ #ifndef __repmgr_AUTO_H #define __repmgr_AUTO_H #ifdef HAVE_REPLICATION_THREADS #include "dbinc/log.h" #define DB___repmgr_member 200 typedef struct ___repmgr_member_args { u_int32_t type; DB_TXN *txnp; DB_LSN prev_lsn; u_int32_t version; u_int32_t prev_status; u_int32_t status; DBT host; u_int32_t port; } __repmgr_member_args; extern __DB_IMPORT DB_LOG_RECSPEC __repmgr_member_desc[]; static inline int __repmgr_member_log(ENV *env, DB_TXN *txnp, DB_LSN *ret_lsnp, u_int32_t flags, u_int32_t version, u_int32_t prev_status, u_int32_t status, const DBT *host, u_int32_t port) { return (__log_put_record(env, NULL, txnp, ret_lsnp, flags, DB___repmgr_member, 0, sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(DB_LSN) + sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(u_int32_t) + LOG_DBT_SIZE(host) + sizeof(u_int32_t), __repmgr_member_desc, version, prev_status, status, host, port)); } static inline int __repmgr_member_read(ENV *env, void *data, __repmgr_member_args **arg) { *arg = NULL; return (__log_read_record(env, NULL, NULL, data, __repmgr_member_desc, sizeof(__repmgr_member_args), (void**)arg)); } #endif /* HAVE_REPLICATION_THREADS */ #endif