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

java.lang.Object
  extended by org.apache.directory.server.core.changelog.MemoryChangeLogStore
All Implemented Interfaces:
ChangeLogStore, TaggableChangeLogStore

public class MemoryChangeLogStore
extends java.lang.Object
implements TaggableChangeLogStore

A change log store that keeps it's information in memory.

Version:
$Rev$, $Date$ TODO remove the NamingException
Author:
Apache Directory Project
XBean

Constructor Summary
MemoryChangeLogStore()
           
 
Method Summary
 void destroy()
          Save logs, tags and revision on disk, and clean everything in memory
 org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> find()
           
 org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> find(long startRevision, long endRevision)
           
 org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> findAfter(long revision)
           
 org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> findBefore(long revision)
           
 long getCurrentRevision()
           
 Tag getLatest()
           
 void init(DirectoryService service)
           
 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)
          
 ChangeLogEvent lookup(long revision)
           
 Tag removeTag(long revision)
           
 void sync()
           
 Tag tag()
          
 Tag tag(long revision)
          
 Tag tag(long revision, java.lang.String descrition)
           
 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

MemoryChangeLogStore

public MemoryChangeLogStore()
Method Detail

tag

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

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

tag

public Tag tag()
        throws java.lang.Exception

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

tag

public Tag tag(java.lang.String description)
        throws java.lang.Exception
Specified by:
tag in interface TaggableChangeLogStore
Throws:
java.lang.Exception

init

public void init(DirectoryService service)
          throws java.lang.Exception
Specified by:
init in interface ChangeLogStore
Throws:
java.lang.Exception

sync

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

destroy

public void destroy()
             throws java.lang.Exception
Save logs, tags and revision on disk, and clean everything in memory

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

getCurrentRevision

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

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 ChangeLogStore
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 ChangeLogStore
Throws:
java.lang.Exception

lookup

public ChangeLogEvent lookup(long revision)
                      throws java.lang.Exception
Specified by:
lookup in interface ChangeLogStore
Throws:
java.lang.Exception

find

public org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> find()
                                                                    throws java.lang.Exception
Specified by:
find in interface ChangeLogStore
Throws:
java.lang.Exception

findBefore

public org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> findBefore(long revision)
                                                                          throws java.lang.Exception
Specified by:
findBefore in interface ChangeLogStore
Throws:
java.lang.Exception

findAfter

public org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> findAfter(long revision)
                                                                         throws java.lang.Exception
Specified by:
findAfter in interface ChangeLogStore
Throws:
java.lang.Exception

find

public org.apache.directory.shared.ldap.cursor.Cursor<ChangeLogEvent> find(long startRevision,
                                                                           long endRevision)
                                                                    throws java.lang.Exception
Specified by:
find in interface ChangeLogStore
Throws:
java.lang.Exception

getLatest

public Tag getLatest()
              throws java.lang.Exception
Specified by:
getLatest in interface TaggableChangeLogStore
Throws:
java.lang.Exception

removeTag

public Tag removeTag(long revision)
              throws java.lang.Exception
Specified by:
removeTag in interface TaggableChangeLogStore
Throws:
java.lang.Exception
See Also:
TaggableChangeLogStore.removeTag(long)

tag

public Tag tag(long revision,
               java.lang.String descrition)
        throws java.lang.Exception
Specified by:
tag in interface TaggableChangeLogStore
Throws:
java.lang.Exception
See Also:
TaggableChangeLogStore.tag(long, String)

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.