You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/08/05 04:50:03 UTC

svn commit: r1615855 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LifeCycle.java

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 {