Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 00C1A7C19 for ; Tue, 1 Nov 2011 10:52:54 +0000 (UTC) Received: (qmail 18133 invoked by uid 500); 1 Nov 2011 10:52:53 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 18089 invoked by uid 500); 1 Nov 2011 10:52:53 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 18082 invoked by uid 99); 1 Nov 2011 10:52:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 10:52:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 10:52:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6C0EC238899C for ; Tue, 1 Nov 2011 10:52:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1195923 - in /directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log: InvalidLogException.java Log.java Date: Tue, 01 Nov 2011 10:52:32 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111101105232.6C0EC238899C@eris.apache.org> Author: elecharny Date: Tue Nov 1 10:52:31 2011 New Revision: 1195923 URL: http://svn.apache.org/viewvc?rev=1195923&view=rev Log: Added javadoc Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/InvalidLogException.java directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/Log.java Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/InvalidLogException.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/InvalidLogException.java?rev=1195923&r1=1195922&r2=1195923&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/InvalidLogException.java (original) +++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/InvalidLogException.java Tue Nov 1 10:52:31 2011 @@ -26,22 +26,45 @@ package org.apache.directory.server.core */ public class InvalidLogException extends Exception { + /** The serial version UID */ + private static final long serialVersionUID = 1L; + + /** + * Creates a new instance of InvalidLogException + */ public InvalidLogException() {} - public InvalidLogException(String s) + /** + * Creates a new instance of InvalidLogException with a message + * + * @param message The associated error message + */ + public InvalidLogException( String message ) { - super(s); + super( message ); } - public InvalidLogException(Throwable cause) + /** + * Creates a new instance of InvalidLogException with an original cause + * + * @param cause The associated error cause + */ + public InvalidLogException( Throwable cause ) { - super(cause); + super( cause ); } - public InvalidLogException(String s, Throwable cause) + /** + * Creates a new instance of InvalidLogException with a message + * and an original cause + * + * @param message The associated error message + * @param cause The associated error cause + */ + public InvalidLogException( String message, Throwable cause ) { - super(s, cause); + super( message, cause ); } } Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/Log.java URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/Log.java?rev=1195923&r1=1195922&r2=1195923&view=diff ============================================================================== --- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/Log.java (original) +++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/log/Log.java Tue Nov 1 10:52:31 2011 @@ -22,6 +22,9 @@ package org.apache.directory.server.core import java.io.IOException; /** + * An interface for the Log sub-system.
+ * The log subsystem is used to log some records on disk, allowing the users to read back them + * if needed. * * @author Apache Directory Project */ @@ -34,8 +37,8 @@ public interface Log * @param suffix suffix for log file. * @param logBufferSize size of buffer that will hold unflushed log changes. Specify zero if no buffering is desired * @param logFileSize A soft limit on the log file size - * @throws IOException - * @throws InvalidLogException + * @throws IOException If we can't initialize the Log + * @throws InvalidLogException If the log contains some bad records */ void init( String logFilepath, String suffix, int logBufferSize, long logFileSize ) throws IOException, InvalidLogException; @@ -45,8 +48,8 @@ public interface Log * * @param userLogRecord provides the user data to be logged * @param sync if true, this calls returns after making sure that the appended data is reflected to the underlying media - * @throws IOException - * @throws InvalidLogException + * @throws IOException If we can't store the record + * @throws InvalidLogException If the record is not valid */ void log( UserLogRecord userRecord, boolean sync ) throws IOException, InvalidLogException; @@ -61,7 +64,7 @@ public interface Log /** - * Starts a scan in the logs starting from the beginning of the log file + * Starts a scan in the logs starting from the last checkpoint. * * @return A scanner to read the logs one by one */ @@ -72,15 +75,18 @@ public interface Log * Advances the min needed position in the logs. Logging subsystem uses this * information to get rid of unneeded * - * @param newAnchor + * @param newAnchor The new position */ void advanceMinNeededLogPosition( LogAnchor newAnchor ); + /** * Syncs the log upto the given lsn. If lsn is equal to unknow lsn, then the log is * flushed upto the latest logged lsn. * * @param uptoLSN lsn to flush upto. Unkown lsn if caller just wants to sync the log upto the latest logged lsn. + * @throws IOException If we can't flush the data on disk + * @throws InvalidLogException If the log contains some bad records */ void sync( long uptoLSN ) throws IOException, InvalidLogException; }