Package com.yahoo.config.provision
Interface Provisioner
public interface Provisioner
Interface used by the config system to acquire hosts.
- Author:
- Ulf Lilleengen
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate
(Collection<HostSpec> hosts, ActivationContext context, ApplicationTransaction transaction) Activates the allocation of nodes to this application captured in the hosts argument.lock
(ApplicationId application) Returns a provision lock for the given applicationprepare
(ApplicationId applicationId, ClusterSpec cluster, Capacity capacity, ProvisionLogger logger) Prepares allocation of a set of hosts with a given type, common id and the amount.void
remove
(ApplicationTransaction transaction) Transactionally remove an application under lock.void
restart
(ApplicationId application, HostFilter filter) Requests a restart of the services of the given application
-
Method Details
-
prepare
List<HostSpec> prepare(ApplicationId applicationId, ClusterSpec cluster, Capacity capacity, ProvisionLogger logger) Prepares allocation of a set of hosts with a given type, common id and the amount.- Parameters:
applicationId
- the application requesting hostscluster
- the specification of the cluster to allocate nodes forcapacity
- the capacity requestedlogger
- a logger which receives messages which are returned to the requestor- Returns:
- the specification of the hosts allocated
-
activate
void activate(Collection<HostSpec> hosts, ActivationContext context, ApplicationTransaction transaction) Activates the allocation of nodes to this application captured in the hosts argument. -
remove
Transactionally remove an application under lock. -
restart
Requests a restart of the services of the given application- Parameters:
application
- the application to restartfilter
- a filter which matches the application nodes to restart
-
lock
Returns a provision lock for the given application
-