com.bigdata.jini.start.config
Interface IServiceConstraint

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractHostConstraint, HostAllowConstraint, HostRejectConstraint, JiniNotRunningConstraint, JiniRunningConstraint, MaxClientServicesPerHostConstraint, MaxDataServicesPerHostConstraint, MaxServicesPerHostConstraint, MDSRunningConstraint, RoundRobinServiceConstraint, ServiceDependencyConstraint, TXRunningConstraint, ZookeeperRunningConstraint

public interface IServiceConstraint
extends Serializable

A constraint on where the service may be instantiated. For example, at most N instances of a service on a host, only on hosts with a given IP address or pattern, etc.

TODO:
add load-based constraints, e.g., can not start a new service if heavily swapping, near limits on RAM or on disk.

Method Summary
 boolean allow(JiniFederation fed)
          Return true iff a service may be instantiated on this host.
 

Method Detail

allow

boolean allow(JiniFederation fed)
              throws Exception
Return true iff a service may be instantiated on this host.

Note: Constraints which can be evaluated without the federation reference MUST NOT throw an exception if that reference is null. This allows us to evaluate constraints for boostrap services as well as for ManagedServiceConfigurations

Parameters:
fed - The federation.
Throws:
Exception


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