Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7DD45200CBC for ; Tue, 20 Jun 2017 21:32:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7C097160BE1; Tue, 20 Jun 2017 19:32:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EB0C4160BF7 for ; Tue, 20 Jun 2017 21:32:17 +0200 (CEST) Received: (qmail 22968 invoked by uid 500); 20 Jun 2017 19:32:17 -0000 Mailing-List: contact commits-help@jspwiki.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jspwiki.apache.org Delivered-To: mailing list commits@jspwiki.apache.org Received: (qmail 22621 invoked by uid 99); 20 Jun 2017 19:32:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2017 19:32:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D949EDFF18; Tue, 20 Jun 2017 19:32:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: git-site-role@apache.org To: commits@jspwiki.apache.org Date: Tue, 20 Jun 2017 19:32:51 -0000 Message-Id: <6c03ccf700714cb8a36ed5ede27ada3a@git.apache.org> In-Reply-To: <0376810a7d4645cbb4310daffb0708ca@git.apache.org> References: <0376810a7d4645cbb4310daffb0708ca@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [40/51] [partial] jspwiki-site git commit: Automatic Site Publish by Buildbot archived-at: Tue, 20 Jun 2017 19:32:21 -0000 http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/WatchDog.html ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/WatchDog.html b/apidocs/2.10.1/org/apache/wiki/WatchDog.html deleted file mode 100755 index 3c97a56..0000000 --- a/apidocs/2.10.1/org/apache/wiki/WatchDog.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - - - - -WatchDog (Apache JSPWiki Main War 2.10.1 API) - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.apache.wiki -
-Class WatchDog

-
-java.lang.Object
-  extended by org.apache.wiki.WatchDog
-
-
-
-
public final class WatchDog
extends Object
- - - - -
- -

-WatchDog is a general system watchdog. You can attach any Watchable - or a Thread object to it, and it will notify you if a timeout has been - exceeded. -

- The notification of the timeouts is done from a separate WatchDog thread, - of which there is one per watched thread. This Thread is named 'WatchDog for - XXX', where XXX is your Thread name. -

- The suggested method of obtaining a WatchDog is via the static factory - method, since it will return you the correct watchdog for the current - thread. However, we do not prevent you from creating your own watchdogs - either. -

- If you create a WatchDog for a Thread, the WatchDog will figure out when - the Thread is dead, and will stop itself accordingly. However, this object - is not automatically released, so you might want to check it out after a while. -

- -

-

-
Since:
-
2.4.92
-
-
- -

- - - - - - - - - - - - - - -
-Constructor Summary
WatchDog(WikiEngine engine, - Thread thread) - -
-          Creates a new WatchDog for a Thread.
WatchDog(WikiEngine engine, - Watchable watch) - -
-          Creates a new WatchDog for a Watchable.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voiddisable() - -
-          Is used to disable a WatchDog.
- voidenable() - -
-          Can be used to enable the WatchDog.
- voidenterState(String state) - -
-          Enters a watched state with no expectation of the expected completion time.
- voidenterState(String state, - int expectedCompletionTime) - -
-          Enters a watched state which has an expected completion time.
- voidexitState() - -
-          Exits a state entered with enterState().
- voidexitState(String state) - -
-          Exits a particular state entered with enterState().
-static WatchDoggetCurrentWatchDog(WikiEngine engine) - -
-          Returns the current watchdog for the current thread.
- booleanisStateStackNotEmpty() - -
-          helper to see if the associated stateStack is not empty.
- booleanisWatchableAlive() - -
-          helper to see if the associated watchable is alive.
- StringtoString() - -
-          Strictly for debugging/informative purposes.
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-WatchDog

-
-public WatchDog(WikiEngine engine,
-                Watchable watch)
-
-
Creates a new WatchDog for a Watchable. -

-

-
Parameters:
engine - The WikiEngine.
watch - A Watchable object.
-
-
- -

-WatchDog

-
-public WatchDog(WikiEngine engine,
-                Thread thread)
-
-
Creates a new WatchDog for a Thread. The Thread is wrapped in a Watchable wrapper for this purpose. -

-

-
Parameters:
engine - The WikiEngine
thread - A Thread for watching.
-
- - - - - - - - -
-Method Detail
- -

-getCurrentWatchDog

-
-public static WatchDog getCurrentWatchDog(WikiEngine engine)
-
-
Returns the current watchdog for the current thread. This - is the preferred method of getting you a Watchdog, since it - keeps an internal list of Watchdogs for you so that there - won't be more than one watchdog per thread. -

-

-
Parameters:
engine - The WikiEngine to which the Watchdog should - be bonded to. -
Returns:
A usable WatchDog object.
-
-
-
- -

-enable

-
-public void enable()
-
-
Can be used to enable the WatchDog. Will cause a new Thread to be created, if none was existing previously. -

-

-
-
-
-
- -

-disable

-
-public void disable()
-
-
Is used to disable a WatchDog. The watchdog thread is shut down and resources released. -

-

-
-
-
-
- -

-enterState

-
-public void enterState(String state)
-
-
Enters a watched state with no expectation of the expected completion time. In practice this method is - used when you have no idea, but would like to figure out, e.g. via debugging, where exactly your Watchable is. -

-

-
Parameters:
state - A free-form string description of your state.
-
-
-
- -

-enterState

-
-public void enterState(String state,
-                       int expectedCompletionTime)
-
-
Enters a watched state which has an expected completion time. This is the main method for using the - WatchDog. For example: - - - WatchDog w = m_engine.getCurrentWatchDog(); - w.enterState("Processing Foobar", 60); - foobar(); - w.exitState(); - - - If the call to foobar() takes more than 60 seconds, you will receive an ERROR in the log stream. -

-

-
Parameters:
state - A free-form string description of the state
expectedCompletionTime - The timeout in seconds.
-
-
-
- -

-exitState

-
-public void exitState()
-
-
Exits a state entered with enterState(). This method does not check that the state is correct, it'll just - pop out whatever is on the top of the state stack. -

-

-
-
-
-
- -

-exitState

-
-public void exitState(String state)
-
-
Exits a particular state entered with enterState(). The state is checked against the current state, and if - they do not match, an error is flagged. -

-

-
Parameters:
state - The state you wish to exit.
-
-
-
- -

-isStateStackNotEmpty

-
-public boolean isStateStackNotEmpty()
-
-
helper to see if the associated stateStack is not empty. -

-

- -
Returns:
true if not empty, false otherwise.
-
-
-
- -

-isWatchableAlive

-
-public boolean isWatchableAlive()
-
-
helper to see if the associated watchable is alive. -

-

- -
Returns:
true if it's alive, false otherwise.
-
-
-
- -

-toString

-
-public String toString()
-
-
Strictly for debugging/informative purposes. -

-

-
Overrides:
toString in class Object
-
-
- -
Returns:
Random ramblings.
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
-Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. - - http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/WatchDog.png ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/WatchDog.png b/apidocs/2.10.1/org/apache/wiki/WatchDog.png deleted file mode 100755 index f0c905f..0000000 Binary files a/apidocs/2.10.1/org/apache/wiki/WatchDog.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/Watchable.html ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/Watchable.html b/apidocs/2.10.1/org/apache/wiki/Watchable.html deleted file mode 100755 index a30ff0d..0000000 --- a/apidocs/2.10.1/org/apache/wiki/Watchable.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - -Watchable (Apache JSPWiki Main War 2.10.1 API) - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.apache.wiki -
-Interface Watchable

-
-
-
public interface Watchable
- - - - -
- -

-A watchdog needs something to watch. If you wish to be watched, implement this interface. -

- -

-


- -

- - - - - - - - - - - - - - - - - - - - -
-Method Summary
- StringgetName() - -
-          Returns a human-readable name of this Watchable.
- booleanisAlive() - -
-          Returns true, if this Watchable is still alive and can be watched; otherwise false.
- voidtimeoutExceeded(String state) - -
-          This is a callback which is called whenever your expected completion time is exceeded.
-  -

- - - - - - - - -
-Method Detail
- -

-timeoutExceeded

-
-void timeoutExceeded(String state)
-
-
This is a callback which is called whenever your expected completion time is exceeded. The current state of the - stack is available. -

-

-
Parameters:
state - The state in which your Watchable is currently.
-
-
-
- -

-getName

-
-String getName()
-
-
Returns a human-readable name of this Watchable. Used in logging. -

-

- -
Returns:
The name of the Watchable.
-
-
-
- -

-isAlive

-
-boolean isAlive()
-
-
Returns true, if this Watchable is still alive and can be watched; otherwise false. - For example, a stopped Thread is not very interesting to watch. -

-

- -
Returns:
the result
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
-Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. - - http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/Watchable.png ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/Watchable.png b/apidocs/2.10.1/org/apache/wiki/Watchable.png deleted file mode 100755 index e015238..0000000 Binary files a/apidocs/2.10.1/org/apache/wiki/Watchable.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.html ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.html b/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.html deleted file mode 100755 index 7e85e76..0000000 --- a/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - -WikiBackgroundThread (Apache JSPWiki Main War 2.10.1 API) - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
- -

- -org.apache.wiki -
-Class WikiBackgroundThread

-
-java.lang.Object
-  extended by java.lang.Thread
-      extended by org.apache.wiki.WikiBackgroundThread
-
-
-
All Implemented Interfaces:
Runnable, EventListener, WikiEventListener
-
-
-
Direct Known Subclasses:
RSSThread
-
-
-
-
public abstract class WikiBackgroundThread
extends Thread
implements WikiEventListener
- - - - - - - -
- -

-Abstract Thread subclass that operates in the background; when it detects the WikiEngineEvent.SHUTDOWN event, - it terminates itself. Subclasses of this method need only implement the method backgroundTask(), instead of - the normal Thread.run(), and provide a constructor that passes the WikiEngine and sleep interval. This - class is thread-safe. -

- -

-


- -

- - - - - - - -
-Nested Class Summary
- - - - - - - -
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-  - - - - - - - -
-Field Summary
- - - - - - - -
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-  - - - - - - - - - - -
-Constructor Summary
WikiBackgroundThread(WikiEngine engine, - int sleepInterval) - -
-          Constructs a new instance of this background thread with a specified sleep interval, and adds the new instance - to the wiki engine's event listeners.
-  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-Method Summary
- voidactionPerformed(WikiEvent event) - -
-          Listens for WikiEngineEvent.SHUTDOWN and, if detected, marks the thread for death.
-abstract  voidbackgroundTask() - -
-          Abstract method that performs the actual work for this background thread; subclasses must implement this method.
- WikiEnginegetEngine() - -
-          Returns the WikiEngine that created this background thread.
- voidrun() - -
-          Runs the background thread's backgroundTask() method at the interval specified at construction.
- voidshutdown() - -
-          Requests the shutdown of this background thread.
- voidshutdownTask() - -
-          Executes a task after shutdown signal was detected.
- voidstartupTask() - -
-          Executes a task just after the thread's Thread.run() method starts, but before the - backgroundTask() task executes.
- - - - - - - -
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
- - - - - - - -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-  -

- - - - - - - - -
-Constructor Detail
- -

-WikiBackgroundThread

-
-public WikiBackgroundThread(WikiEngine engine,
-                            int sleepInterval)
-
-
Constructs a new instance of this background thread with a specified sleep interval, and adds the new instance - to the wiki engine's event listeners. -

-

-
Parameters:
engine - the wiki engine
sleepInterval - the interval between invocations of - the thread's Thread.run() method, in seconds
-
- - - - - - - - -
-Method Detail
- -

-actionPerformed

-
-public final void actionPerformed(WikiEvent event)
-
-
Listens for WikiEngineEvent.SHUTDOWN and, if detected, marks the thread for death. -

-

-
Specified by:
actionPerformed in interface WikiEventListener
-
-
-
Parameters:
event - a WikiEvent object
See Also:
WikiEventListener.actionPerformed(org.apache.wiki.event.WikiEvent)
-
-
-
- -

-backgroundTask

-
-public abstract void backgroundTask()
-                             throws Exception
-
-
Abstract method that performs the actual work for this background thread; subclasses must implement this method. -

-

-
-
-
- -
Throws: -
Exception - Any exception can be thrown
-
-
-
- -

-getEngine

-
-public WikiEngine getEngine()
-
-
Returns the WikiEngine that created this background thread. -

-

-
-
-
- -
Returns:
the wiki engine
-
-
-
- -

-shutdown

-
-public void shutdown()
-
-
Requests the shutdown of this background thread. Note that the shutdown is not immediate. -

-

-
-
-
-
Since:
-
2.4.92
-
-
-
-
- -

-run

-
-public final void run()
-
-
Runs the background thread's backgroundTask() method at the interval specified at construction. - The thread will initially pause for a full sleep interval before starting, after which it will execute - startupTask(). This method will cleanly terminate the thread if it has previously been marked as - dead, before which it will execute shutdownTask(). If any of the three methods return an exception, - it will be re-thrown as a InternalWikiException. -

-

-
Specified by:
run in interface Runnable
Overrides:
run in class Thread
-
-
-
See Also:
Thread.run()
-
-
-
- -

-shutdownTask

-
-public void shutdownTask()
-                  throws Exception
-
-
Executes a task after shutdown signal was detected. By default, this method does nothing; override it - to implement custom functionality. -

-

-
-
-
- -
Throws: -
Exception - Any exception can be thrown.
-
-
-
- -

-startupTask

-
-public void startupTask()
-                 throws Exception
-
-
Executes a task just after the thread's Thread.run() method starts, but before the - backgroundTask() task executes. By default, this method does nothing; override it to implement - custom functionality. -

-

-
-
-
- -
Throws: -
Exception - Any exception can be thrown.
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- -
- - - -
-Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved. - - http://git-wip-us.apache.org/repos/asf/jspwiki-site/blob/570c2bf5/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.png ---------------------------------------------------------------------- diff --git a/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.png b/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.png deleted file mode 100755 index af71abe..0000000 Binary files a/apidocs/2.10.1/org/apache/wiki/WikiBackgroundThread.png and /dev/null differ