|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.journal.DefaultJournal
public class DefaultJournal
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.
Constructor Summary | |
---|---|
DefaultJournal()
|
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 directoryService)
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultJournal()
Method Detail |
---|
public void destroy() throws java.lang.Exception
destroy
in interface Journal
java.lang.Exception
- If something went wrongpublic JournalStore getJournalStore()
getJournalStore
in interface Journal
public void init(DirectoryService directoryService) throws java.lang.Exception
init
in interface Journal
directoryService
- The associated DirectoryService
java.lang.Exception
- If something went wrongpublic boolean isEnabled()
isEnabled
in interface Journal
public void log(LdapPrincipal principal, long revision, org.apache.directory.shared.ldap.ldif.LdifEntry entry) throws java.lang.Exception
log
in interface Journal
principal
- the authorized LDAP principal triggering the changerevision
- the operation revision
java.lang.Exception
- if there are problems logging the changepublic void ack(long revision)
ack
in interface Journal
revision
- The change revision which is ackedpublic void nack(long revision)
nack
in interface Journal
revision
- The change revision which is ackedpublic 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 storage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |