org.apache.directory.server.core.journal
Interface Journal

All Known Implementing Classes:
DefaultJournal

public interface Journal

A facade for the Journal subsystem.

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

Method Summary
 void ack(long revision)
          Records a ack for a change
 void destroy()
          Destroy the journal service
 JournalStore getJournalStore()
           
 int getRotation()
           
 void init(DirectoryService service)
          Initialize the Journal.
 boolean isEnabled()
          Checks whether or not the Journal has been enabled.
 void log(LdapPrincipal principal, long revision, org.apache.directory.shared.ldap.ldif.LdifEntry entry)
          Records a change as an LDIF entry.
 void nack(long revision)
          Records a nack for a change
 void setEnabled(boolean enabled)
          Enable or disable the Journal service
 void setJournalStore(JournalStore store)
          Set the underlying storage
 void setRotation(int rotation)
           
 

Method Detail

isEnabled

boolean isEnabled()
Checks whether or not the Journal has been enabled.

Returns:
true if the Journal is logging changes, false otherwise

setEnabled

void setEnabled(boolean enabled)
Enable or disable the Journal service

Parameters:
enabled - true to enable the service, false to disable it

getJournalStore

JournalStore getJournalStore()
Returns:
The underlying storage

setJournalStore

void setJournalStore(JournalStore store)
Set the underlying storage

Parameters:
store - The storage

log

void log(LdapPrincipal principal,
         long revision,
         org.apache.directory.shared.ldap.ldif.LdifEntry entry)
         throws java.lang.Exception
Records a change as an LDIF entry.

Parameters:
principal - the authorized LDAP principal triggering the change
revision - the operation revision
forward - LDIF of the change going to the next state
Throws:
java.lang.Exception - if there are problems logging the change

ack

void ack(long revision)
Records a ack for a change

Parameters:
revision - The change revision which is acked

nack

void nack(long revision)
Records a nack for a change

Parameters:
revision - The change revision which is acked

init

void init(DirectoryService service)
          throws java.lang.Exception
Initialize the Journal.

Parameters:
service - The associated DirectoryService
Throws:
java.lang.Exception - If something went wrong

destroy

void destroy()
             throws java.lang.Exception
Destroy the journal service

Throws:
java.lang.Exception - If something went wrong

getRotation

int getRotation()
Returns:
the rotation

setRotation

void setRotation(int rotation)
Parameters:
rotation - the rotation to set


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.