Package org.apache.felix.cm.impl
Class UpdateThread
java.lang.Object
org.apache.felix.cm.impl.UpdateThread
- All Implemented Interfaces:
Runnable
The
UpdateThread is the thread used to update managed services
and managed service factories as well as to send configuration events.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AccessControlContextprivate final BlockingDeque<Runnable> private Threadprivate final Stringprivate final ThreadGroup -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()(package private) void(package private) void(package private) voidstart()Starts processing the queued tasks.(package private) voidTerminates the worker thread and waits for the thread to have processed all outstanding events up to and including the termination job.
-
Field Details
-
workerThreadGroup
-
workerBaseName
-
updateTasks
-
worker
-
acc
-
-
Constructor Details
-
UpdateThread
-
-
Method Details
-
run
public void run() -
run0
- Throws:
Throwable
-
start
void start()Starts processing the queued tasks. This method does nothing if the worker has already been started. -
terminate
void terminate()Terminates the worker thread and waits for the thread to have processed all outstanding events up to and including the termination job. All jobsscheduledafter termination has been initiated will not be processed any more. This method does nothing if the worker thread is not currently active.If the worker thread does not terminate within 5 seconds it is killed by calling the (deprecated)
Thread.stop()method. It may be that the worker thread may be blocked by a deadlock (it should not, though). In this case hope is thatThread.stop()will be able to released that deadlock at the expense of one or more tasks to not be executed any longer.... In any case an ERROR message is logged with the LogService in this situation. -
schedule
-