1. opensymphony
  2. oscache

Commits

chri...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed 7bdea7b

Improved Javadocs

  • Participants
  • Parent commits a0abf76
  • Branches default

Comments (0)

Files changed (1)

File src/core/java/com/opensymphony/oscache/base/EntryUpdateState.java

View file
  • Ignore whitespace
      */
     private int state = NOT_YET_UPDATING;
 
+    /**
+     * This is the initial state when an instance this object is first created.
+     * It indicates that a cache entry needs updating, but no thread has claimed
+     * responsibility for updating it yet.
+     */
     public boolean isAwaitingUpdate() {
         return state == NOT_YET_UPDATING;
     }
 
+    /**
+     * The thread that was responsible for updating the cache entry (ie, the thread
+     * that managed to grab the update lock) has decided to give up responsibility
+     * for performing the update. OSCache will notify any other threads that are
+     * waiting on the update so one of them can take over the responsibility.
+     */
     public boolean isCancelled() {
         return state == UPDATE_CANCELLED;
     }
 
+    /**
+     * The update of the cache entry has been completed.
+     */
     public boolean isComplete() {
         return state == UPDATE_COMPLETE;
     }
 
+    /**
+     * The cache entry is currently being generated by the thread that got hold of
+     * the update lock.
+     */
     public boolean isUpdating() {
         return state == UPDATE_IN_PROGRESS;
     }