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

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

public class DefaultJournalStore
extends java.lang.Object
implements JournalStore

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

Constructor Summary
DefaultJournalStore()
           
 
Method Summary
 boolean ack(long revision)
          Records a ack for a change
 void destroy()
          
 long getCurrentRevision()
           
 java.lang.String getFileName()
           
 void init(DirectoryService service)
          Initialize the interceptor
 boolean log(LdapPrincipal principal, long revision, org.apache.directory.shared.ldap.ldif.LdifEntry forward)
          Stores an event into the journal.
 boolean nack(long revision)
          Records a nack for a change
 void setFileName(java.lang.String fileName)
           
 void setWorkingDirectory(java.lang.String workingDirectoryName)
          
 void sync()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJournalStore

public DefaultJournalStore()
Method Detail

destroy

public void destroy()
             throws java.lang.Exception

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

init

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

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

log

public boolean log(LdapPrincipal principal,
                   long revision,
                   org.apache.directory.shared.ldap.ldif.LdifEntry forward)
Stores an event into the journal.

Specified by:
log in interface JournalStore
Parameters:
principal - The principal who is logging the change
revision - The operation revision
forward - The change to log

ack

public boolean ack(long revision)
Records a ack for a change

Specified by:
ack in interface JournalStore
Parameters:
revision - The change revision which is acked
Returns:
true if the ack has been written
Throws:
java.lang.Exception - if there are problems logging the ack

nack

public boolean nack(long revision)
Records a nack for a change

Specified by:
nack in interface JournalStore
Parameters:
revision - The change revision which is nacked
Returns:
true if the nack has been written
Throws:
java.lang.Exception - if there are problems logging the nack

sync

public void sync()
          throws java.lang.Exception
Specified by:
sync in interface JournalStore
Throws:
java.lang.Exception

getCurrentRevision

public long getCurrentRevision()
Specified by:
getCurrentRevision in interface JournalStore

getFileName

public java.lang.String getFileName()
Returns:
the fileName

setFileName

public void setFileName(java.lang.String fileName)
Specified by:
setFileName in interface JournalStore
Parameters:
fileName - the fileName to set

setWorkingDirectory

public void setWorkingDirectory(java.lang.String workingDirectoryName)

Specified by:
setWorkingDirectory in interface JournalStore


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