org.modeshape.repository
Class RepositoryService.Administrator
java.lang.Object
   org.modeshape.repository.service.AbstractServiceAdministrator
org.modeshape.repository.service.AbstractServiceAdministrator
       org.modeshape.repository.RepositoryService.Administrator
org.modeshape.repository.RepositoryService.Administrator
- All Implemented Interfaces: 
- ServiceAdministrator
- Enclosing class:
- RepositoryService
- protected class RepositoryService.Administrator 
- extends AbstractServiceAdministrator
 
The administrative component for this service.
 
 
 
| Method Summary | 
|  boolean | awaitTermination(long timeout,
                 TimeUnit unit)Blocks until the shutdown has completed, or the timeout occurs, or the current thread is interrupted, whichever happens
 first.
 | 
| protected  boolean | doCheckIsTerminated()Subclasses should implement this method to determine whether the service has completed shutdown.
 | 
| protected  void | doShutdown(ServiceAdministrator.State fromState)Implementation of the functionality to switch to the shutdown state.
 | 
| protected  void | doStart(ServiceAdministrator.State fromState)Implementation of the functionality to switch to the started state.
 | 
 
| Methods inherited from class org.modeshape.repository.service.AbstractServiceAdministrator | 
| doPause, getServiceName, getServiceName, getState, isPaused, isShutdown, isStarted, isTerminated, pause, setState, setState, shutdown, start | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
RepositoryService.Administrator
protected RepositoryService.Administrator()
doCheckIsTerminated
protected boolean doCheckIsTerminated()
- Subclasses should implement this method to determine whether the service has completed shutdown.
 
- 
- Specified by:
- doCheckIsTerminatedin class- AbstractServiceAdministrator
 
- 
- Returns:
- true if terminated, or false otherwise
 
doStart
protected void doStart(ServiceAdministrator.State fromState)
- Implementation of the functionality to switch to the started state. This method is only called if the state from which the
 service is transitioning is appropriate (ServiceAdministrator.State.PAUSED). This method does nothing by default,
 and should be overridden if needed.
 
- 
- Overrides:
- doStartin class- AbstractServiceAdministrator
 
- 
- Parameters:
- fromState- the state from which this service is transitioning; never null
 
doShutdown
protected void doShutdown(ServiceAdministrator.State fromState)
- Implementation of the functionality to switch to the shutdown state. This method is only called if the state from which the
 service is transitioning is appropriate (ServiceAdministrator.State.STARTEDorServiceAdministrator.State.PAUSED). This method does nothing by default, and should be overridden if needed.
 
- 
- Overrides:
- doShutdownin class- AbstractServiceAdministrator
 
- 
- Parameters:
- fromState- the state from which this service is transitioning; never null
- See Also:
- AbstractServiceAdministrator.doShutdown(org.modeshape.repository.service.ServiceAdministrator.State)
 
awaitTermination
public boolean awaitTermination(long timeout,
                                TimeUnit unit)
- Blocks until the shutdown has completed, or the timeout occurs, or the current thread is interrupted, whichever happens
 first.
 
- 
- Parameters:
- timeout- the maximum time to wait
- unit- the time unit of the timeout argument
- Returns:
- true if this service complete shut down and false if the timeout elapsed before it was shut down
         completely
- See Also:
- ServiceAdministrator.awaitTermination(long, java.util.concurrent.TimeUnit)
 
Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.