com.bigdata.jini.start.config
Class ManagedServiceConfiguration

java.lang.Object
  extended by com.bigdata.jini.start.config.ServiceConfiguration
      extended by com.bigdata.jini.start.config.JavaServiceConfiguration
          extended by com.bigdata.jini.start.config.ManagedServiceConfiguration
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
JiniServiceConfiguration

public abstract class ManagedServiceConfiguration
extends JavaServiceConfiguration

Configuration of a managed service. These are generally jini services whose ephemeral state is registered with zookeeper. Explicitly excluded are the jini core services and zookeeper itself.

Version:
$Id$
Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
 class ManagedServiceConfiguration.ManagedServiceStarter<V extends ProcessHelper>
          This class and subclasses support re-start of persistent services.
static interface ManagedServiceConfiguration.Options
           
 
Nested classes/interfaces inherited from class com.bigdata.jini.start.config.JavaServiceConfiguration
JavaServiceConfiguration.JavaServiceStarter<V extends ProcessHelper>
 
Nested classes/interfaces inherited from class com.bigdata.jini.start.config.ServiceConfiguration
ServiceConfiguration.AbstractServiceStarter<V extends ProcessHelper>
 
Field Summary
 
Fields inherited from class com.bigdata.jini.start.config.JavaServiceConfiguration
classpath, defaultJavaArgs, javaHome, log4j
 
Fields inherited from class com.bigdata.jini.start.config.ServiceConfiguration
args, className, constraints, log, options, replicationCount, serviceCount, serviceDir, timeout
 
Constructor Summary
ManagedServiceConfiguration(String className, net.jini.config.Configuration config)
           
 
Method Summary
 ManageLogicalServiceTask<ManagedServiceConfiguration> newLogicalServiceTask(JiniFederation fed, IServiceListener listener, String configZPath, List<String> children)
          Return a task that will correct any imbalance between the ServiceConfiguration and the #of logical services.
 ManagedServiceConfiguration.ManagedServiceStarter newServiceStarter(IServiceListener listener)
          Not supported - use #newServiceStarter(JiniFederation, IServiceListener, String) instead.
 ManagedServiceConfiguration.ManagedServiceStarter newServiceStarter(JiniFederation fed, IServiceListener listener, String logicalServiceZPath, net.jini.core.entry.Entry[] attributes)
          Factory method returns an object that may be used to (re-)start a service.
 
Methods inherited from class com.bigdata.jini.start.config.JavaServiceConfiguration
getClassName, getClasspath, getDefaultJavaArgs, getJavaHome, getLog4j, toString
 
Methods inherited from class com.bigdata.jini.start.config.ServiceConfiguration
canStartService, canStartService, concat, getArgs, getClassPath, getConstraints, getDefaultTimeout, getOptions, getReplicationCount, getServiceCount, getServiceDir, getStringArray, getTimeout, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagedServiceConfiguration

public ManagedServiceConfiguration(String className,
                                   net.jini.config.Configuration config)
                            throws net.jini.config.ConfigurationException
Parameters:
className -
config -
Throws:
net.jini.config.ConfigurationException
Method Detail

newServiceStarter

public ManagedServiceConfiguration.ManagedServiceStarter newServiceStarter(IServiceListener listener)
                                                                    throws Exception
Not supported - use #newServiceStarter(JiniFederation, IServiceListener, String) instead.

Overrides:
newServiceStarter in class JavaServiceConfiguration
Throws:
UnsupportedOperationException - always.
Exception - if there is a problem creating the service starter.

newServiceStarter

public ManagedServiceConfiguration.ManagedServiceStarter newServiceStarter(JiniFederation fed,
                                                                           IServiceListener listener,
                                                                           String logicalServiceZPath,
                                                                           net.jini.core.entry.Entry[] attributes)
                                                                    throws Exception
Factory method returns an object that may be used to (re-)start a service.

Parameters:
fed -
listener -
logicalServiceZPath - The path to the logical service whose instance will be started.
attributes - This provides the information required to restart a persistent service. When not given a new service instance will be started. When given, the same services instance will be restarted.
Throws:
Exception - if there is a problem creating the service starter.

newLogicalServiceTask

public ManageLogicalServiceTask<ManagedServiceConfiguration> newLogicalServiceTask(JiniFederation fed,
                                                                                   IServiceListener listener,
                                                                                   String configZPath,
                                                                                   List<String> children)
Return a task that will correct any imbalance between the ServiceConfiguration and the #of logical services.

Parameters:
fed -
listener -
configZPath - The zpath of the ManagedServiceConfiguration
children - The list of logical service instances. These are the children of the ManagedServiceConfiguration znode.
Returns:


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.