org.apache.directory.server.core.changelog
Interface ChangeLogSearchEngine


public interface ChangeLogSearchEngine

A custom search engine designed for optimized searching across ChangeLogEvents within the ChangeLogStore. The following lookup and search operations are provided:

Note change lookups by date can be conducted by first looking up a revision using a generalizedTime descriptor to find a revision. Then these revisions can be plugged into the revision based find and lookup methods.

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

Method Summary
 Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.schema.AttributeType attributeType, RevisionOrder order)
          Finds all the ChangeLogEvents altering a particular attributeType.
 Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.ldif.ChangeType changeType, RevisionOrder order)
          Finds all the ChangeLogEvents of a particular change type.
 Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.filter.ExprNode filter, RevisionOrder order)
          Finds all the ChangeLogEvents matched by the filter expression tree parameter.
 Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.name.LdapDN dn, RevisionOrder order)
          Finds all the ChangeLogEvents on an entry.
 Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.name.LdapDN base, Scope scope, RevisionOrder order)
          Finds all the ChangeLogEvents on an entry base and/or it's children/descendants.
 Cursor<ChangeLogEvent> find(LdapPrincipal principal, RevisionOrder order)
          Finds all the ChangeLogEvents triggered by a principal in the system.
 Cursor<ChangeLogEvent> find(long startRevision, long endRevision, RevisionOrder order)
          Finds the ChangeLogEvents that occurred between a revision range inclusive.
 Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.schema.ObjectClass objectClass, RevisionOrder order)
          Finds all the ChangeLogEvents altering a particular objectClass.
 Cursor<ChangeLogEvent> find(RevisionOrder order)
          Finds all the ChangeLogEvents within the system since revision 0.
 Cursor<ChangeLogEvent> findAfter(long revision, RevisionOrder order)
          Finds the ChangeLogEvents that occurred after a revision inclusive.
 Cursor<ChangeLogEvent> findBefore(long revision, RevisionOrder order)
          Finds the ChangeLogEvents that occurred before a revision inclusive.
 ChangeLogEvent lookup(long revision)
          Looks up the ChangeLogEvent for a revision.
 long lookup(java.lang.String generalizedTime)
          Looks up the revision in effect at some time specified by a generalized time descriptor.
 

Method Detail

lookup

long lookup(java.lang.String generalizedTime)
            throws java.lang.Exception
Looks up the revision in effect at some time specified by a generalized time descriptor.

Parameters:
generalizedTime - the generalized time descriptor to find the effective revision for
Returns:
the revision that was in effect at a certain time
Throws:
java.lang.Exception - if there are failures accessing the store

lookup

ChangeLogEvent lookup(long revision)
                      throws java.lang.Exception
Looks up the ChangeLogEvent for a revision.

Parameters:
revision - to get a ChangeLogEvent for
Returns:
the ChangeLogEvent associated with the revision
Throws:
java.lang.Exception - if there are failures accessing the store
java.lang.IllegalArgumentException - if the revision is out of range (less than 0 and greater than the current revision)

find

Cursor<ChangeLogEvent> find(RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents within the system since revision 0. This method should exhibit isolation characteristics: meaning if the request is initiated at revision 100 then any subsequent log entries increasing the revision should not be seen.

Parameters:
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
an enumeration of all the ChangeLogEvents
Throws:
java.lang.Exception - if there are failures accessing the store

findBefore

Cursor<ChangeLogEvent> findBefore(long revision,
                                  RevisionOrder order)
                                  throws java.lang.Exception
Finds the ChangeLogEvents that occurred before a revision inclusive.

Parameters:
revision - the revision number to get the ChangeLogEvents before
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
an enumeration of all the ChangeLogEvents before and including some revision
Throws:
java.lang.Exception - if there are failures accessing the store
java.lang.IllegalArgumentException - if the revision is out of range (less than 0 and greater than the current revision)

findAfter

Cursor<ChangeLogEvent> findAfter(long revision,
                                 RevisionOrder order)
                                 throws java.lang.Exception
Finds the ChangeLogEvents that occurred after a revision inclusive. This method should exhibit isolation characteristics: meaning if the request is initiated at revision 100 then any subsequent log entries increasing the revision should not be seen.

Parameters:
revision - the revision number to get the ChangeLogEvents after
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
an enumeration of all the ChangeLogEvents after and including the revision
Throws:
java.lang.Exception - if there are failures accessing the store
java.lang.IllegalArgumentException - if the revision is out of range (less than 0 and greater than the current revision)

find

Cursor<ChangeLogEvent> find(long startRevision,
                            long endRevision,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds the ChangeLogEvents that occurred between a revision range inclusive.

Parameters:
startRevision - the revision number to start getting the ChangeLogEvents above
endRevision - the revision number to start getting the ChangeLogEvents below
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
an enumeration of all the ChangeLogEvents within some revision range inclusive
Throws:
java.lang.Exception - if there are failures accessing the store
java.lang.IllegalArgumentException - if the start and end revisions are out of range (less than 0 and greater than the current revision), or if startRevision > endRevision

find

Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.name.LdapDN dn,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents on an entry.

Parameters:
dn - the normalized DN of the entry to get ChangeLogEvents for
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of changes that occurred on an entry
Throws:
java.lang.Exception - if there are failures accessing the store

find

Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.name.LdapDN base,
                            Scope scope,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents on an entry base and/or it's children/descendants.

Parameters:
base - the normalized DN of the entry base to get ChangeLogEvents for
scope - the scope of the search under the base similar to LDAP search scope
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of changes that occurred on an entry and/or it's descendants depending on the scope
Throws:
java.lang.Exception - if there are failures accessing the store

find

Cursor<ChangeLogEvent> find(LdapPrincipal principal,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents triggered by a principal in the system.

Parameters:
principal - the LDAP principal who triggered the events
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of changes that were triggered by a specific LDAP user
Throws:
java.lang.Exception - if there are failures accessing the store

find

Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.ldif.ChangeType changeType,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents of a particular change type.

Parameters:
changeType - the change type of the ChangeLogEvents to search for
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of ChangeLogEvents of a particular ChangeType
Throws:
java.lang.Exception - if there are failures accessing the store

find

Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.schema.AttributeType attributeType,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents altering a particular attributeType.

Parameters:
attributeType - the attributeType definition for the changed attribute to search changes for
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of ChangeLogEvents on a particular attributeType
Throws:
java.lang.Exception - if there are failures accessing the store

find

Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.schema.ObjectClass objectClass,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents altering a particular objectClass.

Parameters:
objectClass - the objectClass definition for the entries to search changes for
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of ChangeLogEvents on a particular attributeType
Throws:
java.lang.Exception - if there are failures accessing the store

find

Cursor<ChangeLogEvent> find(org.apache.directory.shared.ldap.filter.ExprNode filter,
                            RevisionOrder order)
                            throws java.lang.Exception
Finds all the ChangeLogEvents matched by the filter expression tree parameter. The following attributes can be used in the constrained LDAP filter expression tree. The expression must be normalized and can contain only ATA pairs with the following set of attributes: The following are the only kinds of AVA node types allowed:

Parameters:
filter - the filter to use for finding the change
order - the order in which to return ChangeLogEvents (ordered by revision number)
Returns:
the set of ChangeLogEvents on entries of a particular objectClass
Throws:
java.lang.Exception - if there are failures accessing the store


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.