Tabnine Logo
ChangeLog.getCurrentRevision
Code IndexAdd Tabnine to your IDE (free)

How to use
getCurrentRevision
method
in
org.apache.directory.server.core.api.changelog.ChangeLog

Best Java code snippets using org.apache.directory.server.core.api.changelog.ChangeLog.getCurrentRevision (Showing top 5 results out of 315)

origin: org.apache.directory.server/apacheds-test-framework

private long getCurrentRevision( DirectoryService dirService ) throws Exception
{
  if ( ( dirService != null ) && ( dirService.getChangeLog().isEnabled() ) )
  {
    long revision = dirService.getChangeLog().getCurrentRevision();
    LOG.debug( "Create revision {}", revision );
    return revision;
  }
  return 0;
}
origin: org.apache.directory.server/apacheds-test-framework

private void revert( DirectoryService dirService, long revision ) throws Exception
{
  if ( dirService == null )
  {
    return;
  }
  ChangeLog cl = dirService.getChangeLog();
  if ( cl.isEnabled() && ( revision < cl.getCurrentRevision() ) )
  {
    LOG.debug( "Revert revision {}", revision );
    dirService.revert( revision );
  }
}
origin: org.apache.knox/gateway-test-ldap

public long revert() throws LdapException
{
 if ( changeLog == null || !changeLog.isEnabled() )
 {
  throw new IllegalStateException( I18n.err( I18n.ERR_310 ) );
 }
 Tag latest = changeLog.getLatest();
 if ( null != latest )
 {
  if ( latest.getRevision() < changeLog.getCurrentRevision() )
  {
   return revert( latest.getRevision() );
  }
  else
  {
   LOG.info( "Ignoring request to revert without changes since the latest tag." );
   return changeLog.getCurrentRevision();
  }
 }
 throw new IllegalStateException( I18n.err( I18n.ERR_311 ) );
}
origin: org.apache.directory.server/apacheds-test-framework

  @Override
  public void evaluate() throws Throwable
  {
    Tag tag = directoryService.getChangeLog().tag();
    DSAnnotationProcessor.applyLdifs( description, directoryService );
    LOG.debug( "Tagged change log: {}", tag );
    try
    {
      base.evaluate();
    }
    finally
    {
      if ( directoryService.getChangeLog().getCurrentRevision() > tag.getRevision() )
      {
        LOG.debug( "Reverting to tag: {}", tag );
        directoryService.revert( tag.getRevision() );
      }
      else
      {
        LOG.debug( "No changes made, nothing to revert" );
      }
    }
  }
};
origin: org.apache.knox/gateway-test-ldap

return changeLog.getCurrentRevision();
org.apache.directory.server.core.api.changelogChangeLoggetCurrentRevision

Javadoc

Gets the current revision for the server.

Popular methods of ChangeLog

  • setEnabled
    Enable or disable the ChangeLog service
  • isEnabled
    Checks whether or not the change log has been enabled to track changes.
  • destroy
    Destroy the changeLog
  • getChangeLogStore
  • getLatest
  • init
    Initialize the ChangeLog system.
  • isExposed
  • isTagSearchSupported
    Returns whether or not this ChangeLogService supports searching for snapshot tags.
  • log
    Records a change as a forward LDIF, a reverse change to revert the change and the authorized princip
  • setExposed
    Exposes the contents of ChangeLog to clients if set to true. Default setting is false.
  • sync
    Flush the changes to disk
  • tag
    Creates a snapshot of the server at the current revision.
  • sync,
  • tag

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Reference (javax.naming)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now