2001-05-23 15:26:42 +02:00
|
|
|
/*
|
|
|
|
* PROGRAM: JRD Access Method
|
|
|
|
* MODULE: tra_proto.h
|
2003-10-29 11:53:47 +01:00
|
|
|
* DESCRIPTION: Prototype header file for tra.cpp
|
2001-05-23 15:26:42 +02:00
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Interbase Public
|
|
|
|
* License Version 1.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy
|
|
|
|
* of the License at http://www.Inprise.com/IPL.html
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an
|
|
|
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
|
|
|
* or implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code was created by Inprise Corporation
|
|
|
|
* and its predecessors. Portions created by Inprise Corporation are
|
|
|
|
* Copyright (C) Inprise Corporation.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
* Contributor(s): ______________________________________.
|
|
|
|
*/
|
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#ifndef JRD_TRA_PROTO_H
|
|
|
|
#define JRD_TRA_PROTO_H
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2004-10-07 11:15:32 +02:00
|
|
|
#include "../jrd/tra.h"
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2004-03-20 15:57:40 +01:00
|
|
|
namespace Jrd {
|
|
|
|
class Attachment;
|
|
|
|
class Database;
|
2012-05-12 11:48:32 +02:00
|
|
|
class TraceTransactionEnd;
|
2004-03-20 15:57:40 +01:00
|
|
|
}
|
|
|
|
|
2012-05-19 14:04:37 +02:00
|
|
|
bool TRA_active_transactions(Jrd::thread_db* tdbb, Jrd::Database*);
|
2004-03-20 15:57:40 +01:00
|
|
|
void TRA_cleanup(Jrd::thread_db*);
|
2012-05-19 14:04:37 +02:00
|
|
|
void TRA_commit(Jrd::thread_db* tdbb, Jrd::jrd_tra*, const bool);
|
|
|
|
void TRA_extend_tip(Jrd::thread_db* tdbb, ULONG /*, struct Jrd::win* */);
|
|
|
|
int TRA_fetch_state(Jrd::thread_db* tdbb, TraNumber number);
|
|
|
|
void TRA_get_inventory(Jrd::thread_db* tdbb, UCHAR*, TraNumber base, TraNumber top);
|
|
|
|
int TRA_get_state(Jrd::thread_db* tdbb, TraNumber number);
|
2003-11-06 04:03:36 +01:00
|
|
|
|
2001-05-23 15:26:42 +02:00
|
|
|
#ifdef SUPERSERVER_V2
|
2012-05-19 14:04:37 +02:00
|
|
|
void TRA_header_write(Jrd::thread_db* tdbb, Jrd::Database* dbb, TraNumber number);
|
2001-05-23 15:26:42 +02:00
|
|
|
#endif
|
2010-04-02 23:48:15 +02:00
|
|
|
void TRA_init(Jrd::Attachment*);
|
2012-05-19 14:04:37 +02:00
|
|
|
void TRA_invalidate(Jrd::thread_db* tdbb, ULONG);
|
2008-02-28 14:48:16 +01:00
|
|
|
void TRA_link_cursor(Jrd::jrd_tra*, Jrd::dsql_req*);
|
|
|
|
void TRA_unlink_cursor(Jrd::jrd_tra*, Jrd::dsql_req*);
|
2012-05-19 14:04:37 +02:00
|
|
|
void TRA_post_resources(Jrd::thread_db* tdbb, Jrd::jrd_tra*, Jrd::ResourceList&);
|
2013-09-12 21:08:59 +02:00
|
|
|
bool TRA_pc_active(Jrd::thread_db*, TraNumber);
|
2012-05-19 14:04:37 +02:00
|
|
|
bool TRA_precommited(Jrd::thread_db* tdbb, TraNumber old_number, TraNumber new_number);
|
|
|
|
void TRA_prepare(Jrd::thread_db* tdbb, Jrd::jrd_tra*, USHORT, const UCHAR*);
|
|
|
|
Jrd::jrd_tra* TRA_reconnect(Jrd::thread_db* tdbb, const UCHAR*, USHORT);
|
|
|
|
void TRA_release_transaction(Jrd::thread_db* tdbb, Jrd::jrd_tra*, Jrd::TraceTransactionEnd*);
|
|
|
|
void TRA_rollback(Jrd::thread_db* tdbb, Jrd::jrd_tra*, const bool, const bool);
|
|
|
|
void TRA_set_state(Jrd::thread_db* tdbb, Jrd::jrd_tra* transaction, TraNumber number, int state);
|
|
|
|
int TRA_snapshot_state(Jrd::thread_db* tdbb, const Jrd::jrd_tra*, TraNumber number);
|
|
|
|
Jrd::jrd_tra* TRA_start(Jrd::thread_db* tdbb, ULONG flags, SSHORT lock_timeout, Jrd::jrd_tra* outer = NULL);
|
|
|
|
Jrd::jrd_tra* TRA_start(Jrd::thread_db* tdbb, int, const UCHAR*, Jrd::jrd_tra* outer = NULL);
|
|
|
|
int TRA_state(const UCHAR*, TraNumber oldest, TraNumber number);
|
2012-08-28 20:19:09 +02:00
|
|
|
void TRA_sweep(Jrd::thread_db* tdbb);
|
2012-05-19 14:04:37 +02:00
|
|
|
int TRA_wait(Jrd::thread_db* tdbb, Jrd::jrd_tra* trans, TraNumber number, Jrd::jrd_tra::wait_t wait);
|
2004-12-07 02:19:55 +01:00
|
|
|
void TRA_attach_request(Jrd::jrd_tra* transaction, Jrd::jrd_req* request);
|
|
|
|
void TRA_detach_request(Jrd::jrd_req* request);
|
2001-05-23 15:26:42 +02:00
|
|
|
|
2003-10-03 03:53:34 +02:00
|
|
|
#endif // JRD_TRA_PROTO_H
|