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

All Superinterfaces:
ChangeLogStore
All Known Subinterfaces:
TaggableSearchableChangeLogStore
All Known Implementing Classes:
MemoryChangeLogStore

public interface TaggableChangeLogStore
extends ChangeLogStore

A ChangeLogStore which allows tagging for tracking server state snapshots. At most one tag per revision can be created. There is no point to creating more than one tag on a revision in our case for snapshotting server state.

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

Method Summary
 Tag getLatest()
          Gets the latest tag if one was at all taken.
 Tag removeTag(long revision)
          Removes a Tag created for a given revision.
 Tag tag()
          Creates a snapshot of the server at the current revision.
 Tag tag(long revision)
          Creates a tag for a snapshot of the server in a specific state at a revision.
 Tag tag(long revision, java.lang.String descrition)
          Creates a tag with the given description for a snapshot of the server in a specific state at a revision.
 Tag tag(java.lang.String description)
          Creates a snapshot of the server at the current revision with a description of the snapshot tag.
 
Methods inherited from interface org.apache.directory.server.core.changelog.ChangeLogStore
destroy, find, find, findAfter, findBefore, getCurrentRevision, init, log, log, lookup, sync
 

Method Detail

tag

Tag tag(long revision)
        throws java.lang.Exception
Creates a tag for a snapshot of the server in a specific state at a revision.

Parameters:
revision - the revision to tag the snapshot
Returns:
the Tag associated with the revision
Throws:
java.lang.Exception - if there is a problem taking a tag, or if the revision does not exist

tag

Tag tag()
        throws java.lang.Exception
Creates a snapshot of the server at the current revision.

Returns:
the revision at which the tag is created
Throws:
java.lang.Exception - if there is a problem taking a tag

tag

Tag tag(java.lang.String description)
        throws java.lang.Exception
Creates a snapshot of the server at the current revision with a description of the snapshot tag.

Parameters:
description - a description of the state associate with the tag
Returns:
the revision at which the tag is created
Throws:
java.lang.Exception - if there is a problem taking a tag

getLatest

Tag getLatest()
              throws java.lang.Exception
Gets the latest tag if one was at all taken.

Returns:
the last tag to have been created (youngest), or null if no tags have been created
Throws:
java.lang.Exception - on failures to access the tag store

removeTag

Tag removeTag(long revision)
              throws java.lang.Exception
Removes a Tag created for a given revision.

Parameters:
revision - the revision number that was tagged
Returns:
the removed tag, null if there is no Tag present with the given revision
Throws:
java.lang.Exception - on failures to access the tag store

tag

Tag tag(long revision,
        java.lang.String descrition)
        throws java.lang.Exception
Creates a tag with the given description for a snapshot of the server in a specific state at a revision.

Parameters:
revision - the revision number that was tagged
descrition - a description of the state associate with the tag
Returns:
the Tag associated with the revision
Throws:
java.lang.Exception - on failures to access the tag store


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