org.apache.directory.server.core.changelog
Class DefaultChangeLog

java.lang.Object
  extended by org.apache.directory.server.core.changelog.DefaultChangeLog
All Implemented Interfaces:
ChangeLog

public class DefaultChangeLog
extends java.lang.Object
implements ChangeLog

The default ChangeLog service implementation. It stores operations in memory. Entries are stored into a dedicated partition, named ou=changelog, under which we have two other sub-entries : ou=tags and ou= revisions : ou=changelog | +-- ou=revisions | +-- ou=tags

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

Constructor Summary
DefaultChangeLog()
           
 
Method Summary
 void destroy()
          
 ChangeLogSearchEngine getChangeLogSearchEngine()
          
 ChangeLogStore getChangeLogStore()
          
 long getCurrentRevision()
          
 Tag getLatest()
          
 TagSearchEngine getTagSearchEngine()
          
 void init(DirectoryService service)
          Initialize the ChangeLog system.
 boolean isEnabled()
          
 boolean isExposed()
          
 boolean isLogSearchSupported()
          
 boolean isTagSearchSupported()
          
 boolean isTagStorageSupported()
          
 ChangeLogEvent log(LdapPrincipal principal, org.apache.directory.shared.ldap.ldif.LdifEntry forward, org.apache.directory.shared.ldap.ldif.LdifEntry reverse)
          
 ChangeLogEvent log(LdapPrincipal principal, org.apache.directory.shared.ldap.ldif.LdifEntry forward, java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> reverses)
          
 void setChangeLogStore(ChangeLogStore store)
           If there is an existing changeLog store, we don't switch it
 void setEnabled(boolean enabled)
          
 void setExposed(boolean exposed)
          
 void setPartitionSuffix(java.lang.String suffix)
          
 void setRevisionsContainerName(java.lang.String revContainerName)
          
 void setTagsContainerName(java.lang.String tagContainerName)
          
 void sync()
          
 Tag tag()
          
 Tag tag(long revision)
          
 Tag tag(long revision, java.lang.String description)
          
 Tag tag(java.lang.String description)
          
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultChangeLog

public DefaultChangeLog()
Method Detail

getChangeLogStore

public ChangeLogStore getChangeLogStore()

Specified by:
getChangeLogStore in interface ChangeLog

setChangeLogStore

public void setChangeLogStore(ChangeLogStore store)
If there is an existing changeLog store, we don't switch it

Specified by:
setChangeLogStore in interface ChangeLog

getCurrentRevision

public long getCurrentRevision()
                        throws java.lang.Exception

Specified by:
getCurrentRevision in interface ChangeLog
Throws:
java.lang.Exception

log

public ChangeLogEvent log(LdapPrincipal principal,
                          org.apache.directory.shared.ldap.ldif.LdifEntry forward,
                          org.apache.directory.shared.ldap.ldif.LdifEntry reverse)
                   throws java.lang.Exception

Specified by:
log in interface ChangeLog
Throws:
java.lang.Exception

log

public ChangeLogEvent log(LdapPrincipal principal,
                          org.apache.directory.shared.ldap.ldif.LdifEntry forward,
                          java.util.List<org.apache.directory.shared.ldap.ldif.LdifEntry> reverses)
                   throws java.lang.Exception

Specified by:
log in interface ChangeLog
Throws:
java.lang.Exception

isLogSearchSupported

public boolean isLogSearchSupported()

Specified by:
isLogSearchSupported in interface ChangeLog

isTagSearchSupported

public boolean isTagSearchSupported()

Specified by:
isTagSearchSupported in interface ChangeLog

isTagStorageSupported

public boolean isTagStorageSupported()

Specified by:
isTagStorageSupported in interface ChangeLog

getChangeLogSearchEngine

public ChangeLogSearchEngine getChangeLogSearchEngine()

Specified by:
getChangeLogSearchEngine in interface ChangeLog

getTagSearchEngine

public TagSearchEngine getTagSearchEngine()

Specified by:
getTagSearchEngine in interface ChangeLog

tag

public Tag tag(long revision,
               java.lang.String description)
        throws java.lang.Exception

Specified by:
tag in interface ChangeLog
Throws:
java.lang.Exception

tag

public Tag tag(long revision)
        throws java.lang.Exception

Specified by:
tag in interface ChangeLog
Throws:
java.lang.Exception

tag

public Tag tag(java.lang.String description)
        throws java.lang.Exception

Specified by:
tag in interface ChangeLog
Throws:
java.lang.Exception

tag

public Tag tag()
        throws java.lang.Exception

Specified by:
tag in interface ChangeLog
Throws:
java.lang.Exception

setEnabled

public void setEnabled(boolean enabled)

Specified by:
setEnabled in interface ChangeLog

isEnabled

public boolean isEnabled()

Specified by:
isEnabled in interface ChangeLog

getLatest

public Tag getLatest()
              throws java.lang.Exception

Specified by:
getLatest in interface ChangeLog
Throws:
java.lang.Exception

init

public void init(DirectoryService service)
          throws java.lang.Exception
Initialize the ChangeLog system. We will initialize the associated store.

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

sync

public void sync()
          throws java.lang.Exception

Specified by:
sync in interface ChangeLog
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception

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

isExposed

public boolean isExposed()

Specified by:
isExposed in interface ChangeLog

setExposed

public void setExposed(boolean exposed)

Specified by:
setExposed in interface ChangeLog

setPartitionSuffix

public void setPartitionSuffix(java.lang.String suffix)

Specified by:
setPartitionSuffix in interface ChangeLog

setRevisionsContainerName

public void setRevisionsContainerName(java.lang.String revContainerName)

Specified by:
setRevisionsContainerName in interface ChangeLog

setTagsContainerName

public void setTagsContainerName(java.lang.String tagContainerName)

Specified by:
setTagsContainerName in interface ChangeLog

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


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