public class DefaultJournalStore extends Object implements JournalStore
| Constructor and Description |
|---|
DefaultJournalStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
ack(long revision)
Records a ack for a change
|
void |
destroy()
Destroy the logs.
|
long |
getCurrentRevision()
Gets the current revision of the server (a.k.a.
|
String |
getFileName() |
void |
init(DirectoryService service)
Initialize the interceptor
|
boolean |
log(LdapPrincipal principal,
long revision,
org.apache.directory.api.ldap.model.ldif.LdifEntry forward)
Stores an event into the journal.
|
boolean |
nack(long revision)
Records a nack for a change
|
void |
setFileName(String fileName)
The file name to use as the journal file.
|
void |
setWorkingDirectory(String workingDirectoryName)
The working directory on which the journal file will be stored.
|
void |
sync()
Write the changes on disk
|
public void destroy()
throws Exception
destroy in interface JournalStoreException - If we can't destroy the logspublic void init(DirectoryService service) throws Exception
init in interface JournalStoreservice - The associated DirectoryServiceException - If the initialization failedpublic boolean log(LdapPrincipal principal, long revision, org.apache.directory.api.ldap.model.ldif.LdifEntry forward)
log in interface JournalStoreprincipal - The principal who is logging the changerevision - The operation revisionforward - The change to logtrue if the entry has been writtenpublic boolean ack(long revision)
ack in interface JournalStorerevision - The change revision which is ackedtrue if the ack has been writtenException - if there are problems logging the ackpublic boolean nack(long revision)
nack in interface JournalStorerevision - The change revision which is nackedtrue if the nack has been writtenException - if there are problems logging the nackpublic void sync()
throws Exception
JournalStoresync in interface JournalStoreException - If the write failedpublic long getCurrentRevision()
JournalStoregetCurrentRevision in interface JournalStorepublic String getFileName()
public void setFileName(String fileName)
JournalStoresetFileName in interface JournalStorefileName - the fileName to setpublic void setWorkingDirectory(String workingDirectoryName)
setWorkingDirectory in interface JournalStoreworkingDirectoryName - The working directory in which the journal file
will be storedCopyright © 2021. All rights reserved.