logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1615855 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java
Date Tue, 05 Aug 2014 02:50:03 GMT
Author: mattsicker
Date: Tue Aug  5 02:50:03 2014
New Revision: 1615855

URL: http://svn.apache.org/r1615855
Log:
Add javadoc intro.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java?rev=1615855&r1=1615854&r2=1615855&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java
Tue Aug  5 02:50:03 2014
@@ -18,7 +18,14 @@
 package org.apache.logging.log4j.core;
 
 /**
- *
+ * All proper Java frameworks implement some sort of object life cycle. In Log4j, the main
interface for handling
+ * the life cycle context of an object is this one. An object first starts in the {@link
State#INITIALIZED} state
+ * by default to indicate the class has been loaded. From here, calling the {@link #start()}
method will change this
+ * state to {@link State#STARTING}. After successfully being started, this state is changed
to {@link State#STARTED}.
+ * When the {@link #stop()} is called, this goes into the {@link State#STOPPING} state. After
successfully being
+ * stopped, this goes into the {@link State#STOPPED} state. In most circumstances, implementation
classes should
+ * store their {@link State} in a {@code volatile} field or inside an
+ * {@link java.util.concurrent.atomic.AtomicReference}.
  */
 public interface LifeCycle {
     



Mime
View raw message