directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r371153 - in /directory/trunks/common/ldap/src: main/java/org/apache/ldap/common/codec/extended/operations/ test/java/org/apache/ldap/common/codec/extended/operations/
Date Sun, 22 Jan 2006 00:35:07 GMT
Author: elecharny
Date: Sat Jan 21 16:34:59 2006
New Revision: 371153

URL: http://svn.apache.org/viewcvs?rev=371153&view=rev
Log:
Fixed a lot of typoes and some doco.
Comments are totally lacking. 

Modified:
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdown.java
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownConstants.java
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownGrammar.java
    directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownStatesEnum.java
    directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownTest.java

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdown.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdown.java?rev=371153&r1=371152&r2=371153&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdown.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdown.java
Sat Jan 21 16:34:59 2006
@@ -26,10 +26,10 @@
 
 
 /**
- * An extended operation to proceed a gracefull shutdown  
+ * An extended operation to proceed a graceful shutdown  
  * 
  * <pre>
- *  GracefullShutdown ::= SEQUENCE
+ *  GracefulShutdown ::= SEQUENCE
  *  {
  *      timeOffline INTEGER DEFAULT 0,
  *      delay       [0] INTEGER DEFAULT 0 
@@ -43,7 +43,7 @@
 {
     private int timeOffline;
     private int delay;
-    private transient int gracefullSequenceLength;
+    private transient int gracefulSequenceLength;
     
     public GracefulShutdown( int timeOffline, int delay )
     {
@@ -77,7 +77,7 @@
     }
     
     /**
-     * Compute the GracefullShutdown length
+     * Compute the GracefulShutdown length
      * 0x30 L1
      *  |
      *  +--> [0x02 0x0(1-4) [0..720] ]
@@ -87,24 +87,24 @@
      */
     public int computeLength()
     {
-        int gracefullLength = 1 + 1;
-        gracefullSequenceLength = 0;
+        int gracefulLength = 1 + 1;
+        gracefulSequenceLength = 0;
         
         if ( timeOffline != 0 )
         {
-            gracefullSequenceLength += 1 + 1 + Length.getNbBytes( timeOffline );
+            gracefulSequenceLength += 1 + 1 + Length.getNbBytes( timeOffline );
         }
 
         if ( delay != 0 )
         {
-            gracefullSequenceLength += 1 + 1 + Length.getNbBytes( delay );
+            gracefulSequenceLength += 1 + 1 + Length.getNbBytes( delay );
         }
 
-        return gracefullLength + gracefullSequenceLength;
+        return gracefulLength + gracefulSequenceLength;
     }
     
     /**
-     * Encodes the gracefullShutdown extended request.
+     * Encodes the gracefulShutdown extended request.
      * 
      * @param buffer The encoded sink
      * @return A ByteBuffer that contains the encoded PDU
@@ -116,7 +116,7 @@
         ByteBuffer bb = ByteBuffer.allocate( computeLength() );
         
         bb.put( UniversalTag.SEQUENCE_TAG );
-        bb.put( Length.getBytes( gracefullSequenceLength ) );
+        bb.put( Length.getBytes( gracefulSequenceLength ) );
 
         if ( timeOffline != 0 )
         {
@@ -125,7 +125,7 @@
         
         if ( delay != 0 )
         {
-            bb.put( (byte)GracefulShutdownConstants.GRACEFULL_SHUTDOWN_DELAY_TAG );
+            bb.put( (byte)GracefulShutdownConstants.GRACEFUL_SHUTDOWN_DELAY_TAG );
             bb.put( (byte)Length.getNbBytes( delay ) );
             bb.put( Value.getBytes( delay ) );
         }

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownConstants.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownConstants.java?rev=371153&r1=371152&r2=371153&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownConstants.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownConstants.java
Sat Jan 21 16:34:59 2006
@@ -18,12 +18,12 @@
 
 
 /**
- * GracefullShutdown extended operation constants  
+ * GracefulShutdown extended operation constants  
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
 public class GracefulShutdownConstants
 {
-    public static final int GRACEFULL_SHUTDOWN_DELAY_TAG = 0x80;
+    public static final int GRACEFUL_SHUTDOWN_DELAY_TAG = 0x80;
 }

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownGrammar.java?rev=371153&r1=371152&r2=371153&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownGrammar.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownGrammar.java
Sat Jan 21 16:34:59 2006
@@ -80,14 +80,14 @@
             new GrammarTransition( GracefulShutdownStatesEnum.TIME_OFFLINE_OR_DELAY_OR_END_TAG,
                 GracefulShutdownStatesEnum.TIME_OFFLINE_VALUE, null );
 
-        super.transitions[GracefulShutdownStatesEnum.TIME_OFFLINE_OR_DELAY_OR_END_TAG][GracefulShutdownConstants.GRACEFULL_SHUTDOWN_DELAY_TAG]
=
+        super.transitions[GracefulShutdownStatesEnum.TIME_OFFLINE_OR_DELAY_OR_END_TAG][GracefulShutdownConstants.GRACEFUL_SHUTDOWN_DELAY_TAG]
=
             new GrammarTransition( GracefulShutdownStatesEnum.TIME_OFFLINE_OR_DELAY_OR_END_TAG,
                 GracefulShutdownStatesEnum.DELAY_VALUE, null );
 
         super.transitions[GracefulShutdownStatesEnum.TIME_OFFLINE_VALUE][UniversalTag.INTEGER_TAG]
=
             new GrammarTransition( GracefulShutdownStatesEnum.TIME_OFFLINE_VALUE, 
                 GracefulShutdownStatesEnum.DELAY_OR_END_TAG, 
-                new GrammarAction( "Set PSearchControl changeTypes" )
+                new GrammarAction( "Set Graceful Shutdown time offline" )
                 {
                     public void action( IAsn1Container container ) throws DecoderException
                     {
@@ -117,14 +117,14 @@
                 }
             );
 
-        super.transitions[GracefulShutdownStatesEnum.DELAY_OR_END_TAG][GracefulShutdownConstants.GRACEFULL_SHUTDOWN_DELAY_TAG]
=
+        super.transitions[GracefulShutdownStatesEnum.DELAY_OR_END_TAG][GracefulShutdownConstants.GRACEFUL_SHUTDOWN_DELAY_TAG]
=
             new GrammarTransition( GracefulShutdownStatesEnum.DELAY_OR_END_TAG,
                 GracefulShutdownStatesEnum.DELAY_VALUE, null );
 
-        super.transitions[GracefulShutdownStatesEnum.DELAY_VALUE][GracefulShutdownConstants.GRACEFULL_SHUTDOWN_DELAY_TAG]
=
+        super.transitions[GracefulShutdownStatesEnum.DELAY_VALUE][GracefulShutdownConstants.GRACEFUL_SHUTDOWN_DELAY_TAG]
=
             new GrammarTransition( GracefulShutdownStatesEnum.DELAY_VALUE, 
                 GracefulShutdownStatesEnum.GRAMMAR_END, 
-                new GrammarAction( "Set PSearchControl changesOnly" )
+                new GrammarAction( "Set Graceful Shutdown Delay" )
                 {
                     public void action( IAsn1Container container ) throws DecoderException
                     {
@@ -137,7 +137,7 @@
                             
                             if ( log.isDebugEnabled() )
                             {
-                                log.debug( "changesOnly = " + delay );
+                                log.debug( "Delay = " + delay );
                             }
                             
                             gracefulShutdownContainer.getGracefulShutdown().setDelay( delay
);

Modified: directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownStatesEnum.java?rev=371153&r1=371152&r2=371153&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownStatesEnum.java
(original)
+++ directory/trunks/common/ldap/src/main/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownStatesEnum.java
Sat Jan 21 16:34:59 2006
@@ -54,7 +54,7 @@
     public static int DELAY_VALUE = 5;
 
     /** terminal state */
-    public static int LAST_GRACEFUL_SHUTDOWN_STATE = 8;
+    public static int LAST_GRACEFUL_SHUTDOWN_STATE = 6;
 
     //=========================================================================
     // Grammars declaration.

Modified: directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownTest.java?rev=371153&r1=371152&r2=371153&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownTest.java
(original)
+++ directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/extended/operations/GracefulShutdownTest.java
Sat Jan 21 16:34:59 2006
@@ -28,7 +28,7 @@
 import junit.framework.TestCase;
 
 /**
- * Test the PSearchControlTest codec
+ * Test the GracefulShutdownTest codec
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */



Mime
View raw message