@Service @ContractsProvided(value=RunLevelController.class) public class RunLevelControllerImpl extends java.lang.Object implements RunLevelController
RunLevelController.ThreadingPolicy| Constructor and Description |
|---|
RunLevelControllerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
If there is a current procedure in process this method will get it
and cancel it
|
RunLevelFuture |
getCurrentProceeding()
This method will return the current proceedTo that the RunLevelController
is working on, or it will return null if the controller is not currently
moving up or down
|
int |
getCurrentRunLevel()
The current run level state.
|
int |
getMaximumUseableThreads()
Returns the current number of maximum useable threads
|
RunLevelController.ThreadingPolicy |
getThreadingPolicy()
Returns the threading policy currently being used by
this controller
|
void |
proceedTo(int runLevel)
This method will move to the given run level synchronously as per
RunLevelController.proceedToAsync(int). |
RunLevelFuture |
proceedToAsync(int runLevel)
Causes this RunLevelController to move to the specified run level for
all
RunLevel instances, orchestrating the appropriate
lifecycle events. |
void |
setMaximumUseableThreads(int maximumThreads)
This sets the maximum number of threads that the system
can create for creation and/or destruction of threads.
|
void |
setThreadingPolicy(RunLevelController.ThreadingPolicy policy)
Sets the threading policy that will be used by
this controller.
|
public void proceedTo(int runLevel)
RunLevelControllerRunLevelController.proceedToAsync(int).proceedTo in interface RunLevelControllerrunLevel - The level that should be proceeded topublic RunLevelFuture proceedToAsync(int runLevel) throws CurrentlyRunningException, java.lang.IllegalStateException
RunLevelControllerRunLevel instances, orchestrating the appropriate
lifecycle events.
If the run level specified is the same as the current run level then the RunLevelController may return immediately
proceedToAsync in interface RunLevelControllerrunLevel - the run level to move toCurrentlyRunningException - if there is currently a job running
this exception will be thrown with the currently running jobjava.lang.IllegalStateException - if this method is called when the
USE_NO_THREADS policy is in effectpublic RunLevelFuture getCurrentProceeding()
RunLevelControllergetCurrentProceeding in interface RunLevelControllerpublic void cancel()
RunLevelControllercancel in interface RunLevelControllerpublic int getCurrentRunLevel()
RunLevelControllergetCurrentRunLevel in interface RunLevelControllerpublic void setMaximumUseableThreads(int maximumThreads)
RunLevelControllersetMaximumUseableThreads in interface RunLevelControllermaximumThreads - The maximum number of threads that
can be used by the system for creation or destruction of
servicespublic int getMaximumUseableThreads()
RunLevelControllergetMaximumUseableThreads in interface RunLevelControllerpublic void setThreadingPolicy(RunLevelController.ThreadingPolicy policy)
RunLevelControllersetThreadingPolicy in interface RunLevelControllerpolicy - The policy that should be used by this controllerpublic RunLevelController.ThreadingPolicy getThreadingPolicy()
RunLevelControllergetThreadingPolicy in interface RunLevelControllerCopyright © 2013 Oracle Corporation. All Rights Reserved.