directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r795547 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core: ./ changelog/ journal/
Date Sun, 19 Jul 2009 14:35:40 GMT
Author: elecharny
Date: Sun Jul 19 14:35:40 2009
New Revision: 795547

URL: http://svn.apache.org/viewvc?rev=795547&view=rev
Log:
o Renamed the exposeChangeLog parameter and getter/setter to 'exposed'
o Replaced @see by @inheritedDoc
o Added some missing Javadoc
o Moved some Journal parameters from JournalStore to Journal

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/Journal.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=795547&r1=795546&r2=795547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Sun Jul 19 14:35:40 2009
@@ -1624,7 +1624,7 @@
         {
             changeLog.init( this );
             
-            if( changeLog.isExposeChangeLog() && changeLog.isTagSearchSupported()
)
+            if( changeLog.isExposed() && changeLog.isTagSearchSupported() )
             {
                 String clSuffix = ( ( TaggableSearchableChangeLogStore ) changeLog.getChangeLogStore()
).getPartition().getSuffix();
                 partitionNexus.getRootDSE( null ).getOriginalEntry().add( SchemaConstants.CHANGELOG_CONTEXT_AT,
clSuffix );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java?rev=795547&r1=795546&r2=795547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/ChangeLog.java
Sun Jul 19 14:35:40 2009
@@ -225,15 +225,14 @@
     /**
      * Exposes the contents of ChangeLog to clients if set to true. Default setting is false.
      *
-     * @param exposeChangeLog true to expose the contents, false to not expose.
+     * @param exposed true to expose the contents, false to not expose.
      */
-    void setExposeChangeLog( boolean exposeChangeLog );
+    void setExposed( boolean exposed );
     
     /**
-     * DODO: Add Javadoc
-     * @return
+     * @return true if the changeLog system is visible by clients
      */
-    boolean isExposeChangeLog();
+    boolean isExposed();
     
     /**
      * The prefix of the partition. Default value is <i>ou=changelog</i>.

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java?rev=795547&r1=795546&r2=795547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java
Sun Jul 19 14:35:40 2009
@@ -64,14 +64,20 @@
     /** A volatile flag used to avoid store switching when in use */
     private volatile boolean storeInitialized = false;
 
-    private boolean exposeChangeLog;
+    /** A flag used to tell if the changeLog system is vivible by the clients */
+    private boolean exposed;
 
     // default values for ChangeLogStorePartition containers
-    private String partitionSuffix = "ou=changelog";
-    private String revContainerName = "ou=revisions";
-    private String tagContainerName = "ou=tags";
+    private static final String DEFAULT_PARTITION_SUFFIX = "ou=changelog";
+    private static final String DEFAULT_REV_CONTAINER_NAME = "ou=revisions";
+    private static final String DEFAULT_TAG_CONTAINER_NAME = "ou=tags";
 
+    // default values for ChangeLogStorePartition containers
+    private String partitionSuffix = DEFAULT_PARTITION_SUFFIX;
+    private String revContainerName = DEFAULT_REV_CONTAINER_NAME;
+    private String tagContainerName = DEFAULT_TAG_CONTAINER_NAME;
 
+    
     /**
      * {@inheritDoc}
      */
@@ -299,7 +305,7 @@
             
             store.init( service );
 
-            if ( exposeChangeLog && isTagSearchSupported() )
+            if ( exposed && isTagSearchSupported() )
             {
                 TaggableSearchableChangeLogStore tmp = ( TaggableSearchableChangeLogStore
) store;
                 
@@ -344,25 +350,25 @@
 
 
     /**
-     * @see ChangeLog#isExposeChangeLog()
+     * {@inheritDoc}
      */
-    public boolean isExposeChangeLog()
+    public boolean isExposed()
     {
-        return exposeChangeLog;
+        return exposed;
     }
 
 
     /**
-     * @see ChangeLog#setExposeChangeLog(boolean)
+     * {@inheritDoc}
      */
-    public void setExposeChangeLog( boolean exposeChangeLog )
+    public void setExposed( boolean exposed )
     {
-        this.exposeChangeLog = exposeChangeLog;
+        this.exposed = exposed;
     }
 
 
     /**
-     * @see ChangeLog#setPartitionSuffix(String)
+     * {@inheritDoc}
      */
     public void setPartitionSuffix( String suffix )
     {
@@ -371,7 +377,7 @@
 
 
     /**
-     * @see ChangeLog#setRevisionsContainerName(String)
+     * {@inheritDoc}
      */
     public void setRevisionsContainerName( String revContainerName )
     {
@@ -380,7 +386,7 @@
 
 
     /**
-     * @see ChangeLog#setTagsContainerName(String)
+     * {@inheritDoc}
      */
     public void setTagsContainerName( String tagContainerName )
     {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java?rev=795547&r1=795546&r2=795547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/DefaultJournal.java
Sun Jul 19 14:35:40 2009
@@ -43,6 +43,11 @@
     /** An instance of the Journal store */
     private JournalStore store;
 
+    /** 
+     * A parameter indicating the number of operations stored in a journal
+     * before it is rotated. If set to 0, no rotation is done
+     */ 
+    private int rotation;
     
     /**
      * {@inheritDoc}
@@ -119,6 +124,24 @@
     }
 
 
+    /**
+     * @return the rotation
+     */
+    public int getRotation()
+    {
+        return rotation;
+    }
+
+
+    /**
+     * @param rotation the rotation to set
+     */
+    public void setRotation( int rotation )
+    {
+        this.rotation = rotation;
+    }
+
+    
     public void setEnabled( boolean enabled )
     {
         // TODO Auto-generated method stub

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/Journal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/Journal.java?rev=795547&r1=795546&r2=795547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/Journal.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/Journal.java
Sun Jul 19 14:35:40 2009
@@ -103,4 +103,16 @@
      * @throws Exception If something went wrong
      */
     void destroy() throws Exception;
+
+
+    /**
+     * @return the rotation
+     */
+    int getRotation();
+
+
+    /**
+     * @param rotation the rotation to set
+     */
+    void setRotation( int rotation );
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java?rev=795547&r1=795546&r2=795547&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/journal/JournalInterceptor.java
Sun Jul 19 14:35:40 2009
@@ -58,12 +58,6 @@
     /** A shared number stored within each change */ 
     private AtomicLong revision;
     
-    /** 
-     * A parameter indicating the number of operations stored in a journal
-     * before it is rotated. If set to 0, no rotation is done
-     */ 
-    private int rotation;
-    
     /** the Journal service to log changes to */
     private Journal journal;
     
@@ -368,22 +362,4 @@
             throw e;
         }
    }
-
-
-    /**
-     * @return the rotation
-     */
-    public int getRotation()
-    {
-        return rotation;
-    }
-
-
-    /**
-     * @param rotation the rotation to set
-     */
-    public void setRotation( int rotation )
-    {
-        this.rotation = rotation;
-    }
 }
\ No newline at end of file



Mime
View raw message