ceki        2002/07/04 06:03:13

  Modified:    src/java/org/apache/log4j Tag: v1_2-branch
                        AsyncAppender.java
  Log:
  Indentation changes only.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.30.2.2  +39 -57    jakarta-log4j/src/java/org/apache/log4j/AsyncAppender.java
  
  Index: AsyncAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/AsyncAppender.java,v
  retrieving revision 1.30.2.1
  retrieving revision 1.30.2.2
  diff -u -r1.30.2.1 -r1.30.2.2
  --- AsyncAppender.java        11 Jun 2002 13:05:23 -0000      1.30.2.1
  +++ AsyncAppender.java        4 Jul 2002 13:03:13 -0000       1.30.2.2
  @@ -33,9 +33,7 @@
   
      <p><b>Important note:</b> The <code>AsyncAppender</code> can only
      be script configured using the {@link
  -   org.apache.log4j.xml.DOMConfigurator}. Refer to example  configuration
  -   files <a href="xml/examples/doc-files/sample4.xml">sample4.xml</a>
  -   and <a href="xml/examples/doc-files/sample5.xml">sample5.xml</a>.
  +   org.apache.log4j.xml.DOMConfigurator}.
   
      @author Ceki G&uuml;lc&uuml;
      @since 0.9.1 */
  @@ -55,8 +53,7 @@
   
     boolean interruptedWarningMessage = false;
   
  -  public
  -  AsyncAppender() {
  +  public yncAppender() {
       // Note: The dispatcher code assumes that the aai is set once and
       // for all.
       aai = new AppenderAttachableImpl();
  @@ -65,15 +62,13 @@
     }
   
   
  -  public
  -  void addAppender(Appender newAppender) {
  +  public void addAppender(Appender newAppender) {
       synchronized(aai) {
         aai.addAppender(newAppender);
       }
     }
   
  -  public
  -  void append(LoggingEvent event) {
  +  public void append(LoggingEvent event) {
       // Set the NDC and thread name for the calling thread as these
       // LoggingEvent fields were not set at event creation time.
       event.getNDC();
  @@ -112,8 +107,7 @@
        dispatcher thread which will process all pending events before
        exiting.
     */
  -  public
  -  void close() {
  +  public void close() {
       synchronized(this) {
         // avoid multiple close, otherwise one gets NullPointerException
         if(closed) { 
  @@ -137,15 +131,13 @@
       bf = null;
     }
   
  -  public
  -  Enumeration getAllAppenders() {
  +  public Enumeration getAllAppenders() {
       synchronized(aai) {
         return aai.getAllAppenders();
       }
     }
   
  -  public
  -  Appender getAppender(String name) {
  +  public Appender getAppender(String name) {
       synchronized(aai) {
         return aai.getAppender(name);
       }
  @@ -154,89 +146,80 @@
     /**
        Returns the current value of the <b>LocationInfo</b> option.
     */
  -  public
  -  boolean getLocationInfo() {
  +  public boolean getLocationInfo() {
       return locationInfo;
     }
   
     /**
        Is the appender passed as parameter attached to this category?
      */
  -  public
  -  boolean isAttached(Appender appender) {
  +  public boolean isAttached(Appender appender) {
       return aai.isAttached(appender);
     }
   
   
     /**
        The <code>AsyncAppender</code> does not require a layout. Hence,
  -     this method always returns <code>false</code>. */
  -  public
  -  boolean requiresLayout() {
  +     this method always returns <code>false</code>. 
  +  */
  +  public boolean requiresLayout() {
       return false;
     }
   
  -  public
  -  void removeAllAppenders() {
  +  public void removeAllAppenders() {
       synchronized(aai) {
         aai.removeAllAppenders();
       }
     }
   
   
  -  public
  -  void removeAppender(Appender appender) {
  +  public void removeAppender(Appender appender) {
       synchronized(aai) {
         aai.removeAppender(appender);
       }
     }
   
  -  public
  -  void removeAppender(String name) {
  +  public void removeAppender(String name) {
       synchronized(aai) {
         aai.removeAppender(name);
       }
     }
   
     /**
  -     The <b>LocationInfo</b> option takes a boolean value. By
  -     default, it is set to false which means there will be no effort
  -     to extract the location information related to the event. As a
  -     result, the event that will be ultimately logged will likely to
  -     contain the wrong location information (if present in the log
  -     format).
  -
  -     <p>Location information extraction is comparatively very slow and
  -     should be avoided unless performance is not a concern.
  -   */
  -  public
  -  void setLocationInfo(boolean flag) {
  +   * The <b>LocationInfo</b> option takes a boolean value. By default,
  +   * it is set to false which means there will be no effort to extract
  +   * the location information related to the event. As a result, the
  +   * event that will be ultimately logged will likely to contain the
  +   * wrong location information (if present in the log format).
  +   *
  +   * <p>Location information extraction is comparatively very slow and
  +   * should be avoided unless performance is not a concern.
  +   * */
  +  public void setLocationInfo(boolean flag) {
       locationInfo = flag;
     }
   
   
     /**
  -     The <b>BufferSize</b> option takes a non-negative integer
  -     value.  This integer value determines the maximum size of the
  -     bounded buffer. Increasing the size of the buffer is always
  -     safe. However, if an existing buffer holds unwritten elements,
  -     then <em>decreasing the buffer size will result in event
  -     loss.</em> Nevertheless, while script configuring the
  -     AsyncAppender, it is safe to set a buffer size smaller than the
  -     {@link #DEFAULT_BUFFER_SIZE default buffer size} because
  -     configurators guarantee that an appender cannot be used before
  -     being completely configured.
  -   */
  -  public
  -  void setBufferSize(int size) {
  +   * The <b>BufferSize</b> option takes a non-negative integer value.
  +   * This integer value determines the maximum size of the bounded
  +   * buffer. Increasing the size of the buffer is always
  +   * safe. However, if an existing buffer holds unwritten elements,
  +   * then <em>decreasing the buffer size will result in event
  +   * loss.</em> Nevertheless, while script configuring the
  +   * AsyncAppender, it is safe to set a buffer size smaller than the
  +   * {@link #DEFAULT_BUFFER_SIZE default buffer size} because
  +   * configurators guarantee that an appender cannot be used before
  +   * being completely configured.  
  +   * */
  +  public void setBufferSize(int size) {
       bf.resize(size);
     }
   
     /**
        Returns the current value of the <b>BufferSize</b> option.
      */
  -  public
  -  int getBufferSize() {
  +  public int getBufferSize() {
       return bf.getMaxSize();
     }
   
  @@ -291,8 +274,7 @@
       <p>Other approaches might yield better results.
   
     */
  -  public
  -  void run() {
  +  public void run() {
   
       //Category cat = Category.getInstance(Dispatcher.class.getName());
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to