Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.repository.cluster
Class ClusteringService.Administrator

    java.lang.Object
      org.modeshape.repository.service.AbstractServiceAdministrator
          org.modeshape.repository.cluster.ClusteringService.Administrator

All Implemented Interfaces:
  ServiceAdministrator

Enclosing class:
  ClusteringService

    protected class ClusteringService.Administrator

extends AbstractServiceAdministrator

The administrative component for this service.

Nested Class Summary

Nested classes/interfaces inherited from interface org.modeshape.repository.service.ServiceAdministrator
`ServiceAdministrator.State`

Constructor Summary
`protected` | `ClusteringService.Administrator()`

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`

Constructor Detail

### ClusteringService.Administrator

    protected ClusteringService.Administrator()

Method Detail

### 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:
    `doStart` in 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.STARTED` or `ServiceAdministrator.State.PAUSED`). This method does nothing by default, and should be overridden if needed.

  Overrides:
    `doShutdown` in class `AbstractServiceAdministrator`
  Parameters:
    `fromState` - the state from which this service is transitioning; never null

### doCheckIsTerminated

    protected boolean doCheckIsTerminated()

  Subclasses should implement this method to determine whether the service has completed shutdown.

  Specified by:
    `doCheckIsTerminated` in class `AbstractServiceAdministrator`
  Returns:
    true if terminated, or false otherwise

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.