org.apache.directory.server.core.journal
Class DefaultJournal

java.lang.Object
  extended by org.apache.directory.server.core.journal.DefaultJournal
All Implemented Interfaces:
Journal

public class DefaultJournal
extends java.lang.Object
implements Journal

The default journal implementation. It stores the operation and the associated status (acked or nacked) in a file which will be used to restore the server if it crashes.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
DefaultJournal()
           
 
Method Summary
 void ack(long revision)
          
 void destroy()
          
 JournalStore getJournalStore()
          
 int getRotation()
           
 void init(DirectoryService directoryService)
          
 boolean isEnabled()
          
 void log(LdapPrincipal principal, long revision, org.apache.directory.shared.ldap.ldif.LdifEntry entry)
          
 void nack(long revision)
          
 void setEnabled(boolean enabled)
           
 void setJournalStore(JournalStore store)
           
 void setRotation(int rotation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJournal

public DefaultJournal()
Method Detail

destroy

public void destroy()
             throws java.lang.Exception

Specified by:
destroy in interface Journal
Throws:
java.lang.Exception

getJournalStore

public JournalStore getJournalStore()

Specified by:
getJournalStore in interface Journal

init

public void init(DirectoryService directoryService)
          throws java.lang.Exception

Specified by:
init in interface Journal
Throws:
java.lang.Exception

isEnabled

public boolean isEnabled()

Specified by:
isEnabled in interface Journal

log

public void log(LdapPrincipal principal,
                long revision,
                org.apache.directory.shared.ldap.ldif.LdifEntry entry)
         throws java.lang.Exception

Specified by:
log in interface Journal
Throws:
java.lang.Exception

ack

public void ack(long revision)

Specified by:
ack in interface Journal

nack

public void nack(long revision)

Specified by:
nack in interface Journal

getRotation

public int getRotation()
Specified by:
getRotation in interface Journal
Returns:
the rotation

setRotation

public void setRotation(int rotation)
Specified by:
setRotation in interface Journal
Parameters:
rotation - the rotation to set

setEnabled

public void setEnabled(boolean enabled)
Specified by:
setEnabled in interface Journal

setJournalStore

public void setJournalStore(JournalStore store)
Specified by:
setJournalStore in interface Journal


Copyright © 2003-2010 The Apache Software Foundation. All Rights Reserved.