From Thu Mar 15 15:47:23 2012 Return-Path: X-Original-To: Delivered-To: Received: from ( []) by (Postfix) with SMTP id 42D999D5C for ; Thu, 15 Mar 2012 15:47:22 +0000 (UTC) Received: (qmail 58086 invoked by uid 500); 15 Mar 2012 15:47:22 -0000 Delivered-To: Received: (qmail 58012 invoked by uid 500); 15 Mar 2012 15:47:22 -0000 Mailing-List: contact; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list Received: (qmail 57988 invoked by uid 99); 15 Mar 2012 15:47:21 -0000 Received: from (HELO ( by (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 15:47:21 +0000 X-ASF-Spam-Status: No, hits=-1994.3 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MIME_HTML_ONLY X-Spam-Check-By: Received: from [] (HELO ( by (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 15:47:20 +0000 Received: from thor (localhost []) by (8.13.8+Sun/8.13.8) with ESMTP id q2FFl0ff000994 for ; Thu, 15 Mar 2012 15:47:00 GMT Date: Thu, 15 Mar 2012 11:47:00 -0400 (EDT) From: To: Message-ID: <2881534.50737.1331826420022.JavaMail.confluence@thor> Subject: [CONF] Apache Directory SandBox > TxnLogmanager architecture MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on

TxnLogmanager architecture

Page added by Emmanuel L=C3=A9charny

This class is used to log the transactions in a file. We store = LogEdit instances. Here is the hierarchy for LogEdit :

Unable to render embedded object: File ( g) not found.

When an operation is executed (a modification, we don't log anything for= searches), we will store two or three records :

  • a TXN_BEGIN record, to mark the beginning of a transaction
  • =09
  • an optional DataChangeContainer, which will contain all the modified= index and entries
  • =09
  • a TXN_COMMIT or TXN_ABORT, depending on the success or failure of th= e operation.

Those elements will be serialized into a UserLogRecord, following these = structures (the UserLogRecord will contains either a TxnStateChange or a Da= taChangeContainer) :

Unable to render embedded object: File (UserLogRec= ord.png) not found.

All those structure will be serialized using the minimal size, so we use= Externizable classes and we use readExternal() and writeExternal() directl= y, to save some bytes and time (this serialization is done in a locked sect= ion).