public class DefaultJournal extends Object implements Journal
Constructor and Description |
---|
DefaultJournal() |
Modifier and Type | Method and Description |
---|---|
void |
ack(long revision)
Records a ack for a change
|
void |
destroy()
Destroy the journal service
|
JournalStore |
getJournalStore() |
int |
getRotation() |
void |
init(DirectoryService directoryService)
Initialize the Journal.
|
boolean |
isEnabled()
Checks whether or not the Journal has been enabled.
|
void |
log(LdapPrincipal principal,
long revision,
org.apache.directory.api.ldap.model.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) |
public DefaultJournal()
public void destroy() throws org.apache.directory.api.ldap.model.exception.LdapException
public JournalStore getJournalStore()
getJournalStore
in interface Journal
public void init(DirectoryService directoryService) throws org.apache.directory.api.ldap.model.exception.LdapException
public boolean isEnabled()
public void log(LdapPrincipal principal, long revision, org.apache.directory.api.ldap.model.ldif.LdifEntry entry) throws org.apache.directory.api.ldap.model.exception.LdapException
log
in interface Journal
principal
- the authorized LDAP principal triggering the changerevision
- the operation revisionentry
- LDIF of the change going to the next stateorg.apache.directory.api.ldap.model.exception.LdapException
- if there are problems logging the changepublic void ack(long revision)
public void nack(long revision)
public int getRotation()
getRotation
in interface Journal
public void setRotation(int rotation)
setRotation
in interface Journal
rotation
- the rotation to setpublic void setEnabled(boolean enabled)
Journal
setEnabled
in interface Journal
enabled
- true to enable the service, false to disable itpublic void setJournalStore(JournalStore store)
Journal
setJournalStore
in interface Journal
store
- The storageCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.